Method: ChatWork::Task.find

Defined in:
lib/chatwork/task.rb

.find(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:



104
105
106
# File 'lib/chatwork/task.rb', line 104

def self.find(room_id:, task_id:, &block)
  ChatWork.client.find_task(room_id: room_id, task_id: task_id, &block)
end