lib/chatwork/me.rb in chatwork-0.7.0 vs lib/chatwork/me.rb in chatwork-0.8.0

- old
+ new

@@ -1,14 +1,16 @@ module ChatWork module Me - extend EntityMethods - # 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, @@ -29,10 +31,10 @@ # "facebook": "myfacebook_id", # "twitter": "mytwitter_id", # "avatar_image_url": "https://example.com/abc.png", # "login_mail": "account@example.com" # } - def self.get - _get("/me") + def self.get(&block) + ChatWork.client.get_me(&block) end end end