ittybit 0.8.6 → 0.8.7
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 +4 -4
- data/lib/ittybit/automations/client.rb +12 -10
- data/lib/ittybit/files/client.rb +12 -10
- data/lib/ittybit/media/client.rb +12 -10
- data/lib/ittybit/tasks/client.rb +8 -6
- data/lib/ittybit.rb +2 -2
- data/lib/requests.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6e6b9e76d03fdbbaa03524ff3046be278eba109ebc3d37361ceff2dc4be3268
|
4
|
+
data.tar.gz: 3ad3d4f98cf9f50775aee331375229b2c6557078cc005f4310baff5f3e8d9ea2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bf316682be01b4b9abd5bb6598d61609f437fdc59a95fa29e0c836233e5e740f162ddc9c13a44c5f98829246d8d649d3a66d531b9b326b9d623ebb01fbc55af
|
7
|
+
data.tar.gz: d0f5c768748f9fd10127663e05160a86243326874409d0e3541b559706d1c41357cb54e57c10b8a4868472c65fc8d140c9c30161073d5b475369b96ed6833b36
|
@@ -24,6 +24,7 @@ module Ittybit
|
|
24
24
|
|
25
25
|
# Retrieves a paginated list of all automations for the current project
|
26
26
|
#
|
27
|
+
# @param page [Integer]
|
27
28
|
# @param limit [Integer]
|
28
29
|
# @param request_options [Ittybit::RequestOptions]
|
29
30
|
# @return [Ittybit::AutomationListResponse]
|
@@ -34,7 +35,7 @@ module Ittybit
|
|
34
35
|
# token: "YOUR_AUTH_TOKEN"
|
35
36
|
# )
|
36
37
|
# api.automations.list
|
37
|
-
def list(limit: nil, request_options: nil)
|
38
|
+
def list(page: nil, limit: nil, request_options: nil)
|
38
39
|
response = @request_client.conn.get do |req|
|
39
40
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
40
41
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -44,7 +45,7 @@ module Ittybit
|
|
44
45
|
**@request_client.get_headers,
|
45
46
|
**(request_options&.additional_headers || {})
|
46
47
|
}.compact
|
47
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
48
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
48
49
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
49
50
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
50
51
|
end
|
@@ -117,7 +118,7 @@ module Ittybit
|
|
117
118
|
# environment: Ittybit::Environment::DEFAULT,
|
118
119
|
# token: "YOUR_AUTH_TOKEN"
|
119
120
|
# )
|
120
|
-
# api.automations.get(id: "
|
121
|
+
# api.automations.get(id: "auto_abcdefgh1234")
|
121
122
|
def get(id:, request_options: nil)
|
122
123
|
response = @request_client.conn.get do |req|
|
123
124
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -150,7 +151,7 @@ module Ittybit
|
|
150
151
|
# environment: Ittybit::Environment::DEFAULT,
|
151
152
|
# token: "YOUR_AUTH_TOKEN"
|
152
153
|
# )
|
153
|
-
# api.automations.delete(id: "
|
154
|
+
# api.automations.delete(id: "auto_abcdefgh1234")
|
154
155
|
def delete(id:, request_options: nil)
|
155
156
|
response = @request_client.conn.delete do |req|
|
156
157
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -195,7 +196,7 @@ module Ittybit
|
|
195
196
|
# token: "YOUR_AUTH_TOKEN"
|
196
197
|
# )
|
197
198
|
# api.automations.update(
|
198
|
-
# id: "
|
199
|
+
# id: "auto_abcdefgh1234",
|
199
200
|
# name: "My Updated Automation",
|
200
201
|
# workflow: [{ kind: NSFW }, { kind: DESCRIPTION }, { kind: IMAGE, ref: "big_thumbnail" }, { kind: VIDEO, next_: [{ kind: "subtitle", ref: "subtitle" }] }],
|
201
202
|
# status: ACTIVE
|
@@ -239,6 +240,7 @@ module Ittybit
|
|
239
240
|
|
240
241
|
# Retrieves a paginated list of all automations for the current project
|
241
242
|
#
|
243
|
+
# @param page [Integer]
|
242
244
|
# @param limit [Integer]
|
243
245
|
# @param request_options [Ittybit::RequestOptions]
|
244
246
|
# @return [Ittybit::AutomationListResponse]
|
@@ -249,7 +251,7 @@ module Ittybit
|
|
249
251
|
# token: "YOUR_AUTH_TOKEN"
|
250
252
|
# )
|
251
253
|
# api.automations.list
|
252
|
-
def list(limit: nil, request_options: nil)
|
254
|
+
def list(page: nil, limit: nil, request_options: nil)
|
253
255
|
Async do
|
254
256
|
response = @request_client.conn.get do |req|
|
255
257
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -260,7 +262,7 @@ module Ittybit
|
|
260
262
|
**@request_client.get_headers,
|
261
263
|
**(request_options&.additional_headers || {})
|
262
264
|
}.compact
|
263
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
265
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
264
266
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
265
267
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
266
268
|
end
|
@@ -336,7 +338,7 @@ module Ittybit
|
|
336
338
|
# environment: Ittybit::Environment::DEFAULT,
|
337
339
|
# token: "YOUR_AUTH_TOKEN"
|
338
340
|
# )
|
339
|
-
# api.automations.get(id: "
|
341
|
+
# api.automations.get(id: "auto_abcdefgh1234")
|
340
342
|
def get(id:, request_options: nil)
|
341
343
|
Async do
|
342
344
|
response = @request_client.conn.get do |req|
|
@@ -371,7 +373,7 @@ module Ittybit
|
|
371
373
|
# environment: Ittybit::Environment::DEFAULT,
|
372
374
|
# token: "YOUR_AUTH_TOKEN"
|
373
375
|
# )
|
374
|
-
# api.automations.delete(id: "
|
376
|
+
# api.automations.delete(id: "auto_abcdefgh1234")
|
375
377
|
def delete(id:, request_options: nil)
|
376
378
|
Async do
|
377
379
|
response = @request_client.conn.delete do |req|
|
@@ -418,7 +420,7 @@ module Ittybit
|
|
418
420
|
# token: "YOUR_AUTH_TOKEN"
|
419
421
|
# )
|
420
422
|
# api.automations.update(
|
421
|
-
# id: "
|
423
|
+
# id: "auto_abcdefgh1234",
|
422
424
|
# name: "My Updated Automation",
|
423
425
|
# workflow: [{ kind: NSFW }, { kind: DESCRIPTION }, { kind: IMAGE, ref: "big_thumbnail" }, { kind: VIDEO, next_: [{ kind: "subtitle", ref: "subtitle" }] }],
|
424
426
|
# status: ACTIVE
|
data/lib/ittybit/files/client.rb
CHANGED
@@ -19,6 +19,7 @@ module Ittybit
|
|
19
19
|
|
20
20
|
# Retrieves a paginated list of all files associated with the current project.
|
21
21
|
#
|
22
|
+
# @param page [Integer]
|
22
23
|
# @param limit [Integer]
|
23
24
|
# @param request_options [Ittybit::RequestOptions]
|
24
25
|
# @return [Ittybit::FileListResponse]
|
@@ -29,7 +30,7 @@ module Ittybit
|
|
29
30
|
# token: "YOUR_AUTH_TOKEN"
|
30
31
|
# )
|
31
32
|
# api.files.list
|
32
|
-
def list(limit: nil, request_options: nil)
|
33
|
+
def list(page: nil, limit: nil, request_options: nil)
|
33
34
|
response = @request_client.conn.get do |req|
|
34
35
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
35
36
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -39,7 +40,7 @@ module Ittybit
|
|
39
40
|
**@request_client.get_headers,
|
40
41
|
**(request_options&.additional_headers || {})
|
41
42
|
}.compact
|
42
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
43
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
43
44
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
44
45
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
45
46
|
end
|
@@ -108,7 +109,7 @@ module Ittybit
|
|
108
109
|
# environment: Ittybit::Environment::DEFAULT,
|
109
110
|
# token: "YOUR_AUTH_TOKEN"
|
110
111
|
# )
|
111
|
-
# api.files.get(id: "
|
112
|
+
# api.files.get(id: "file_abcdefgh1234")
|
112
113
|
def get(id:, request_options: nil)
|
113
114
|
response = @request_client.conn.get do |req|
|
114
115
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -141,7 +142,7 @@ module Ittybit
|
|
141
142
|
# environment: Ittybit::Environment::DEFAULT,
|
142
143
|
# token: "YOUR_AUTH_TOKEN"
|
143
144
|
# )
|
144
|
-
# api.files.delete(id: "
|
145
|
+
# api.files.delete(id: "file_abcdefgh1234")
|
145
146
|
def delete(id:, request_options: nil)
|
146
147
|
response = @request_client.conn.delete do |req|
|
147
148
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -180,7 +181,7 @@ module Ittybit
|
|
180
181
|
# token: "YOUR_AUTH_TOKEN"
|
181
182
|
# )
|
182
183
|
# api.files.update(
|
183
|
-
# id: "
|
184
|
+
# id: "file_abcdefgh1234",
|
184
185
|
# folder: "updated/folder",
|
185
186
|
# filename: "new_filename.mp4",
|
186
187
|
# metadata: { "customKey2": "a different custom value" }
|
@@ -223,6 +224,7 @@ module Ittybit
|
|
223
224
|
|
224
225
|
# Retrieves a paginated list of all files associated with the current project.
|
225
226
|
#
|
227
|
+
# @param page [Integer]
|
226
228
|
# @param limit [Integer]
|
227
229
|
# @param request_options [Ittybit::RequestOptions]
|
228
230
|
# @return [Ittybit::FileListResponse]
|
@@ -233,7 +235,7 @@ module Ittybit
|
|
233
235
|
# token: "YOUR_AUTH_TOKEN"
|
234
236
|
# )
|
235
237
|
# api.files.list
|
236
|
-
def list(limit: nil, request_options: nil)
|
238
|
+
def list(page: nil, limit: nil, request_options: nil)
|
237
239
|
Async do
|
238
240
|
response = @request_client.conn.get do |req|
|
239
241
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -244,7 +246,7 @@ module Ittybit
|
|
244
246
|
**@request_client.get_headers,
|
245
247
|
**(request_options&.additional_headers || {})
|
246
248
|
}.compact
|
247
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
249
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
248
250
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
249
251
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
250
252
|
end
|
@@ -316,7 +318,7 @@ module Ittybit
|
|
316
318
|
# environment: Ittybit::Environment::DEFAULT,
|
317
319
|
# token: "YOUR_AUTH_TOKEN"
|
318
320
|
# )
|
319
|
-
# api.files.get(id: "
|
321
|
+
# api.files.get(id: "file_abcdefgh1234")
|
320
322
|
def get(id:, request_options: nil)
|
321
323
|
Async do
|
322
324
|
response = @request_client.conn.get do |req|
|
@@ -351,7 +353,7 @@ module Ittybit
|
|
351
353
|
# environment: Ittybit::Environment::DEFAULT,
|
352
354
|
# token: "YOUR_AUTH_TOKEN"
|
353
355
|
# )
|
354
|
-
# api.files.delete(id: "
|
356
|
+
# api.files.delete(id: "file_abcdefgh1234")
|
355
357
|
def delete(id:, request_options: nil)
|
356
358
|
Async do
|
357
359
|
response = @request_client.conn.delete do |req|
|
@@ -392,7 +394,7 @@ module Ittybit
|
|
392
394
|
# token: "YOUR_AUTH_TOKEN"
|
393
395
|
# )
|
394
396
|
# api.files.update(
|
395
|
-
# id: "
|
397
|
+
# id: "file_abcdefgh1234",
|
396
398
|
# folder: "updated/folder",
|
397
399
|
# filename: "new_filename.mp4",
|
398
400
|
# metadata: { "customKey2": "a different custom value" }
|
data/lib/ittybit/media/client.rb
CHANGED
@@ -19,6 +19,7 @@ module Ittybit
|
|
19
19
|
|
20
20
|
# Retrieves a paginated list of all media for the current project
|
21
21
|
#
|
22
|
+
# @param page [Integer]
|
22
23
|
# @param limit [Integer]
|
23
24
|
# @param request_options [Ittybit::RequestOptions]
|
24
25
|
# @return [Ittybit::MediaListResponse]
|
@@ -29,7 +30,7 @@ module Ittybit
|
|
29
30
|
# token: "YOUR_AUTH_TOKEN"
|
30
31
|
# )
|
31
32
|
# api.media.list
|
32
|
-
def list(limit: nil, request_options: nil)
|
33
|
+
def list(page: nil, limit: nil, request_options: nil)
|
33
34
|
response = @request_client.conn.get do |req|
|
34
35
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
35
36
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -39,7 +40,7 @@ module Ittybit
|
|
39
40
|
**@request_client.get_headers,
|
40
41
|
**(request_options&.additional_headers || {})
|
41
42
|
}.compact
|
42
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
43
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
43
44
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
44
45
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
45
46
|
end
|
@@ -101,7 +102,7 @@ module Ittybit
|
|
101
102
|
# environment: Ittybit::Environment::DEFAULT,
|
102
103
|
# token: "YOUR_AUTH_TOKEN"
|
103
104
|
# )
|
104
|
-
# api.media.get(id: "
|
105
|
+
# api.media.get(id: "med_abcdefgh1234")
|
105
106
|
def get(id:, request_options: nil)
|
106
107
|
response = @request_client.conn.get do |req|
|
107
108
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -135,7 +136,7 @@ module Ittybit
|
|
135
136
|
# environment: Ittybit::Environment::DEFAULT,
|
136
137
|
# token: "YOUR_AUTH_TOKEN"
|
137
138
|
# )
|
138
|
-
# api.media.delete(id: "
|
139
|
+
# api.media.delete(id: "med_abcdefgh1234")
|
139
140
|
def delete(id:, request_options: nil)
|
140
141
|
response = @request_client.conn.delete do |req|
|
141
142
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -173,7 +174,7 @@ module Ittybit
|
|
173
174
|
# token: "YOUR_AUTH_TOKEN"
|
174
175
|
# )
|
175
176
|
# api.media.update(
|
176
|
-
# id: "
|
177
|
+
# id: "med_abcdefgh1234",
|
177
178
|
# title: "Updated Video Example",
|
178
179
|
# alt: "An updated example video used to demonstrate the ittybit API",
|
179
180
|
# metadata: { "customKey2": "a different custom value" }
|
@@ -215,6 +216,7 @@ module Ittybit
|
|
215
216
|
|
216
217
|
# Retrieves a paginated list of all media for the current project
|
217
218
|
#
|
219
|
+
# @param page [Integer]
|
218
220
|
# @param limit [Integer]
|
219
221
|
# @param request_options [Ittybit::RequestOptions]
|
220
222
|
# @return [Ittybit::MediaListResponse]
|
@@ -225,7 +227,7 @@ module Ittybit
|
|
225
227
|
# token: "YOUR_AUTH_TOKEN"
|
226
228
|
# )
|
227
229
|
# api.media.list
|
228
|
-
def list(limit: nil, request_options: nil)
|
230
|
+
def list(page: nil, limit: nil, request_options: nil)
|
229
231
|
Async do
|
230
232
|
response = @request_client.conn.get do |req|
|
231
233
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -236,7 +238,7 @@ module Ittybit
|
|
236
238
|
**@request_client.get_headers,
|
237
239
|
**(request_options&.additional_headers || {})
|
238
240
|
}.compact
|
239
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
241
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
240
242
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
241
243
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
242
244
|
end
|
@@ -301,7 +303,7 @@ module Ittybit
|
|
301
303
|
# environment: Ittybit::Environment::DEFAULT,
|
302
304
|
# token: "YOUR_AUTH_TOKEN"
|
303
305
|
# )
|
304
|
-
# api.media.get(id: "
|
306
|
+
# api.media.get(id: "med_abcdefgh1234")
|
305
307
|
def get(id:, request_options: nil)
|
306
308
|
Async do
|
307
309
|
response = @request_client.conn.get do |req|
|
@@ -337,7 +339,7 @@ module Ittybit
|
|
337
339
|
# environment: Ittybit::Environment::DEFAULT,
|
338
340
|
# token: "YOUR_AUTH_TOKEN"
|
339
341
|
# )
|
340
|
-
# api.media.delete(id: "
|
342
|
+
# api.media.delete(id: "med_abcdefgh1234")
|
341
343
|
def delete(id:, request_options: nil)
|
342
344
|
Async do
|
343
345
|
response = @request_client.conn.delete do |req|
|
@@ -377,7 +379,7 @@ module Ittybit
|
|
377
379
|
# token: "YOUR_AUTH_TOKEN"
|
378
380
|
# )
|
379
381
|
# api.media.update(
|
380
|
-
# id: "
|
382
|
+
# id: "med_abcdefgh1234",
|
381
383
|
# title: "Updated Video Example",
|
382
384
|
# alt: "An updated example video used to demonstrate the ittybit API",
|
383
385
|
# metadata: { "customKey2": "a different custom value" }
|
data/lib/ittybit/tasks/client.rb
CHANGED
@@ -17,6 +17,7 @@ module Ittybit
|
|
17
17
|
@request_client = request_client
|
18
18
|
end
|
19
19
|
|
20
|
+
# @param page [Integer]
|
20
21
|
# @param limit [Integer]
|
21
22
|
# @param request_options [Ittybit::RequestOptions]
|
22
23
|
# @return [Ittybit::TaskListResponse]
|
@@ -27,7 +28,7 @@ module Ittybit
|
|
27
28
|
# token: "YOUR_AUTH_TOKEN"
|
28
29
|
# )
|
29
30
|
# api.tasks.list
|
30
|
-
def list(limit: nil, request_options: nil)
|
31
|
+
def list(page: nil, limit: nil, request_options: nil)
|
31
32
|
response = @request_client.conn.get do |req|
|
32
33
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
33
34
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -37,7 +38,7 @@ module Ittybit
|
|
37
38
|
**@request_client.get_headers,
|
38
39
|
**(request_options&.additional_headers || {})
|
39
40
|
}.compact
|
40
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
41
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
41
42
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
42
43
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
43
44
|
end
|
@@ -89,7 +90,7 @@ module Ittybit
|
|
89
90
|
# environment: Ittybit::Environment::DEFAULT,
|
90
91
|
# token: "YOUR_AUTH_TOKEN"
|
91
92
|
# )
|
92
|
-
# api.tasks.get(id: "
|
93
|
+
# api.tasks.get(id: "task_abcdefgh1234")
|
93
94
|
def get(id:, request_options: nil)
|
94
95
|
response = @request_client.conn.get do |req|
|
95
96
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -154,6 +155,7 @@ module Ittybit
|
|
154
155
|
@request_client = request_client
|
155
156
|
end
|
156
157
|
|
158
|
+
# @param page [Integer]
|
157
159
|
# @param limit [Integer]
|
158
160
|
# @param request_options [Ittybit::RequestOptions]
|
159
161
|
# @return [Ittybit::TaskListResponse]
|
@@ -164,7 +166,7 @@ module Ittybit
|
|
164
166
|
# token: "YOUR_AUTH_TOKEN"
|
165
167
|
# )
|
166
168
|
# api.tasks.list
|
167
|
-
def list(limit: nil, request_options: nil)
|
169
|
+
def list(page: nil, limit: nil, request_options: nil)
|
168
170
|
Async do
|
169
171
|
response = @request_client.conn.get do |req|
|
170
172
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -175,7 +177,7 @@ module Ittybit
|
|
175
177
|
**@request_client.get_headers,
|
176
178
|
**(request_options&.additional_headers || {})
|
177
179
|
}.compact
|
178
|
-
req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
|
180
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "limit": limit }.compact
|
179
181
|
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
180
182
|
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
181
183
|
end
|
@@ -230,7 +232,7 @@ module Ittybit
|
|
230
232
|
# environment: Ittybit::Environment::DEFAULT,
|
231
233
|
# token: "YOUR_AUTH_TOKEN"
|
232
234
|
# )
|
233
|
-
# api.tasks.get(id: "
|
235
|
+
# api.tasks.get(id: "task_abcdefgh1234")
|
234
236
|
def get(id:, request_options: nil)
|
235
237
|
Async do
|
236
238
|
response = @request_client.conn.get do |req|
|
data/lib/ittybit.rb
CHANGED
@@ -27,7 +27,7 @@ module Ittybit
|
|
27
27
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
28
28
|
# @param timeout_in_seconds [Long]
|
29
29
|
# @param token [String]
|
30
|
-
# @param version [
|
30
|
+
# @param version [String]
|
31
31
|
# @return [Ittybit::Client]
|
32
32
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
33
33
|
timeout_in_seconds: nil, version: nil)
|
@@ -64,7 +64,7 @@ module Ittybit
|
|
64
64
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
65
65
|
# @param timeout_in_seconds [Long]
|
66
66
|
# @param token [String]
|
67
|
-
# @param version [
|
67
|
+
# @param version [String]
|
68
68
|
# @return [Ittybit::AsyncClient]
|
69
69
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
70
70
|
timeout_in_seconds: nil, version: nil)
|
data/lib/requests.rb
CHANGED
@@ -21,7 +21,7 @@ module Ittybit
|
|
21
21
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
22
22
|
# @param timeout_in_seconds [Long]
|
23
23
|
# @param token [String]
|
24
|
-
# @param version [
|
24
|
+
# @param version [String]
|
25
25
|
# @return [Ittybit::RequestClient]
|
26
26
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
27
27
|
timeout_in_seconds: nil, version: nil)
|
@@ -46,7 +46,7 @@ module Ittybit
|
|
46
46
|
|
47
47
|
# @return [Hash{String => String}]
|
48
48
|
def get_headers
|
49
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.8.
|
49
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.8.7" }
|
50
50
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
|
51
51
|
headers
|
52
52
|
end
|
@@ -67,7 +67,7 @@ module Ittybit
|
|
67
67
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
68
68
|
# @param timeout_in_seconds [Long]
|
69
69
|
# @param token [String]
|
70
|
-
# @param version [
|
70
|
+
# @param version [String]
|
71
71
|
# @return [Ittybit::AsyncRequestClient]
|
72
72
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
73
73
|
timeout_in_seconds: nil, version: nil)
|
@@ -93,7 +93,7 @@ module Ittybit
|
|
93
93
|
|
94
94
|
# @return [Hash{String => String}]
|
95
95
|
def get_headers
|
96
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.8.
|
96
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.8.7" }
|
97
97
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
|
98
98
|
headers
|
99
99
|
end
|
@@ -106,7 +106,7 @@ module Ittybit
|
|
106
106
|
attr_reader :base_url
|
107
107
|
# @return [String]
|
108
108
|
attr_reader :token
|
109
|
-
# @return [
|
109
|
+
# @return [String]
|
110
110
|
attr_reader :version
|
111
111
|
# @return [Hash{String => Object}]
|
112
112
|
attr_reader :additional_headers
|
@@ -119,7 +119,7 @@ module Ittybit
|
|
119
119
|
|
120
120
|
# @param base_url [String]
|
121
121
|
# @param token [String]
|
122
|
-
# @param version [
|
122
|
+
# @param version [String]
|
123
123
|
# @param additional_headers [Hash{String => Object}]
|
124
124
|
# @param additional_query_parameters [Hash{String => Object}]
|
125
125
|
# @param additional_body_parameters [Hash{String => Object}]
|
@@ -144,7 +144,7 @@ module Ittybit
|
|
144
144
|
attr_reader :base_url
|
145
145
|
# @return [String]
|
146
146
|
attr_reader :token
|
147
|
-
# @return [
|
147
|
+
# @return [String]
|
148
148
|
attr_reader :version
|
149
149
|
# @return [Hash{String => Object}]
|
150
150
|
attr_reader :additional_headers
|
@@ -157,7 +157,7 @@ module Ittybit
|
|
157
157
|
|
158
158
|
# @param base_url [String]
|
159
159
|
# @param token [String]
|
160
|
-
# @param version [
|
160
|
+
# @param version [String]
|
161
161
|
# @param additional_headers [Hash{String => Object}]
|
162
162
|
# @param additional_query_parameters [Hash{String => Object}]
|
163
163
|
# @param additional_body_parameters [Hash{String => Object}]
|