Module: ChatWork::Client::MeMethods

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

Instance Method Summary collapse

Instance Method Details

#get_me {|response_body, response_header| ... } ⇒ Hashie::Mash

Get your account information

Examples:

response format

{
  "account_id": 123,
  "room_id": 322,
  "name": "John Smith",
  "chatwork_id": "tarochatworkid",
  "organization_id": 101,
  "organization_name": "Hello Company",
  "department": "Marketing",
  "title": "CMO",
  "url": "http://mycompany.example.com",
  "introduction": "Self Introduction",
  "mail": "[email protected]",
  "tel_organization": "XXX-XXXX-XXXX",
  "tel_extension": "YYY-YYYY-YYYY",
  "tel_mobile": "ZZZ-ZZZZ-ZZZZ",
  "skype": "myskype_id",
  "facebook": "myfacebook_id",
  "twitter": "mytwitter_id",
  "avatar_image_url": "https://example.com/abc.png",
  "login_mail": "[email protected]"
}

Yields:

  • (response_body, response_header)

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

Yield Parameters:

  • response_body (Hashie::Mash)

    response body

  • response_header (Hash<String, String>)

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

Returns:

  • (Hashie::Mash)

See Also:



35
36
37
# File 'lib/chatwork/client/me_methods.rb', line 35

def get_me(&block)
  get("/me", &block)
end