Module: ChatWork::Client::TaskMethods
- Included in:
 - ChatWork::Client
 
- Defined in:
 - lib/chatwork/client/task_methods.rb
 
Instance Method Summary collapse
- 
  
    
      #create_task(room_id:, body:, to_ids:, limit: nil, limit_type: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash 
    
    
  
  
  
  
  
  
  
  
  
    
Add a new task to the chat.
 - 
  
    
      #find_task(room_id:, task_id:) {|response_body, response_header| ... } ⇒ Hashie::Mash 
    
    
  
  
  
  
  
  
  
  
  
    
Get information about the specified task.
 - 
  
    
      #get_tasks(room_id:, account_id:, assigned_by_account_id: nil, status: nil) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash> 
    
    
  
  
  
  
  
  
  
  
  
    
Get the list of tasks associated with the specified chat.
 - 
  
    
      #update_task_status(room_id:, task_id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash 
    
    
  
  
  
  
  
  
  
  
  
    
Update task completion status.
 
Instance Method Details
#create_task(room_id:, body:, to_ids:, limit: nil, limit_type: nil) {|response_body, response_header| ... } ⇒ Hashie::Mash
Add a new task to the chat
      66 67 68 69 70 71 72 73 74 75  | 
    
      # File 'lib/chatwork/client/task_methods.rb', line 66 def create_task(room_id:, body:, to_ids:, limit: nil, limit_type: nil, &block) params = { body: body, to_ids: Array(to_ids).join(","), limit_type: limit_type, } params[:limit] = limit.to_i if limit post("/rooms/#{room_id}/tasks", params, &block) end  | 
  
#find_task(room_id:, task_id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get information about the specified task
      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  | 
  
#get_tasks(room_id:, account_id:, assigned_by_account_id: nil, status: nil) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of tasks associated with the specified chat
(*This method returns up to 100 entries. We are planning to implement pagination to support larger number of data retrieval)
      41 42 43  | 
    
      # File 'lib/chatwork/client/task_methods.rb', line 41 def get_tasks(room_id:, account_id:, assigned_by_account_id: nil, status: nil, &block) get("/rooms/#{room_id}/tasks", account_id: account_id, assigned_by_account_id: assigned_by_account_id, status: status, &block) end  | 
  
#update_task_status(room_id:, task_id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Update task completion status
      133 134 135  | 
    
      # File 'lib/chatwork/client/task_methods.rb', line 133 def update_task_status(room_id:, task_id:, body:, &block) put("/rooms/#{room_id}/tasks/#{task_id}/status", body: body, &block) end  |