Method: Databasedotcom::Chatter::Group.members
- Defined in:
- lib/databasedotcom/chatter/group.rb
.members(client, group_id) ⇒ Object
Returns a Collection of GroupMembership instances for the Group identified by group_id.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/databasedotcom/chatter/group.rb', line 11 def self.members(client, group_id) url = "/services/data/v#{client.version}/chatter/groups/#{group_id}/members" result = client.http_get(url) response = JSON.parse(result.body) collection = Databasedotcom::Collection.new(client, response["totalMemberCount"], response["nextPageUrl"], response["previousPageUrl"], response["currentPageUrl"]) response["members"].each do |member| collection << GroupMembership.new(client, member) end collection end |