Class: ClickUp::Folder

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

Class Method Summary collapse

Methods included from APIOperations::All

all

Methods included from APIOperations::Create

create

Methods included from APIOperations::Get

get

Methods included from APIOperations::Delete

delete

Methods inherited from APIResource

execute_request

Class Method Details

.formatted_params(params) ⇒ Object



26
27
28
29
30
31
# File 'lib/click_up/hierarchy/folder.rb', line 26

def formatted_params(params)
  params.reject {|key, _| rejected_params.include?(key) }
  # {
  #   "name": "Updated Folder Name"
  # }
end

.index_path(params = {}) ⇒ Object



11
12
13
# File 'lib/click_up/hierarchy/folder.rb', line 11

def index_path(params={})
  "/space/#{params[:space_id]}/folder"
end

.rejected_paramsObject



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

def rejected_params
  [
    :id,
    :space_id
  ]
end

.resource_path(params = {}) ⇒ Object



15
16
17
# File 'lib/click_up/hierarchy/folder.rb', line 15

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