fizzy-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rubocop.yml +18 -0
- data/Rakefile +26 -0
- data/fizzy-sdk.gemspec +45 -0
- data/lib/fizzy/auth_strategy.rb +38 -0
- data/lib/fizzy/bulkhead.rb +68 -0
- data/lib/fizzy/cache.rb +101 -0
- data/lib/fizzy/chain_hooks.rb +45 -0
- data/lib/fizzy/circuit_breaker.rb +115 -0
- data/lib/fizzy/client.rb +212 -0
- data/lib/fizzy/config.rb +143 -0
- data/lib/fizzy/cookie_auth.rb +27 -0
- data/lib/fizzy/errors.rb +291 -0
- data/lib/fizzy/generated/metadata.json +1341 -0
- data/lib/fizzy/generated/services/boards_service.rb +91 -0
- data/lib/fizzy/generated/services/cards_service.rb +313 -0
- data/lib/fizzy/generated/services/columns_service.rb +69 -0
- data/lib/fizzy/generated/services/comments_service.rb +68 -0
- data/lib/fizzy/generated/services/devices_service.rb +35 -0
- data/lib/fizzy/generated/services/identity_service.rb +19 -0
- data/lib/fizzy/generated/services/miscellaneous_service.rb +256 -0
- data/lib/fizzy/generated/services/notifications_service.rb +65 -0
- data/lib/fizzy/generated/services/pins_service.rb +19 -0
- data/lib/fizzy/generated/services/reactions_service.rb +80 -0
- data/lib/fizzy/generated/services/sessions_service.rb +58 -0
- data/lib/fizzy/generated/services/steps_service.rb +69 -0
- data/lib/fizzy/generated/services/tags_service.rb +20 -0
- data/lib/fizzy/generated/services/uploads_service.rb +24 -0
- data/lib/fizzy/generated/services/users_service.rb +52 -0
- data/lib/fizzy/generated/services/webhooks_service.rb +83 -0
- data/lib/fizzy/generated/types.rb +988 -0
- data/lib/fizzy/hooks.rb +70 -0
- data/lib/fizzy/http.rb +411 -0
- data/lib/fizzy/logger_hooks.rb +46 -0
- data/lib/fizzy/magic_link_flow.rb +57 -0
- data/lib/fizzy/noop_hooks.rb +9 -0
- data/lib/fizzy/operation_info.rb +17 -0
- data/lib/fizzy/rate_limiter.rb +68 -0
- data/lib/fizzy/request_info.rb +10 -0
- data/lib/fizzy/request_result.rb +14 -0
- data/lib/fizzy/resilience.rb +59 -0
- data/lib/fizzy/security.rb +103 -0
- data/lib/fizzy/services/base_service.rb +116 -0
- data/lib/fizzy/static_token_provider.rb +24 -0
- data/lib/fizzy/token_provider.rb +42 -0
- data/lib/fizzy/version.rb +6 -0
- data/lib/fizzy/webhooks/verify.rb +36 -0
- data/lib/fizzy.rb +95 -0
- data/scripts/generate-metadata.rb +105 -0
- data/scripts/generate-services.rb +681 -0
- data/scripts/generate-types.rb +160 -0
- metadata +252 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fizzy
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Boards operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class BoardsService < BaseService
|
|
9
|
+
|
|
10
|
+
# list operation
|
|
11
|
+
# @param account_id [String] account id ID
|
|
12
|
+
# @return [Enumerator<Hash>] paginated results
|
|
13
|
+
def list(account_id:)
|
|
14
|
+
wrap_paginated(service: "boards", operation: "ListBoards", is_mutation: false, resource_id: account_id) do
|
|
15
|
+
paginate("/#{account_id}/boards.json")
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# create operation
|
|
20
|
+
# @param account_id [String] account id ID
|
|
21
|
+
# @param name [String] name
|
|
22
|
+
# @param all_access [Boolean, nil] all access
|
|
23
|
+
# @param auto_postpone_period [Integer, nil] auto postpone period
|
|
24
|
+
# @param public_description [String, nil] public description
|
|
25
|
+
# @return [Hash] response data
|
|
26
|
+
def create(account_id:, name:, all_access: nil, auto_postpone_period: nil, public_description: nil)
|
|
27
|
+
with_operation(service: "boards", operation: "CreateBoard", is_mutation: true, resource_id: account_id) do
|
|
28
|
+
http_post("/#{account_id}/boards.json", body: compact_params(name: name, all_access: all_access, auto_postpone_period: auto_postpone_period, public_description: public_description)).json
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# get operation
|
|
33
|
+
# @param account_id [String] account id ID
|
|
34
|
+
# @param board_id [String] board id ID
|
|
35
|
+
# @return [Hash] response data
|
|
36
|
+
def get(account_id:, board_id:)
|
|
37
|
+
with_operation(service: "boards", operation: "GetBoard", is_mutation: false, resource_id: board_id) do
|
|
38
|
+
http_get("/#{account_id}/boards/#{board_id}").json
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# update operation
|
|
43
|
+
# @param account_id [String] account id ID
|
|
44
|
+
# @param board_id [String] board id ID
|
|
45
|
+
# @param name [String, nil] name
|
|
46
|
+
# @param all_access [Boolean, nil] all access
|
|
47
|
+
# @param auto_postpone_period [Integer, nil] auto postpone period
|
|
48
|
+
# @param public_description [String, nil] public description
|
|
49
|
+
# @param user_ids [Array, nil] user ids
|
|
50
|
+
# @return [Hash] response data
|
|
51
|
+
def update(account_id:, board_id:, name: nil, all_access: nil, auto_postpone_period: nil, public_description: nil, user_ids: nil)
|
|
52
|
+
with_operation(service: "boards", operation: "UpdateBoard", is_mutation: true, resource_id: board_id) do
|
|
53
|
+
http_patch("/#{account_id}/boards/#{board_id}", body: compact_params(name: name, all_access: all_access, auto_postpone_period: auto_postpone_period, public_description: public_description, user_ids: user_ids)).json
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# delete operation
|
|
58
|
+
# @param account_id [String] account id ID
|
|
59
|
+
# @param board_id [String] board id ID
|
|
60
|
+
# @return [void]
|
|
61
|
+
def delete(account_id:, board_id:)
|
|
62
|
+
with_operation(service: "boards", operation: "DeleteBoard", is_mutation: true, resource_id: board_id) do
|
|
63
|
+
http_delete("/#{account_id}/boards/#{board_id}")
|
|
64
|
+
nil
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# publish_board operation
|
|
69
|
+
# @param account_id [String] account id ID
|
|
70
|
+
# @param board_id [String] board id ID
|
|
71
|
+
# @return [void]
|
|
72
|
+
def publish_board(account_id:, board_id:)
|
|
73
|
+
with_operation(service: "boards", operation: "PublishBoard", is_mutation: true, resource_id: board_id) do
|
|
74
|
+
http_post("/#{account_id}/boards/#{board_id}/publication.json", retryable: true)
|
|
75
|
+
nil
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# unpublish_board operation
|
|
80
|
+
# @param account_id [String] account id ID
|
|
81
|
+
# @param board_id [String] board id ID
|
|
82
|
+
# @return [void]
|
|
83
|
+
def unpublish_board(account_id:, board_id:)
|
|
84
|
+
with_operation(service: "boards", operation: "UnpublishBoard", is_mutation: true, resource_id: board_id) do
|
|
85
|
+
http_delete("/#{account_id}/boards/#{board_id}/publication.json")
|
|
86
|
+
nil
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fizzy
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Cards operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class CardsService < BaseService
|
|
9
|
+
|
|
10
|
+
# list_closed_cards operation
|
|
11
|
+
# @param account_id [String] account id ID
|
|
12
|
+
# @param board_id [String] board id ID
|
|
13
|
+
# @return [Enumerator<Hash>] paginated results
|
|
14
|
+
def list_closed_cards(account_id:, board_id:)
|
|
15
|
+
wrap_paginated(service: "cards", operation: "ListClosedCards", is_mutation: false, resource_id: board_id) do
|
|
16
|
+
paginate("/#{account_id}/boards/#{board_id}/columns/closed.json")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# list_postponed_cards operation
|
|
21
|
+
# @param account_id [String] account id ID
|
|
22
|
+
# @param board_id [String] board id ID
|
|
23
|
+
# @return [Enumerator<Hash>] paginated results
|
|
24
|
+
def list_postponed_cards(account_id:, board_id:)
|
|
25
|
+
wrap_paginated(service: "cards", operation: "ListPostponedCards", is_mutation: false, resource_id: board_id) do
|
|
26
|
+
paginate("/#{account_id}/boards/#{board_id}/columns/not_now.json")
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# list_stream_cards operation
|
|
31
|
+
# @param account_id [String] account id ID
|
|
32
|
+
# @param board_id [String] board id ID
|
|
33
|
+
# @return [Enumerator<Hash>] paginated results
|
|
34
|
+
def list_stream_cards(account_id:, board_id:)
|
|
35
|
+
wrap_paginated(service: "cards", operation: "ListStreamCards", is_mutation: false, resource_id: board_id) do
|
|
36
|
+
paginate("/#{account_id}/boards/#{board_id}/columns/stream.json")
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# list operation
|
|
41
|
+
# @param account_id [String] account id ID
|
|
42
|
+
# @param board_id [String, nil] board id
|
|
43
|
+
# @param column_id [String, nil] column id
|
|
44
|
+
# @param assignee_id [String, nil] assignee id
|
|
45
|
+
# @param tag [String, nil] tag
|
|
46
|
+
# @param status [String, nil] status
|
|
47
|
+
# @param q [String, nil] q
|
|
48
|
+
# @return [Enumerator<Hash>] paginated results
|
|
49
|
+
def list(account_id:, board_id: nil, column_id: nil, assignee_id: nil, tag: nil, status: nil, q: nil)
|
|
50
|
+
wrap_paginated(service: "cards", operation: "ListCards", is_mutation: false, resource_id: account_id) do
|
|
51
|
+
params = compact_params(board_id: board_id, column_id: column_id, assignee_id: assignee_id, tag: tag, status: status, q: q)
|
|
52
|
+
paginate("/#{account_id}/cards.json", params: params)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# create operation
|
|
57
|
+
# @param account_id [String] account id ID
|
|
58
|
+
# @param title [String] title
|
|
59
|
+
# @param board_id [String, nil] board id
|
|
60
|
+
# @param column_id [String, nil] column id
|
|
61
|
+
# @param description [String, nil] description
|
|
62
|
+
# @param assignee_ids [Array, nil] assignee ids
|
|
63
|
+
# @param tag_names [Array, nil] tag names
|
|
64
|
+
# @param image [String, nil] image
|
|
65
|
+
# @param created_at [String, nil] created at
|
|
66
|
+
# @param last_active_at [String, nil] last active at
|
|
67
|
+
# @return [Hash] response data
|
|
68
|
+
def create(account_id:, title:, board_id: nil, column_id: nil, description: nil, assignee_ids: nil, tag_names: nil, image: nil, created_at: nil, last_active_at: nil)
|
|
69
|
+
with_operation(service: "cards", operation: "CreateCard", is_mutation: true, resource_id: account_id) do
|
|
70
|
+
http_post("/#{account_id}/cards.json", body: compact_params(title: title, board_id: board_id, column_id: column_id, description: description, assignee_ids: assignee_ids, tag_names: tag_names, image: image, created_at: created_at, last_active_at: last_active_at)).json
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# get operation
|
|
75
|
+
# @param account_id [String] account id ID
|
|
76
|
+
# @param card_number [Integer] card number ID
|
|
77
|
+
# @return [Hash] response data
|
|
78
|
+
def get(account_id:, card_number:)
|
|
79
|
+
with_operation(service: "cards", operation: "GetCard", is_mutation: false, resource_id: card_number) do
|
|
80
|
+
http_get("/#{account_id}/cards/#{card_number}").json
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# update operation
|
|
85
|
+
# @param account_id [String] account id ID
|
|
86
|
+
# @param card_number [Integer] card number ID
|
|
87
|
+
# @param title [String, nil] title
|
|
88
|
+
# @param description [String, nil] description
|
|
89
|
+
# @param column_id [String, nil] column id
|
|
90
|
+
# @param image [String, nil] image
|
|
91
|
+
# @param created_at [String, nil] created at
|
|
92
|
+
# @return [Hash] response data
|
|
93
|
+
def update(account_id:, card_number:, title: nil, description: nil, column_id: nil, image: nil, created_at: nil)
|
|
94
|
+
with_operation(service: "cards", operation: "UpdateCard", is_mutation: true, resource_id: card_number) do
|
|
95
|
+
http_patch("/#{account_id}/cards/#{card_number}", body: compact_params(title: title, description: description, column_id: column_id, image: image, created_at: created_at)).json
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# delete operation
|
|
100
|
+
# @param account_id [String] account id ID
|
|
101
|
+
# @param card_number [Integer] card number ID
|
|
102
|
+
# @return [void]
|
|
103
|
+
def delete(account_id:, card_number:)
|
|
104
|
+
with_operation(service: "cards", operation: "DeleteCard", is_mutation: true, resource_id: card_number) do
|
|
105
|
+
http_delete("/#{account_id}/cards/#{card_number}")
|
|
106
|
+
nil
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# assign operation
|
|
111
|
+
# @param account_id [String] account id ID
|
|
112
|
+
# @param card_number [Integer] card number ID
|
|
113
|
+
# @param assignee_id [String] assignee id
|
|
114
|
+
# @return [void]
|
|
115
|
+
def assign(account_id:, card_number:, assignee_id:)
|
|
116
|
+
with_operation(service: "cards", operation: "AssignCard", is_mutation: true, resource_id: card_number) do
|
|
117
|
+
http_post("/#{account_id}/cards/#{card_number}/assignments.json", body: compact_params(assignee_id: assignee_id))
|
|
118
|
+
nil
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# move operation
|
|
123
|
+
# @param account_id [String] account id ID
|
|
124
|
+
# @param card_number [Integer] card number ID
|
|
125
|
+
# @param board_id [String] board id
|
|
126
|
+
# @param column_id [String, nil] column id
|
|
127
|
+
# @return [Hash] response data
|
|
128
|
+
def move(account_id:, card_number:, board_id:, column_id: nil)
|
|
129
|
+
with_operation(service: "cards", operation: "MoveCard", is_mutation: true, resource_id: card_number) do
|
|
130
|
+
http_patch("/#{account_id}/cards/#{card_number}/board.json", body: compact_params(board_id: board_id, column_id: column_id)).json
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# close operation
|
|
135
|
+
# @param account_id [String] account id ID
|
|
136
|
+
# @param card_number [Integer] card number ID
|
|
137
|
+
# @return [void]
|
|
138
|
+
def close(account_id:, card_number:)
|
|
139
|
+
with_operation(service: "cards", operation: "CloseCard", is_mutation: true, resource_id: card_number) do
|
|
140
|
+
http_post("/#{account_id}/cards/#{card_number}/closure.json", retryable: true)
|
|
141
|
+
nil
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# reopen operation
|
|
146
|
+
# @param account_id [String] account id ID
|
|
147
|
+
# @param card_number [Integer] card number ID
|
|
148
|
+
# @return [void]
|
|
149
|
+
def reopen(account_id:, card_number:)
|
|
150
|
+
with_operation(service: "cards", operation: "ReopenCard", is_mutation: true, resource_id: card_number) do
|
|
151
|
+
http_delete("/#{account_id}/cards/#{card_number}/closure.json")
|
|
152
|
+
nil
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# gold operation
|
|
157
|
+
# @param account_id [String] account id ID
|
|
158
|
+
# @param card_number [Integer] card number ID
|
|
159
|
+
# @return [void]
|
|
160
|
+
def gold(account_id:, card_number:)
|
|
161
|
+
with_operation(service: "cards", operation: "GoldCard", is_mutation: true, resource_id: card_number) do
|
|
162
|
+
http_post("/#{account_id}/cards/#{card_number}/goldness.json", retryable: true)
|
|
163
|
+
nil
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# ungold operation
|
|
168
|
+
# @param account_id [String] account id ID
|
|
169
|
+
# @param card_number [Integer] card number ID
|
|
170
|
+
# @return [void]
|
|
171
|
+
def ungold(account_id:, card_number:)
|
|
172
|
+
with_operation(service: "cards", operation: "UngoldCard", is_mutation: true, resource_id: card_number) do
|
|
173
|
+
http_delete("/#{account_id}/cards/#{card_number}/goldness.json")
|
|
174
|
+
nil
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# delete_image operation
|
|
179
|
+
# @param account_id [String] account id ID
|
|
180
|
+
# @param card_number [Integer] card number ID
|
|
181
|
+
# @return [void]
|
|
182
|
+
def delete_image(account_id:, card_number:)
|
|
183
|
+
with_operation(service: "cards", operation: "DeleteCardImage", is_mutation: true, resource_id: card_number) do
|
|
184
|
+
http_delete("/#{account_id}/cards/#{card_number}/image.json")
|
|
185
|
+
nil
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# postpone operation
|
|
190
|
+
# @param account_id [String] account id ID
|
|
191
|
+
# @param card_number [Integer] card number ID
|
|
192
|
+
# @return [void]
|
|
193
|
+
def postpone(account_id:, card_number:)
|
|
194
|
+
with_operation(service: "cards", operation: "PostponeCard", is_mutation: true, resource_id: card_number) do
|
|
195
|
+
http_post("/#{account_id}/cards/#{card_number}/not_now.json", retryable: true)
|
|
196
|
+
nil
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# pin operation
|
|
201
|
+
# @param account_id [String] account id ID
|
|
202
|
+
# @param card_number [Integer] card number ID
|
|
203
|
+
# @return [void]
|
|
204
|
+
def pin(account_id:, card_number:)
|
|
205
|
+
with_operation(service: "cards", operation: "PinCard", is_mutation: true, resource_id: card_number) do
|
|
206
|
+
http_post("/#{account_id}/cards/#{card_number}/pin.json", retryable: true)
|
|
207
|
+
nil
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# unpin operation
|
|
212
|
+
# @param account_id [String] account id ID
|
|
213
|
+
# @param card_number [Integer] card number ID
|
|
214
|
+
# @return [void]
|
|
215
|
+
def unpin(account_id:, card_number:)
|
|
216
|
+
with_operation(service: "cards", operation: "UnpinCard", is_mutation: true, resource_id: card_number) do
|
|
217
|
+
http_delete("/#{account_id}/cards/#{card_number}/pin.json")
|
|
218
|
+
nil
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# publish_card operation
|
|
223
|
+
# @param account_id [String] account id ID
|
|
224
|
+
# @param card_number [Integer] card number ID
|
|
225
|
+
# @return [void]
|
|
226
|
+
def publish_card(account_id:, card_number:)
|
|
227
|
+
with_operation(service: "cards", operation: "PublishCard", is_mutation: true, resource_id: card_number) do
|
|
228
|
+
http_post("/#{account_id}/cards/#{card_number}/publish.json")
|
|
229
|
+
nil
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# self_assign operation
|
|
234
|
+
# @param account_id [String] account id ID
|
|
235
|
+
# @param card_number [Integer] card number ID
|
|
236
|
+
# @return [void]
|
|
237
|
+
def self_assign(account_id:, card_number:)
|
|
238
|
+
with_operation(service: "cards", operation: "SelfAssignCard", is_mutation: true, resource_id: card_number) do
|
|
239
|
+
http_post("/#{account_id}/cards/#{card_number}/self_assignment.json")
|
|
240
|
+
nil
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# tag operation
|
|
245
|
+
# @param account_id [String] account id ID
|
|
246
|
+
# @param card_number [Integer] card number ID
|
|
247
|
+
# @param tag_title [String] tag title
|
|
248
|
+
# @return [void]
|
|
249
|
+
def tag(account_id:, card_number:, tag_title:)
|
|
250
|
+
with_operation(service: "cards", operation: "TagCard", is_mutation: true, resource_id: card_number) do
|
|
251
|
+
http_post("/#{account_id}/cards/#{card_number}/taggings.json", body: compact_params(tag_title: tag_title))
|
|
252
|
+
nil
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# triage operation
|
|
257
|
+
# @param account_id [String] account id ID
|
|
258
|
+
# @param card_number [Integer] card number ID
|
|
259
|
+
# @param column_id [String, nil] column id
|
|
260
|
+
# @return [void]
|
|
261
|
+
def triage(account_id:, card_number:, column_id: nil)
|
|
262
|
+
with_operation(service: "cards", operation: "TriageCard", is_mutation: true, resource_id: card_number) do
|
|
263
|
+
http_post("/#{account_id}/cards/#{card_number}/triage.json", body: compact_params(column_id: column_id), retryable: true)
|
|
264
|
+
nil
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# untriage operation
|
|
269
|
+
# @param account_id [String] account id ID
|
|
270
|
+
# @param card_number [Integer] card number ID
|
|
271
|
+
# @return [void]
|
|
272
|
+
def untriage(account_id:, card_number:)
|
|
273
|
+
with_operation(service: "cards", operation: "UnTriageCard", is_mutation: true, resource_id: card_number) do
|
|
274
|
+
http_delete("/#{account_id}/cards/#{card_number}/triage.json")
|
|
275
|
+
nil
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# watch operation
|
|
280
|
+
# @param account_id [String] account id ID
|
|
281
|
+
# @param card_number [Integer] card number ID
|
|
282
|
+
# @return [void]
|
|
283
|
+
def watch(account_id:, card_number:)
|
|
284
|
+
with_operation(service: "cards", operation: "WatchCard", is_mutation: true, resource_id: card_number) do
|
|
285
|
+
http_post("/#{account_id}/cards/#{card_number}/watch.json", retryable: true)
|
|
286
|
+
nil
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# unwatch operation
|
|
291
|
+
# @param account_id [String] account id ID
|
|
292
|
+
# @param card_number [Integer] card number ID
|
|
293
|
+
# @return [void]
|
|
294
|
+
def unwatch(account_id:, card_number:)
|
|
295
|
+
with_operation(service: "cards", operation: "UnwatchCard", is_mutation: true, resource_id: card_number) do
|
|
296
|
+
http_delete("/#{account_id}/cards/#{card_number}/watch.json")
|
|
297
|
+
nil
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# search_cards operation
|
|
302
|
+
# @param account_id [String] account id ID
|
|
303
|
+
# @param q [String] q
|
|
304
|
+
# @return [Enumerator<Hash>] paginated results
|
|
305
|
+
def search_cards(account_id:, q:)
|
|
306
|
+
wrap_paginated(service: "cards", operation: "SearchCards", is_mutation: false, resource_id: account_id) do
|
|
307
|
+
params = compact_params(q: q)
|
|
308
|
+
paginate("/#{account_id}/search.json", params: params)
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fizzy
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Columns operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class ColumnsService < BaseService
|
|
9
|
+
|
|
10
|
+
# list operation
|
|
11
|
+
# @param account_id [String] account id ID
|
|
12
|
+
# @param board_id [String] board id ID
|
|
13
|
+
# @return [Hash] response data
|
|
14
|
+
def list(account_id:, board_id:)
|
|
15
|
+
with_operation(service: "columns", operation: "ListColumns", is_mutation: false, resource_id: board_id) do
|
|
16
|
+
http_get("/#{account_id}/boards/#{board_id}/columns.json").json
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# create operation
|
|
21
|
+
# @param account_id [String] account id ID
|
|
22
|
+
# @param board_id [String] board id ID
|
|
23
|
+
# @param name [String] name
|
|
24
|
+
# @param color [String, nil] color
|
|
25
|
+
# @return [Hash] response data
|
|
26
|
+
def create(account_id:, board_id:, name:, color: nil)
|
|
27
|
+
with_operation(service: "columns", operation: "CreateColumn", is_mutation: true, resource_id: board_id) do
|
|
28
|
+
http_post("/#{account_id}/boards/#{board_id}/columns.json", body: compact_params(name: name, color: color)).json
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# get operation
|
|
33
|
+
# @param account_id [String] account id ID
|
|
34
|
+
# @param board_id [String] board id ID
|
|
35
|
+
# @param column_id [String] column id ID
|
|
36
|
+
# @return [Hash] response data
|
|
37
|
+
def get(account_id:, board_id:, column_id:)
|
|
38
|
+
with_operation(service: "columns", operation: "GetColumn", is_mutation: false, resource_id: column_id) do
|
|
39
|
+
http_get("/#{account_id}/boards/#{board_id}/columns/#{column_id}").json
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# update operation
|
|
44
|
+
# @param account_id [String] account id ID
|
|
45
|
+
# @param board_id [String] board id ID
|
|
46
|
+
# @param column_id [String] column id ID
|
|
47
|
+
# @param name [String, nil] name
|
|
48
|
+
# @param color [String, nil] color
|
|
49
|
+
# @return [Hash] response data
|
|
50
|
+
def update(account_id:, board_id:, column_id:, name: nil, color: nil)
|
|
51
|
+
with_operation(service: "columns", operation: "UpdateColumn", is_mutation: true, resource_id: column_id) do
|
|
52
|
+
http_patch("/#{account_id}/boards/#{board_id}/columns/#{column_id}", body: compact_params(name: name, color: color)).json
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# delete operation
|
|
57
|
+
# @param account_id [String] account id ID
|
|
58
|
+
# @param board_id [String] board id ID
|
|
59
|
+
# @param column_id [String] column id ID
|
|
60
|
+
# @return [void]
|
|
61
|
+
def delete(account_id:, board_id:, column_id:)
|
|
62
|
+
with_operation(service: "columns", operation: "DeleteColumn", is_mutation: true, resource_id: column_id) do
|
|
63
|
+
http_delete("/#{account_id}/boards/#{board_id}/columns/#{column_id}")
|
|
64
|
+
nil
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fizzy
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Comments operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class CommentsService < BaseService
|
|
9
|
+
|
|
10
|
+
# list operation
|
|
11
|
+
# @param account_id [String] account id ID
|
|
12
|
+
# @param card_number [Integer] card number ID
|
|
13
|
+
# @return [Enumerator<Hash>] paginated results
|
|
14
|
+
def list(account_id:, card_number:)
|
|
15
|
+
wrap_paginated(service: "comments", operation: "ListComments", is_mutation: false, resource_id: card_number) do
|
|
16
|
+
paginate("/#{account_id}/cards/#{card_number}/comments.json")
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# create operation
|
|
21
|
+
# @param account_id [String] account id ID
|
|
22
|
+
# @param card_number [Integer] card number ID
|
|
23
|
+
# @param body [String] body
|
|
24
|
+
# @param created_at [String, nil] created at
|
|
25
|
+
# @return [Hash] response data
|
|
26
|
+
def create(account_id:, card_number:, body:, created_at: nil)
|
|
27
|
+
with_operation(service: "comments", operation: "CreateComment", is_mutation: true, resource_id: card_number) do
|
|
28
|
+
http_post("/#{account_id}/cards/#{card_number}/comments.json", body: compact_params(body: body, created_at: created_at)).json
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# get operation
|
|
33
|
+
# @param account_id [String] account id ID
|
|
34
|
+
# @param card_number [Integer] card number ID
|
|
35
|
+
# @param comment_id [String] comment id ID
|
|
36
|
+
# @return [Hash] response data
|
|
37
|
+
def get(account_id:, card_number:, comment_id:)
|
|
38
|
+
with_operation(service: "comments", operation: "GetComment", is_mutation: false, resource_id: comment_id) do
|
|
39
|
+
http_get("/#{account_id}/cards/#{card_number}/comments/#{comment_id}").json
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# update operation
|
|
44
|
+
# @param account_id [String] account id ID
|
|
45
|
+
# @param card_number [Integer] card number ID
|
|
46
|
+
# @param comment_id [String] comment id ID
|
|
47
|
+
# @param body [String] body
|
|
48
|
+
# @return [Hash] response data
|
|
49
|
+
def update(account_id:, card_number:, comment_id:, body:)
|
|
50
|
+
with_operation(service: "comments", operation: "UpdateComment", is_mutation: true, resource_id: comment_id) do
|
|
51
|
+
http_patch("/#{account_id}/cards/#{card_number}/comments/#{comment_id}", body: compact_params(body: body)).json
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# delete operation
|
|
56
|
+
# @param account_id [String] account id ID
|
|
57
|
+
# @param card_number [Integer] card number ID
|
|
58
|
+
# @param comment_id [String] comment id ID
|
|
59
|
+
# @return [void]
|
|
60
|
+
def delete(account_id:, card_number:, comment_id:)
|
|
61
|
+
with_operation(service: "comments", operation: "DeleteComment", is_mutation: true, resource_id: comment_id) do
|
|
62
|
+
http_delete("/#{account_id}/cards/#{card_number}/comments/#{comment_id}")
|
|
63
|
+
nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fizzy
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Devices operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class DevicesService < BaseService
|
|
9
|
+
|
|
10
|
+
# register operation
|
|
11
|
+
# @param account_id [String] account id ID
|
|
12
|
+
# @param token [String] token
|
|
13
|
+
# @param platform [String] platform
|
|
14
|
+
# @param name [String, nil] name
|
|
15
|
+
# @return [void]
|
|
16
|
+
def register(account_id:, token:, platform:, name: nil)
|
|
17
|
+
with_operation(service: "devices", operation: "RegisterDevice", is_mutation: true, resource_id: account_id) do
|
|
18
|
+
http_post("/#{account_id}/devices", body: compact_params(token: token, platform: platform, name: name))
|
|
19
|
+
nil
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# unregister operation
|
|
24
|
+
# @param account_id [String] account id ID
|
|
25
|
+
# @param device_token [String] device token ID
|
|
26
|
+
# @return [void]
|
|
27
|
+
def unregister(account_id:, device_token:)
|
|
28
|
+
with_operation(service: "devices", operation: "UnregisterDevice", is_mutation: true, resource_id: device_token) do
|
|
29
|
+
http_delete("/#{account_id}/devices/#{device_token}")
|
|
30
|
+
nil
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fizzy
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Identity operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class IdentityService < BaseService
|
|
9
|
+
|
|
10
|
+
# me operation
|
|
11
|
+
# @return [Hash] response data
|
|
12
|
+
def me()
|
|
13
|
+
with_operation(service: "identity", operation: "GetMyIdentity", is_mutation: false) do
|
|
14
|
+
http_get("/my/identity.json").json
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|