Method: ChatWork::Client::TaskMethods#find_task

Defined in:
lib/chatwork/client/task_methods.rb

#find_task(room_id:, task_id:) {|response_body, response_header| ... } ⇒ Hashie::Mash

Get information about the specified task

Examples:

response format

{
  "task_id": 3,
  "account": {
    "account_id": 123,
    "name": "Bob",
    "avatar_image_url": "https://example.com/abc.png"
  },
  "assigned_by_account": {
    "account_id": 456,
    "name": "Anna",
    "avatar_image_url": "https://example.com/def.png"
  },
  "message_id": "13",
  "body": "buy milk",
  "limit_time": 1384354799,
  "status": "open",
  "limit_type": "date"
}

Parameters:

  • room_id (Integer)
  • task_id (Integer)

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:



110
111
112
# File 'lib/chatwork/client/task_methods.rb', line 110

def find_task(room_id:, task_id:, &block)
  get("/rooms/#{room_id}/tasks/#{task_id}", &block)
end