class ClickUp::List
Public Class Methods
folder_path(folder_id)
click to toggle source
# File lib/click_up/hierarchy/list.rb, line 21 def folder_path(folder_id) "/folder/#{folder_id}/list" end
folderless_path(space_id)
click to toggle source
# File lib/click_up/hierarchy/list.rb, line 25 def folderless_path(space_id) "/space/#{space_id}/list" end
formatted_params(params)
click to toggle source
# File lib/click_up/hierarchy/list.rb, line 41 def formatted_params(params) params.reject {|key, _| rejected_params.include?(key) } # { # "name": "New List Name", # "content": "Sent from API V2", # "due_date": 1577811600000, # "due_date_time": false, # "priority": 1, # "assignee": 53480, # "status": "red" # } end
index_path(params={})
click to toggle source
# File lib/click_up/hierarchy/list.rb, line 11 def index_path(params={}) if params.has_key?(:folder_id) folder_path(params[:folder_id]) elsif params.has_key?(:space_id) folderless_path(params[:space_id]) else raise ArgumentError, "Either folder_id or space_id is required." end end
rejected_params()
click to toggle source
# File lib/click_up/hierarchy/list.rb, line 33 def rejected_params [ :id, :folder_id, :space_id ] end
resource_path(params={})
click to toggle source
# File lib/click_up/hierarchy/list.rb, line 29 def resource_path(params={}) "/list/#{params[:id]}" end