ittybit 0.7.6 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b244efadc944c3d3983943a53e62e0b553e21eb9e0717ff4a3ee1512f3879909
4
- data.tar.gz: f3736a908e119ee1324f616e07af8f63e4fdd5f0ac4447b6440990ece8fd7629
3
+ metadata.gz: 60b6f9eaf8ba438c86b11906591ad185931f0bb50617f05472350a5a5e745cc4
4
+ data.tar.gz: ab598d69391173fc1f981f1b0b1ee08d324c941431da6e4279e46dbfb97fe65e
5
5
  SHA512:
6
- metadata.gz: 50e7da1d6cfb20932674642060b296ac71aedc88cb7ff4fa821ce18775458168afb227792f3605b601dccd370b15943e136ddd7f2fed98fe70a900ead5b1215c
7
- data.tar.gz: c3038600b9d3973c045e1a7efa2e789bb15ba17b3ea3e5cab7b7681798634eb7d5c4c9b822d417599c6e034ed8a5e28affa1c29ee3779974ec45c8f48720b097
6
+ metadata.gz: 518a4daa7c1e1fad6d2dc5d558ff870faa15842b104ca8710d457f379989e23cd5a62505d8542a1902b6d1a97df7d21500b4b8e474b839b190b530a48736ce77
7
+ data.tar.gz: 896025ab3aaec1237044ca7b0001127a68803ed03dba50328cd081a0c4efb5b7330c62a1d6294bd1355feb3a3bc1bf8d394d898aa48c9768c6d5f648b4dff8a7
@@ -3,8 +3,10 @@
3
3
  require_relative "../../requests"
4
4
  require_relative "../types/automation_list_response"
5
5
  require_relative "../types/automation_response"
6
- require_relative "types/automations_update_request_trigger"
6
+ require_relative "../types/confirmation_response"
7
+ require_relative "types/update_automation_request_trigger"
7
8
  require_relative "../types/workflow_task_step"
9
+ require_relative "types/update_automation_request_status"
8
10
  require "async"
9
11
 
10
12
  module Ittybit
@@ -18,8 +20,9 @@ module Ittybit
18
20
  @request_client = request_client
19
21
  end
20
22
 
21
- # Retrieves a list of all automations for the current project
23
+ # Retrieves a paginated list of all automations for the current project
22
24
  #
25
+ # @param limit [Integer]
23
26
  # @param request_options [Ittybit::RequestOptions]
24
27
  # @return [Ittybit::AutomationListResponse]
25
28
  # @example
@@ -29,7 +32,7 @@ module Ittybit
29
32
  # token: "YOUR_AUTH_TOKEN"
30
33
  # )
31
34
  # api.automations.list
32
- def list(request_options: nil)
35
+ def list(limit: nil, request_options: nil)
33
36
  response = @request_client.conn.get do |req|
34
37
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
35
38
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
@@ -39,9 +42,7 @@ module Ittybit
39
42
  **@request_client.get_headers,
40
43
  **(request_options&.additional_headers || {})
41
44
  }.compact
42
- unless request_options.nil? || request_options&.additional_query_parameters.nil?
43
- req.params = { **(request_options&.additional_query_parameters || {}) }.compact
44
- end
45
+ req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
45
46
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
46
47
  req.body = { **(request_options&.additional_body_parameters || {}) }.compact
47
48
  end
@@ -50,7 +51,7 @@ module Ittybit
50
51
  Ittybit::AutomationListResponse.from_json(json_object: response.body)
51
52
  end
52
53
 
53
- # Creates a new automation for the current project
54
+ # Creates a new automation.
54
55
  #
55
56
  # @param request_options [Ittybit::RequestOptions]
56
57
  # @return [Ittybit::AutomationResponse]
@@ -82,7 +83,7 @@ module Ittybit
82
83
  Ittybit::AutomationResponse.from_json(json_object: response.body)
83
84
  end
84
85
 
85
- # Retrieves a specific automation by its ID
86
+ # Retrieve the automation object for a automation with the given ID.
86
87
  #
87
88
  # @param id [String]
88
89
  # @param request_options [Ittybit::RequestOptions]
@@ -115,43 +116,18 @@ module Ittybit
115
116
  Ittybit::AutomationResponse.from_json(json_object: response.body)
116
117
  end
117
118
 
118
- # Updates an existing automation by its ID
119
- #
120
119
  # @param id [String]
121
- # @param name [String]
122
- # @param description [String]
123
- # @param trigger [Hash] Defines the trigger event and conditions. To clear/remove a trigger, provide
124
- # null. To update, provide the new trigger object.Request of type Ittybit::Automations::AutomationsUpdateRequestTrigger, as a Hash
125
- # * :event (String)
126
- # * :conditions (Array<Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem>)
127
- # @param workflow [Array<Hash>] The updated sequence of tasks for the automation.Request of type Array<Ittybit::WorkflowTaskStep>, as a Hash
128
- # * :kind (Ittybit::WorkflowTaskStepKind)
129
- # * :ref (String)
130
- # * :format (String)
131
- # * :start (Float)
132
- # * :end_ (Float)
133
- # * :width (Integer)
134
- # * :height (Integer)
135
- # * :fit (String)
136
- # * :background (String)
137
- # * :quality (Integer)
138
- # * :next_ (Array<Object>)
139
120
  # @param request_options [Ittybit::RequestOptions]
140
- # @return [Ittybit::AutomationResponse]
121
+ # @return [Void]
141
122
  # @example
142
123
  # api = Ittybit::Client.new(
143
124
  # base_url: "https://api.example.com",
144
125
  # environment: Ittybit::Environment::DEFAULT,
145
126
  # token: "YOUR_AUTH_TOKEN"
146
127
  # )
147
- # api.automations.update(
148
- # id: "id",
149
- # name: "Updated Transcoder Example",
150
- # trigger: { event: "upload.completed", conditions: [{ prop: "file.type", value: "image/*" }] },
151
- # workflow: [{ kind: IMAGE, format: "webp" }]
152
- # )
153
- def update(id:, name:, description: nil, trigger: nil, workflow: nil, request_options: nil)
154
- response = @request_client.conn.put do |req|
128
+ # api.automations.update(id: "id")
129
+ def update(id:, request_options: nil)
130
+ @request_client.conn.put do |req|
155
131
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
156
132
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
157
133
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
@@ -163,23 +139,18 @@ module Ittybit
163
139
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
164
140
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
165
141
  end
166
- req.body = {
167
- **(request_options&.additional_body_parameters || {}),
168
- name: name,
169
- description: description,
170
- trigger: trigger,
171
- workflow: workflow
172
- }.compact
142
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
143
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
144
+ end
173
145
  req.url "#{@request_client.get_url(request_options: request_options)}/automations/#{id}"
174
146
  end
175
- Ittybit::AutomationResponse.from_json(json_object: response.body)
176
147
  end
177
148
 
178
- # Deletes an automation by its ID
149
+ # Permanently removes an automation from the system. This action cannot be undone.
179
150
  #
180
151
  # @param id [String]
181
152
  # @param request_options [Ittybit::RequestOptions]
182
- # @return [Void]
153
+ # @return [Ittybit::ConfirmationResponse]
183
154
  # @example
184
155
  # api = Ittybit::Client.new(
185
156
  # base_url: "https://api.example.com",
@@ -188,7 +159,7 @@ module Ittybit
188
159
  # )
189
160
  # api.automations.delete(id: "id")
190
161
  def delete(id:, request_options: nil)
191
- @request_client.conn.delete do |req|
162
+ response = @request_client.conn.delete do |req|
192
163
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
193
164
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
194
165
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
@@ -205,6 +176,62 @@ module Ittybit
205
176
  end
206
177
  req.url "#{@request_client.get_url(request_options: request_options)}/automations/#{id}"
207
178
  end
179
+ Ittybit::ConfirmationResponse.from_json(json_object: response.body)
180
+ end
181
+
182
+ # Updates an automation's `name`, `description`, `trigger`, `workflow`, or
183
+ # `status`. Only the specified fields will be updated.
184
+ #
185
+ # @param id [String]
186
+ # @param name [String]
187
+ # @param description [String]
188
+ # @param trigger [Hash] Request of type Ittybit::Automations::UpdateAutomationRequestTrigger, as a Hash
189
+ # * :kind (String)
190
+ # * :event (String)
191
+ # @param workflow [Array<Hash>] Request of type Array<Ittybit::WorkflowTaskStep>, as a Hash
192
+ # * :kind (Ittybit::WorkflowTaskStepKind)
193
+ # * :ref (String)
194
+ # * :next_ (Array<Ittybit::WorkflowTaskStepNextItem>)
195
+ # @param status [Ittybit::Automations::UpdateAutomationRequestStatus]
196
+ # @param request_options [Ittybit::RequestOptions]
197
+ # @return [Ittybit::AutomationResponse]
198
+ # @example
199
+ # api = Ittybit::Client.new(
200
+ # base_url: "https://api.example.com",
201
+ # environment: Ittybit::Environment::DEFAULT,
202
+ # token: "YOUR_AUTH_TOKEN"
203
+ # )
204
+ # api.automations.update_automation(
205
+ # id: "auto_abcdefgh1234",
206
+ # name: "My Updated Automation",
207
+ # workflow: [{ kind: NSFW }, { kind: DESCRIPTION }, { kind: IMAGE, ref: "big_thumbnail" }, { kind: CONDITIONS, next_: [{ kind: "subtitle", ref: "subtitle" }] }],
208
+ # status: ACTIVE
209
+ # )
210
+ def update_automation(id:, name: nil, description: nil, trigger: nil, workflow: nil, status: nil,
211
+ request_options: nil)
212
+ response = @request_client.conn.patch do |req|
213
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
214
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
215
+ req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
216
+ req.headers = {
217
+ **(req.headers || {}),
218
+ **@request_client.get_headers,
219
+ **(request_options&.additional_headers || {})
220
+ }.compact
221
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
222
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
223
+ end
224
+ req.body = {
225
+ **(request_options&.additional_body_parameters || {}),
226
+ name: name,
227
+ description: description,
228
+ trigger: trigger,
229
+ workflow: workflow,
230
+ status: status
231
+ }.compact
232
+ req.url "#{@request_client.get_url(request_options: request_options)}/automations/#{id}"
233
+ end
234
+ Ittybit::AutomationResponse.from_json(json_object: response.body)
208
235
  end
209
236
  end
210
237
 
@@ -218,8 +245,9 @@ module Ittybit
218
245
  @request_client = request_client
219
246
  end
220
247
 
221
- # Retrieves a list of all automations for the current project
248
+ # Retrieves a paginated list of all automations for the current project
222
249
  #
250
+ # @param limit [Integer]
223
251
  # @param request_options [Ittybit::RequestOptions]
224
252
  # @return [Ittybit::AutomationListResponse]
225
253
  # @example
@@ -229,7 +257,7 @@ module Ittybit
229
257
  # token: "YOUR_AUTH_TOKEN"
230
258
  # )
231
259
  # api.automations.list
232
- def list(request_options: nil)
260
+ def list(limit: nil, request_options: nil)
233
261
  Async do
234
262
  response = @request_client.conn.get do |req|
235
263
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -240,9 +268,7 @@ module Ittybit
240
268
  **@request_client.get_headers,
241
269
  **(request_options&.additional_headers || {})
242
270
  }.compact
243
- unless request_options.nil? || request_options&.additional_query_parameters.nil?
244
- req.params = { **(request_options&.additional_query_parameters || {}) }.compact
245
- end
271
+ req.params = { **(request_options&.additional_query_parameters || {}), "limit": limit }.compact
246
272
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
247
273
  req.body = { **(request_options&.additional_body_parameters || {}) }.compact
248
274
  end
@@ -252,7 +278,7 @@ module Ittybit
252
278
  end
253
279
  end
254
280
 
255
- # Creates a new automation for the current project
281
+ # Creates a new automation.
256
282
  #
257
283
  # @param request_options [Ittybit::RequestOptions]
258
284
  # @return [Ittybit::AutomationResponse]
@@ -286,7 +312,7 @@ module Ittybit
286
312
  end
287
313
  end
288
314
 
289
- # Retrieves a specific automation by its ID
315
+ # Retrieve the automation object for a automation with the given ID.
290
316
  #
291
317
  # @param id [String]
292
318
  # @param request_options [Ittybit::RequestOptions]
@@ -321,44 +347,19 @@ module Ittybit
321
347
  end
322
348
  end
323
349
 
324
- # Updates an existing automation by its ID
325
- #
326
350
  # @param id [String]
327
- # @param name [String]
328
- # @param description [String]
329
- # @param trigger [Hash] Defines the trigger event and conditions. To clear/remove a trigger, provide
330
- # null. To update, provide the new trigger object.Request of type Ittybit::Automations::AutomationsUpdateRequestTrigger, as a Hash
331
- # * :event (String)
332
- # * :conditions (Array<Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem>)
333
- # @param workflow [Array<Hash>] The updated sequence of tasks for the automation.Request of type Array<Ittybit::WorkflowTaskStep>, as a Hash
334
- # * :kind (Ittybit::WorkflowTaskStepKind)
335
- # * :ref (String)
336
- # * :format (String)
337
- # * :start (Float)
338
- # * :end_ (Float)
339
- # * :width (Integer)
340
- # * :height (Integer)
341
- # * :fit (String)
342
- # * :background (String)
343
- # * :quality (Integer)
344
- # * :next_ (Array<Object>)
345
351
  # @param request_options [Ittybit::RequestOptions]
346
- # @return [Ittybit::AutomationResponse]
352
+ # @return [Void]
347
353
  # @example
348
354
  # api = Ittybit::Client.new(
349
355
  # base_url: "https://api.example.com",
350
356
  # environment: Ittybit::Environment::DEFAULT,
351
357
  # token: "YOUR_AUTH_TOKEN"
352
358
  # )
353
- # api.automations.update(
354
- # id: "id",
355
- # name: "Updated Transcoder Example",
356
- # trigger: { event: "upload.completed", conditions: [{ prop: "file.type", value: "image/*" }] },
357
- # workflow: [{ kind: IMAGE, format: "webp" }]
358
- # )
359
- def update(id:, name:, description: nil, trigger: nil, workflow: nil, request_options: nil)
359
+ # api.automations.update(id: "id")
360
+ def update(id:, request_options: nil)
360
361
  Async do
361
- response = @request_client.conn.put do |req|
362
+ @request_client.conn.put do |req|
362
363
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
363
364
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
364
365
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
@@ -370,24 +371,19 @@ module Ittybit
370
371
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
371
372
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
372
373
  end
373
- req.body = {
374
- **(request_options&.additional_body_parameters || {}),
375
- name: name,
376
- description: description,
377
- trigger: trigger,
378
- workflow: workflow
379
- }.compact
374
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
375
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
376
+ end
380
377
  req.url "#{@request_client.get_url(request_options: request_options)}/automations/#{id}"
381
378
  end
382
- Ittybit::AutomationResponse.from_json(json_object: response.body)
383
379
  end
384
380
  end
385
381
 
386
- # Deletes an automation by its ID
382
+ # Permanently removes an automation from the system. This action cannot be undone.
387
383
  #
388
384
  # @param id [String]
389
385
  # @param request_options [Ittybit::RequestOptions]
390
- # @return [Void]
386
+ # @return [Ittybit::ConfirmationResponse]
391
387
  # @example
392
388
  # api = Ittybit::Client.new(
393
389
  # base_url: "https://api.example.com",
@@ -397,7 +393,7 @@ module Ittybit
397
393
  # api.automations.delete(id: "id")
398
394
  def delete(id:, request_options: nil)
399
395
  Async do
400
- @request_client.conn.delete do |req|
396
+ response = @request_client.conn.delete do |req|
401
397
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
402
398
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
403
399
  req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
@@ -414,6 +410,64 @@ module Ittybit
414
410
  end
415
411
  req.url "#{@request_client.get_url(request_options: request_options)}/automations/#{id}"
416
412
  end
413
+ Ittybit::ConfirmationResponse.from_json(json_object: response.body)
414
+ end
415
+ end
416
+
417
+ # Updates an automation's `name`, `description`, `trigger`, `workflow`, or
418
+ # `status`. Only the specified fields will be updated.
419
+ #
420
+ # @param id [String]
421
+ # @param name [String]
422
+ # @param description [String]
423
+ # @param trigger [Hash] Request of type Ittybit::Automations::UpdateAutomationRequestTrigger, as a Hash
424
+ # * :kind (String)
425
+ # * :event (String)
426
+ # @param workflow [Array<Hash>] Request of type Array<Ittybit::WorkflowTaskStep>, as a Hash
427
+ # * :kind (Ittybit::WorkflowTaskStepKind)
428
+ # * :ref (String)
429
+ # * :next_ (Array<Ittybit::WorkflowTaskStepNextItem>)
430
+ # @param status [Ittybit::Automations::UpdateAutomationRequestStatus]
431
+ # @param request_options [Ittybit::RequestOptions]
432
+ # @return [Ittybit::AutomationResponse]
433
+ # @example
434
+ # api = Ittybit::Client.new(
435
+ # base_url: "https://api.example.com",
436
+ # environment: Ittybit::Environment::DEFAULT,
437
+ # token: "YOUR_AUTH_TOKEN"
438
+ # )
439
+ # api.automations.update_automation(
440
+ # id: "auto_abcdefgh1234",
441
+ # name: "My Updated Automation",
442
+ # workflow: [{ kind: NSFW }, { kind: DESCRIPTION }, { kind: IMAGE, ref: "big_thumbnail" }, { kind: CONDITIONS, next_: [{ kind: "subtitle", ref: "subtitle" }] }],
443
+ # status: ACTIVE
444
+ # )
445
+ def update_automation(id:, name: nil, description: nil, trigger: nil, workflow: nil, status: nil,
446
+ request_options: nil)
447
+ Async do
448
+ response = @request_client.conn.patch do |req|
449
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
450
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
451
+ req.headers["ACCEPT_VERSION"] = request_options.version unless request_options&.version.nil?
452
+ req.headers = {
453
+ **(req.headers || {}),
454
+ **@request_client.get_headers,
455
+ **(request_options&.additional_headers || {})
456
+ }.compact
457
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
458
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
459
+ end
460
+ req.body = {
461
+ **(request_options&.additional_body_parameters || {}),
462
+ name: name,
463
+ description: description,
464
+ trigger: trigger,
465
+ workflow: workflow,
466
+ status: status
467
+ }.compact
468
+ req.url "#{@request_client.get_url(request_options: request_options)}/automations/#{id}"
469
+ end
470
+ Ittybit::AutomationResponse.from_json(json_object: response.body)
417
471
  end
418
472
  end
419
473
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class Automations
5
+ class UpdateAutomationRequestStatus
6
+ ACTIVE = "active"
7
+ PAUSED = "paused"
8
+ end
9
+ end
10
+ end
@@ -5,11 +5,11 @@ require "json"
5
5
 
6
6
  module Ittybit
7
7
  class Automations
8
- class AutomationsUpdateRequestTriggerConditionsItem
8
+ class UpdateAutomationRequestTrigger
9
9
  # @return [String]
10
- attr_reader :prop
10
+ attr_reader :kind
11
11
  # @return [String]
12
- attr_reader :value
12
+ attr_reader :event
13
13
  # @return [OpenStruct] Additional properties unmapped to the current class definition
14
14
  attr_reader :additional_properties
15
15
  # @return [Object]
@@ -18,36 +18,34 @@ module Ittybit
18
18
 
19
19
  OMIT = Object.new
20
20
 
21
- # @param prop [String]
22
- # @param value [String]
21
+ # @param kind [String]
22
+ # @param event [String]
23
23
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
24
- # @return [Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem]
25
- def initialize(prop:, value:, additional_properties: nil)
26
- @prop = prop
27
- @value = value
24
+ # @return [Ittybit::Automations::UpdateAutomationRequestTrigger]
25
+ def initialize(kind:, event:, additional_properties: nil)
26
+ @kind = kind
27
+ @event = event
28
28
  @additional_properties = additional_properties
29
- @_field_set = { "prop": prop, "value": value }
29
+ @_field_set = { "kind": kind, "event": event }
30
30
  end
31
31
 
32
- # Deserialize a JSON object to an instance of
33
- # AutomationsUpdateRequestTriggerConditionsItem
32
+ # Deserialize a JSON object to an instance of UpdateAutomationRequestTrigger
34
33
  #
35
34
  # @param json_object [String]
36
- # @return [Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem]
35
+ # @return [Ittybit::Automations::UpdateAutomationRequestTrigger]
37
36
  def self.from_json(json_object:)
38
37
  struct = JSON.parse(json_object, object_class: OpenStruct)
39
38
  parsed_json = JSON.parse(json_object)
40
- prop = parsed_json["prop"]
41
- value = parsed_json["value"]
39
+ kind = parsed_json["kind"]
40
+ event = parsed_json["event"]
42
41
  new(
43
- prop: prop,
44
- value: value,
42
+ kind: kind,
43
+ event: event,
45
44
  additional_properties: struct
46
45
  )
47
46
  end
48
47
 
49
- # Serialize an instance of AutomationsUpdateRequestTriggerConditionsItem to a JSON
50
- # object
48
+ # Serialize an instance of UpdateAutomationRequestTrigger to a JSON object
51
49
  #
52
50
  # @return [String]
53
51
  def to_json(*_args)
@@ -61,8 +59,8 @@ module Ittybit
61
59
  # @param obj [Object]
62
60
  # @return [Void]
63
61
  def self.validate_raw(obj:)
64
- obj.prop.is_a?(String) != false || raise("Passed value for field obj.prop is not the expected type, validation failed.")
65
- obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
62
+ obj.kind.is_a?(String) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.")
63
+ obj.event.is_a?(String) != false || raise("Passed value for field obj.event is not the expected type, validation failed.")
66
64
  end
67
65
  end
68
66
  end
@@ -48,7 +48,7 @@ module Ittybit
48
48
  Ittybit::MediaListResponse.from_json(json_object: response.body)
49
49
  end
50
50
 
51
- # Creates a new media item.
51
+ # Creates a new media item. See [Media Object](/docs/media) for more details.
52
52
  #
53
53
  # @param title [String]
54
54
  # @param alt [String]
@@ -246,7 +246,7 @@ module Ittybit
246
246
  end
247
247
  end
248
248
 
249
- # Creates a new media item.
249
+ # Creates a new media item. See [Media Object](/docs/media) for more details.
250
250
  #
251
251
  # @param title [String]
252
252
  # @param alt [String]