Module: ChatWork::Client::ContactsMethods

Included in:
ChatWork::Client
Defined in:
lib/chatwork/client/contacts_methods.rb

Instance Method Summary collapse

Instance Method Details

#get_contacts {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>

Get the list of your contacts

Examples:

response format

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

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:



26
27
28
# File 'lib/chatwork/client/contacts_methods.rb', line 26

def get_contacts(&block)
  get("/contacts", &block)
end