Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API method to show recently visited groups for user #28

Merged
merged 3 commits into from
Jan 30, 2017
Merged
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
14 changes: 14 additions & 0 deletions lib/api.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,20 @@ var deleteEmailToken = module.exports.deleteEmailToken = function(restCtx, userI
RestUtil.RestRequest(restCtx, url, 'DELETE', {}, callback);
};

/**
* Get a user's most recent groups through the REST API.
*
* @param {RestContext} restCtx Standard REST Context object that contains the current tenant URL and the current user credentials
* @param {String} userId User id whose recent groups you wish to receive
* @param {Function} callback Standard callback function
* @param {Object} callback.err Standard error object, if any
* @param {Group[]} callback.response The user's most recently visited groups
*/
var getRecentlyVisitedGroups = module.exports.getRecentlyVisitedGroups = function(restCtx, userId, callback) {
var url = '/api/user/' + RestUtil.encodeURIComponent(userId) + '/groups/recent';
RestUtil.RestRequest(restCtx, url, 'GET', {}, callback);
};

/**
* Create a private tenant administrator user with mapped local authentication credentials on the provided tenant
*
Expand Down