Module: ChatWork::Client::MyStatusMethods

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

Instance Method Summary collapse

Instance Method Details

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

Get the number of: unread messages, unread To messages, and unfinished tasks.

Examples:

response format

{
  "unread_room_num": 2,
  "mention_room_num": 1,
  "mytask_room_num": 3,
  "unread_num": 12,
  "mention_num": 1,
  "mytask_num": 8
}

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:



22
23
24
# File 'lib/chatwork/client/my_status_methods.rb', line 22

def get_my_status(&block)
  get("/my/status", &block)
end