File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# ClickUp API Ruby Library
2- ClickUp API solution for Ruby. As of now , it doesn't support OAuth Authentication. You can only use personal token based authentication.
2+ ClickUp API solution for Ruby. As of ` v0.1.1 ` , it doesn't support OAuth Authentication. You can only use personal token based authentication.
33
44# Getting Started
55
@@ -38,13 +38,17 @@ ClickUp::Space.all(team_id: 3451451)
3838ClickUp ::Space .create(team_id: 3451451 , name: ' Space From API' )
3939
4040ClickUp ::Space .get(323455 )
41+
42+ ClickUp ::Space .delete(323455 )
4143```
4244
4345## Folder
4446``` ruby
4547ClickUp ::Folder .create(space_id: 323455 , name: ' Folder From API' )
4648
4749ClickUp ::Folder .get(756376 )
50+
51+ ClickUp ::Folder .delete(756376 )
4852```
4953
5054## List
Original file line number Diff line number Diff line change 1111require 'click_up/api_operations/create'
1212require 'click_up/api_operations/get'
1313require 'click_up/api_operations/all'
14+ require 'click_up/api_operations/delete'
1415
1516require 'click_up/hierarchy/team'
1617require 'click_up/hierarchy/space'
Original file line number Diff line number Diff line change 1+ module ClickUp
2+ module APIOperations
3+ module Delete
4+ def delete ( id = nil , **opts )
5+ params = opts . clone
6+ unless params . has_key? ( :id ) || id
7+ raise ParamRequiredError , "id is a required parameter." , "id"
8+ end
9+ params [ :id ] = id ? id : params [ :id ]
10+ execute_request ( :delete , resource_path ( params ) )
11+ end
12+ end
13+ end
14+ end
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ def post
2020 format_response ( net_http_response . body )
2121 end
2222
23+ def delete
24+ net_http_response = https_client . delete ( resource_url . path , default_headers )
25+ format_response ( net_http_response . body )
26+ end
27+
2328 private
2429 def resource_url
2530 uri = URI ( "#{ api_base } #{ namespace } #{ path } " )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ class Folder < APIResource
55 extend ClickUp ::APIOperations ::All
66 extend ClickUp ::APIOperations ::Create
77 extend ClickUp ::APIOperations ::Get
8+ extend ClickUp ::APIOperations ::Delete
89
910 class << self
1011 def index_path ( params = { } )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ class List < APIResource
55 extend ClickUp ::APIOperations ::All
66 extend ClickUp ::APIOperations ::Create
77 extend ClickUp ::APIOperations ::Get
8+ extend ClickUp ::APIOperations ::Delete
89
910 class << self
1011 def index_path ( params = { } )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ class Space < APIResource
55 extend ClickUp ::APIOperations ::All
66 extend ClickUp ::APIOperations ::Create
77 extend ClickUp ::APIOperations ::Get
8+ extend ClickUp ::APIOperations ::Delete
89
910 class << self
1011 def index_path ( params = { } )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ class Task < APIResource
55 extend ClickUp ::APIOperations ::All
66 extend ClickUp ::APIOperations ::Create
77 extend ClickUp ::APIOperations ::Get
8+ extend ClickUp ::APIOperations ::Delete
89
910 class << self
1011 def index_path ( params = { } )
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module ClickUp
4- VERSION = "0.1.0 "
4+ VERSION = "0.1.1 "
55end
You can’t perform that action at this time.
0 commit comments