Class: ClickUp::Task

Inherits:
APIResource show all
Extended by:
APIOperations::All, APIOperations::Create, APIOperations::Get
Defined in:
lib/click_up/hierarchy/task.rb

Class Method Summary collapse

Methods included from APIOperations::All

all

Methods included from APIOperations::Create

create

Methods included from APIOperations::Get

get

Methods inherited from APIResource

execute_request

Class Method Details

.formatted_params(params) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/click_up/hierarchy/task.rb', line 25

def formatted_params(params)
  params.reject {|key, _| rejected_params.include?(key) }
  # {
  #   "name": "New Task Name",
  #   "description": "New Task Description",
  #   "assignees": [
  #     183
  #   ],
  #   "tags": [
  #     "tag name 1"
  #   ],
  #   "status": "Open",
  #   "priority": 3,
  #   "due_date": 1508369194377,
  #   "due_date_time": false,
  #   "time_estimate": 8640000,
  #   "start_date": 1567780450202,
  #   "start_date_time": false,
  #   "notify_all": true,
  #   "parent": null,
  #   "links_to": null,
  #   "custom_fields": [
  #     {
  #       "id": "0a52c486-5f05-403b-b4fd-c512ff05131c",
  #       "value": 23
  #     },
  #     {
  #       "id": "03efda77-c7a0-42d3-8afd-fd546353c2f5",
  #       "value": "Text field input"
  #     }
  #   ]
  # }
end

.index_path(params = {}) ⇒ Object



10
11
12
# File 'lib/click_up/hierarchy/task.rb', line 10

def index_path(params={})
  "/list/#{params[:list_id]}/task"
end

.rejected_paramsObject



18
19
20
21
22
23
# File 'lib/click_up/hierarchy/task.rb', line 18

def rejected_params
  [
    :id,
    :list_id
  ]
end

.resource_path(params = {}) ⇒ Object



14
15
16
# File 'lib/click_up/hierarchy/task.rb', line 14

def resource_path(params={})
  "/task/#{params[:id]}"
end