Module: ChatWork::Contacts

Defined in:
lib/chatwork/contacts.rb

Class Method Summary collapse

Class Method Details

.get {|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:



27
28
29
# File 'lib/chatwork/contacts.rb', line 27

def self.get(&block)
  ChatWork.client.get_contacts(&block)
end