-
Notifications
You must be signed in to change notification settings - Fork 27
/
me.rb
40 lines (40 loc) · 1.44 KB
/
me.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module ChatWork
module Me
# Get your account information
#
# @see http://developer.chatwork.com/ja/endpoint_me.html#GET-me
# @see http://download.chatwork.com/ChatWork_API_Documentation.pdf
#
# @yield [response_body, response_header] if block was given, return response body and response header through block arguments
# @yieldparam response_body [Hashie::Mash] response body
# @yieldparam response_header [Hash<String, String>] response header (e.g. X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset)
#
# @return [Hashie::Mash]
#
# @example 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]"
# }
def self.get(&block)
ChatWork.client.get_me(&block)
end
end
end