Skip to content

Commit

Permalink
Merge pull request #28 from sallakarppinen/issue-1289
Browse files Browse the repository at this point in the history
API method to show recently visited groups for user
sallakarppinen authored Jan 30, 2017
2 parents fb5b264 + 393de73 commit 30b6f1e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/api.user.js
Original file line number Diff line number Diff line change
@@ -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
*

0 comments on commit 30b6f1e

Please sign in to comment.