Skip to content

Commit

Permalink
Add feature: Ability to remove members of the group using api.Members…
Browse files Browse the repository at this point in the history
….remove
  • Loading branch information
evansloan committed May 29, 2017
1 parent cf34f4e commit 3197f85
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Stateless.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ api.Members.results = function(at, id, results_id, callback) {
getRequest(at, "/groups/" + id + "/members/results/" + results_id, {opts:opts, doParse:true}, callback);
}

// Remove members from a group
// Only one member can be removed at a time.
// The leader of the group cannot be removed.
// id [required] - group_id string
// member_id [required] - The membership id of the member to remove
// This is not the user ID. In the members key in the group JSON, this is the id value, not the user_id
api.Members.remove = function(at, id, member_id, callback) {
postRequest(at, "/groups/" + id + "/members/" + member_id + "/remove", {responseCode:200}, callback);
}

/************************************************************************
* Messages
***********************************************************************/
Expand Down

0 comments on commit 3197f85

Please sign in to comment.