Class: ClickUp::Folder
- Inherits:
-
APIResource
- Object
- APIResource
- ClickUp::Folder
- Extended by:
- APIOperations::All, APIOperations::Create, APIOperations::Get
- Defined in:
- lib/click_up/hierarchy/folder.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 inherited from APIResource
Class Method Details
.formatted_params(params) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/click_up/hierarchy/folder.rb', line 25 def formatted_params(params) params.reject {|key, _| rejected_params.include?(key) } # { # "name": "Updated Folder Name" # } end |
.index_path(params = {}) ⇒ Object
10 11 12 |
# File 'lib/click_up/hierarchy/folder.rb', line 10 def index_path(params={}) "/space/#{params[:space_id]}/folder" end |
.rejected_params ⇒ Object
18 19 20 21 22 23 |
# File 'lib/click_up/hierarchy/folder.rb', line 18 def rejected_params [ :id, :space_id ] end |
.resource_path(params = {}) ⇒ Object
14 15 16 |
# File 'lib/click_up/hierarchy/folder.rb', line 14 def resource_path(params={}) "/folder/#{params[:id]}" end |