Class: BrickFTP::RESTfulAPI::RemoveGroupMember

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/remove_group_member.rb

Overview

Remove a member

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(group_id, user_id) ⇒ Object

Removes a user from a group. No action will be taken if the user is not already in the group.

Parameters:

  • group_id (Integer)

    ID of the group the membership is associated with.

  • user_id (Integer)

    ID of the user the membership is associated with.



17
18
19
20
# File 'lib/brick_ftp/restful_api/remove_group_member.rb', line 17

def call(group_id, user_id)
  client.delete("/api/rest/v1/groups/#{group_id}/memberships/#{user_id}.json")
  true
end