Method: ChatWork::Client::MemberMethods#get_members

Defined in:
lib/chatwork/client/member_methods.rb

#get_members(room_id:) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>

Get the list of all chat members associated with the specified chat

Examples:

response format

[
  {
    "account_id": 123,
    "role": "member",
    "name": "John Smith",
    "chatwork_id": "tarochatworkid",
    "organization_id": 101,
    "organization_name": "Hello Company",
    "department": "Marketing",
    "avatar_image_url": "https://example.com/abc.png"
  }
]

Parameters:

  • room_id (Integer)

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Array<Hashie::Mash>)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset)

Returns:

  • (Array<Hashie::Mash>)

See Also:



28
29
30
# File 'lib/chatwork/client/member_methods.rb', line 28

def get_members(room_id:, &block)
  get("/rooms/#{room_id}/members", &block)
end