FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added 'currentUser' to retrieve the current users information. by wesnolte · Pull Request #45 · developerforce/Force.com-JavaScript-REST-Toolkit · GitHub

This repository was archived by the owner on Jan 10, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 10 additions & 0 deletions forcetk.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL