Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Added 'currentUser' to retrieve the current users information. #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions forcetk.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,16 @@ if (forcetk.Client === undefined) {
});
}

/*
* Lists the information about the current user including their ID, username,
* email address and more. Uses the Chatter REST API.
* @param callback function to which response will be passed
* @param [error=null] function to which jqXHR will be passed in case of error
*/
forcetk.Client.prototype.currentUser = function(callback, error) {
return this.ajax('/' + this.apiVersion + '/chatter/users/me/', callback, error);
}

/*
* Lists summary information about each Salesforce.com version currently
* available, including the version, label, and a link to each version's
Expand Down