Class: ClickUp::Task
- Inherits:
-
APIResource
- Object
- APIResource
- ClickUp::Task
- Defined in:
- lib/click_up/hierarchy/task.rb
Class Method Summary collapse
- .formatted_params(params) ⇒ Object
- .index_path(params = {}) ⇒ Object
- .rejected_params ⇒ Object
- .resource_path(params = {}) ⇒ Object
Methods included from APIOperations::All
Methods included from APIOperations::Create
Methods included from APIOperations::Get
Methods included from APIOperations::Delete
Methods inherited from APIResource
Class Method Details
.formatted_params(params) ⇒ Object
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 58 |
# File 'lib/click_up/hierarchy/task.rb', line 26 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
11 12 13 |
# File 'lib/click_up/hierarchy/task.rb', line 11 def index_path(params={}) "/list/#{params[:list_id]}/task" end |
.rejected_params ⇒ Object
19 20 21 22 23 24 |
# File 'lib/click_up/hierarchy/task.rb', line 19 def rejected_params [ :id, :list_id ] end |
.resource_path(params = {}) ⇒ Object
15 16 17 |
# File 'lib/click_up/hierarchy/task.rb', line 15 def resource_path(params={}) "/task/#{params[:id]}" end |