shotstack 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shotstack/api/edit_api.rb +413 -7
  3. data/lib/shotstack/api/serve_api.rb +7 -7
  4. data/lib/shotstack/api_client.rb +1 -1
  5. data/lib/shotstack/api_error.rb +1 -1
  6. data/lib/shotstack/configuration.rb +1 -1
  7. data/lib/shotstack/models/asset.rb +1 -1
  8. data/lib/shotstack/models/asset_render_response.rb +1 -1
  9. data/lib/shotstack/models/asset_response.rb +1 -1
  10. data/lib/shotstack/models/asset_response_attributes.rb +12 -2
  11. data/lib/shotstack/models/asset_response_data.rb +1 -1
  12. data/lib/shotstack/models/audio_asset.rb +1 -1
  13. data/lib/shotstack/models/clip.rb +1 -1
  14. data/lib/shotstack/models/crop.rb +1 -1
  15. data/lib/shotstack/models/destinations.rb +1 -1
  16. data/lib/shotstack/models/edit.rb +1 -1
  17. data/lib/shotstack/models/flip_transformation.rb +1 -1
  18. data/lib/shotstack/models/font.rb +1 -1
  19. data/lib/shotstack/models/html_asset.rb +1 -1
  20. data/lib/shotstack/models/image_asset.rb +1 -1
  21. data/lib/shotstack/models/luma_asset.rb +1 -1
  22. data/lib/shotstack/models/merge_field.rb +1 -1
  23. data/lib/shotstack/models/mux_destination.rb +1 -1
  24. data/lib/shotstack/models/mux_destination_options.rb +1 -1
  25. data/lib/shotstack/models/offset.rb +1 -1
  26. data/lib/shotstack/models/output.rb +1 -1
  27. data/lib/shotstack/models/poster.rb +1 -1
  28. data/lib/shotstack/models/probe_response.rb +2 -2
  29. data/lib/shotstack/models/queued_response.rb +2 -2
  30. data/lib/shotstack/models/queued_response_data.rb +1 -1
  31. data/lib/shotstack/models/range.rb +1 -1
  32. data/lib/shotstack/models/render_response.rb +1 -1
  33. data/lib/shotstack/models/render_response_data.rb +1 -1
  34. data/lib/shotstack/models/rotate_transformation.rb +1 -1
  35. data/lib/shotstack/models/shotstack_destination.rb +1 -1
  36. data/lib/shotstack/models/size.rb +1 -1
  37. data/lib/shotstack/models/skew_transformation.rb +1 -1
  38. data/lib/shotstack/models/soundtrack.rb +1 -1
  39. data/lib/shotstack/models/template.rb +234 -0
  40. data/lib/shotstack/models/template_data_response.rb +254 -0
  41. data/lib/shotstack/models/template_data_response_data.rb +270 -0
  42. data/lib/shotstack/models/template_list_response.rb +254 -0
  43. data/lib/shotstack/models/template_list_response_data.rb +242 -0
  44. data/lib/shotstack/models/template_list_response_item.rb +270 -0
  45. data/lib/shotstack/models/template_render.rb +237 -0
  46. data/lib/shotstack/models/template_response.rb +254 -0
  47. data/lib/shotstack/models/template_response_data.rb +240 -0
  48. data/lib/shotstack/models/thumbnail.rb +1 -1
  49. data/lib/shotstack/models/timeline.rb +1 -1
  50. data/lib/shotstack/models/title_asset.rb +1 -1
  51. data/lib/shotstack/models/track.rb +1 -1
  52. data/lib/shotstack/models/transformation.rb +1 -1
  53. data/lib/shotstack/models/transition.rb +1 -1
  54. data/lib/shotstack/models/video_asset.rb +1 -1
  55. data/lib/shotstack/version.rb +2 -2
  56. data/lib/shotstack.rb +10 -1
  57. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b164189597fb546e8cbc98c5c9653079f4d3624f51e425c35dfb98fd3bf27c5a
4
- data.tar.gz: 85387313d35f8a124d2c5c5244ddf400cb4d78d81550df842455a651d1e26e84
3
+ metadata.gz: 64b3bd0008fd4fc20345ae2976c6598aac2de7f05f3177778c39ebce2bc826b8
4
+ data.tar.gz: 704782e9d1d39363e0f0637ebf6f7eb59de698b34233c04014ccf3ae3f24909f
5
5
  SHA512:
6
- metadata.gz: ec28a82e58cdd8131c4c9c1803cdd87e1d41d425d8d4f76d36a1fa864bcdc1d13ed5bcbffdfddb9e26e417e8d131ca6ae0c72118011781dfff107f026e61aaad
7
- data.tar.gz: 242a6392469c3d238ad75e7962cf6b81b0a8d0cb1edffc9c10d8f6b86373e766898378dffdc835e97e455bd4ddb02a6ba156739e84015acd8d98ad6c9442a813
6
+ metadata.gz: 40444c90e512eea64b461233c8536579bf9b8c6c8e0d1e307c02eedc9f88def20d752e056bacc503a81d2e126b091650a778d60fdf76b93a95f52bb45be2ccc1
7
+ data.tar.gz: d905b76a787eeaedf6afdb0256c0dc74fbdf04a8cffa1e4a311f4df37f04d910d56e7f961572e80d174be746075c119e5c332e8465a29629c1ed8503e60880e4
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -19,8 +19,74 @@ module Shotstack
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Delete Template
23
+ # Delete a template by its template id. **Base URL:** https://api.shotstack.io/{version}
24
+ # @param id [String] The id of the template in UUID format
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def delete_template(id, opts = {})
28
+ delete_template_with_http_info(id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete Template
33
+ # Delete a template by its template id. **Base URL:** https://api.shotstack.io/{version}
34
+ # @param id [String] The id of the template in UUID format
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def delete_template_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EditApi.delete_template ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling EditApi.delete_template"
44
+ end
45
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
46
+ if @api_client.config.client_side_validation && id !~ pattern
47
+ fail ArgumentError, "invalid value for 'id' when calling EditApi.delete_template, must conform to the pattern #{pattern}."
48
+ end
49
+
50
+ # resource path
51
+ local_var_path = '/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type]
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"EditApi.delete_template",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: EditApi#delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
22
88
  # Get Render Status
23
- # Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/{version}
89
+ # Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/{version}
24
90
  # @param id [String] The id of the timeline render task in UUID format
25
91
  # @param [Hash] opts the optional parameters
26
92
  # @option opts [Boolean] :data Include the data parameter in the response. The data parameter includes the original timeline, output and other settings sent to the API.&lt;br&gt;&lt;br&gt;&lt;b&gt;Note:&lt;/b&gt; the default is currently &#x60;true&#x60;, this is deprecated and the default will soon be &#x60;false&#x60;. If you rely on the data being returned in the response you should explicitly set the parameter to &#x60;true&#x60;.
@@ -32,7 +98,7 @@ module Shotstack
32
98
  end
33
99
 
34
100
  # Get Render Status
35
- # Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/{version}
101
+ # Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/{version}
36
102
  # @param id [String] The id of the timeline render task in UUID format
37
103
  # @param [Hash] opts the optional parameters
38
104
  # @option opts [Boolean] :data Include the data parameter in the response. The data parameter includes the original timeline, output and other settings sent to the API.&lt;br&gt;&lt;br&gt;&lt;b&gt;Note:&lt;/b&gt; the default is currently &#x60;true&#x60;, this is deprecated and the default will soon be &#x60;false&#x60;. If you rely on the data being returned in the response you should explicitly set the parameter to &#x60;true&#x60;.
@@ -93,8 +159,133 @@ module Shotstack
93
159
  return data, status_code, headers
94
160
  end
95
161
 
162
+ # Retrieve Template
163
+ # Retrieve a template by template id. **Base URL:** https://api.shotstack.io/{version}
164
+ # @param id [String] The id of the template in UUID format
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [TemplateDataResponse]
167
+ def get_template(id, opts = {})
168
+ data, _status_code, _headers = get_template_with_http_info(id, opts)
169
+ data
170
+ end
171
+
172
+ # Retrieve Template
173
+ # Retrieve a template by template id. **Base URL:** https://api.shotstack.io/{version}
174
+ # @param id [String] The id of the template in UUID format
175
+ # @param [Hash] opts the optional parameters
176
+ # @return [Array<(TemplateDataResponse, Integer, Hash)>] TemplateDataResponse data, response status code and response headers
177
+ def get_template_with_http_info(id, opts = {})
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug 'Calling API: EditApi.get_template ...'
180
+ end
181
+ # verify the required parameter 'id' is set
182
+ if @api_client.config.client_side_validation && id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'id' when calling EditApi.get_template"
184
+ end
185
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
186
+ if @api_client.config.client_side_validation && id !~ pattern
187
+ fail ArgumentError, "invalid value for 'id' when calling EditApi.get_template, must conform to the pattern #{pattern}."
188
+ end
189
+
190
+ # resource path
191
+ local_var_path = '/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
192
+
193
+ # query parameters
194
+ query_params = opts[:query_params] || {}
195
+
196
+ # header parameters
197
+ header_params = opts[:header_params] || {}
198
+ # HTTP header 'Accept' (if needed)
199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
200
+
201
+ # form parameters
202
+ form_params = opts[:form_params] || {}
203
+
204
+ # http body (model)
205
+ post_body = opts[:debug_body]
206
+
207
+ # return_type
208
+ return_type = opts[:debug_return_type] || 'TemplateDataResponse'
209
+
210
+ # auth_names
211
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
212
+
213
+ new_options = opts.merge(
214
+ :operation => :"EditApi.get_template",
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => return_type
221
+ )
222
+
223
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug "API called: EditApi#get_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
+ end
227
+ return data, status_code, headers
228
+ end
229
+
230
+ # List Templates
231
+ # Retrieve a list of templates stored against a users account. The API key is used to determine which templates are associated to the user. **Base URL:** https://api.shotstack.io/{version}
232
+ # @param [Hash] opts the optional parameters
233
+ # @return [TemplateListResponse]
234
+ def get_templates(opts = {})
235
+ data, _status_code, _headers = get_templates_with_http_info(opts)
236
+ data
237
+ end
238
+
239
+ # List Templates
240
+ # Retrieve a list of templates stored against a users account. The API key is used to determine which templates are associated to the user. **Base URL:** https://api.shotstack.io/{version}
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [Array<(TemplateListResponse, Integer, Hash)>] TemplateListResponse data, response status code and response headers
243
+ def get_templates_with_http_info(opts = {})
244
+ if @api_client.config.debugging
245
+ @api_client.config.logger.debug 'Calling API: EditApi.get_templates ...'
246
+ end
247
+ # resource path
248
+ local_var_path = '/templates'
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+
253
+ # header parameters
254
+ header_params = opts[:header_params] || {}
255
+ # HTTP header 'Accept' (if needed)
256
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
257
+
258
+ # form parameters
259
+ form_params = opts[:form_params] || {}
260
+
261
+ # http body (model)
262
+ post_body = opts[:debug_body]
263
+
264
+ # return_type
265
+ return_type = opts[:debug_return_type] || 'TemplateListResponse'
266
+
267
+ # auth_names
268
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
269
+
270
+ new_options = opts.merge(
271
+ :operation => :"EditApi.get_templates",
272
+ :header_params => header_params,
273
+ :query_params => query_params,
274
+ :form_params => form_params,
275
+ :body => post_body,
276
+ :auth_names => auth_names,
277
+ :return_type => return_type
278
+ )
279
+
280
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
281
+ if @api_client.config.debugging
282
+ @api_client.config.logger.debug "API called: EditApi#get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
283
+ end
284
+ return data, status_code, headers
285
+ end
286
+
96
287
  # Render Asset
97
- # Queue and render the contents of a timeline as a video, image or audio file. **Base URL:** https://api.shotstack.io/{version}
288
+ # Queue and render the contents of an [Edit](#tocs_edit) as a video, image or audio file. **Base URL:** https://api.shotstack.io/{version}
98
289
  # @param edit [Edit] The video, image or audio edit specified using JSON.
99
290
  # @param [Hash] opts the optional parameters
100
291
  # @return [QueuedResponse]
@@ -104,7 +295,7 @@ module Shotstack
104
295
  end
105
296
 
106
297
  # Render Asset
107
- # Queue and render the contents of a timeline as a video, image or audio file. **Base URL:** https://api.shotstack.io/{version}
298
+ # Queue and render the contents of an [Edit](#tocs_edit) as a video, image or audio file. **Base URL:** https://api.shotstack.io/{version}
108
299
  # @param edit [Edit] The video, image or audio edit specified using JSON.
109
300
  # @param [Hash] opts the optional parameters
110
301
  # @return [Array<(QueuedResponse, Integer, Hash)>] QueuedResponse data, response status code and response headers
@@ -161,8 +352,144 @@ module Shotstack
161
352
  return data, status_code, headers
162
353
  end
163
354
 
355
+ # Create Template
356
+ # Save an [Edit](#tocs_edit) as a re-usable template. Templates can be retrieved and modified in your application before being rendered. [Merge fields](#tocs_mergefield) can be also used to merge data in to a template and [render](#render-template) it in a single request. **Base URL:** https://api.shotstack.io/{version}
357
+ # @param template [Template] Create a template with a name and [Edit](#tocs_edit).
358
+ # @param [Hash] opts the optional parameters
359
+ # @return [TemplateResponse]
360
+ def post_template(template, opts = {})
361
+ data, _status_code, _headers = post_template_with_http_info(template, opts)
362
+ data
363
+ end
364
+
365
+ # Create Template
366
+ # Save an [Edit](#tocs_edit) as a re-usable template. Templates can be retrieved and modified in your application before being rendered. [Merge fields](#tocs_mergefield) can be also used to merge data in to a template and [render](#render-template) it in a single request. **Base URL:** https://api.shotstack.io/{version}
367
+ # @param template [Template] Create a template with a name and [Edit](#tocs_edit).
368
+ # @param [Hash] opts the optional parameters
369
+ # @return [Array<(TemplateResponse, Integer, Hash)>] TemplateResponse data, response status code and response headers
370
+ def post_template_with_http_info(template, opts = {})
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug 'Calling API: EditApi.post_template ...'
373
+ end
374
+ # verify the required parameter 'template' is set
375
+ if @api_client.config.client_side_validation && template.nil?
376
+ fail ArgumentError, "Missing the required parameter 'template' when calling EditApi.post_template"
377
+ end
378
+ # resource path
379
+ local_var_path = '/templates'
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
388
+ # HTTP header 'Content-Type'
389
+ content_type = @api_client.select_header_content_type(['application/json'])
390
+ if !content_type.nil?
391
+ header_params['Content-Type'] = content_type
392
+ end
393
+
394
+ # form parameters
395
+ form_params = opts[:form_params] || {}
396
+
397
+ # http body (model)
398
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(template)
399
+
400
+ # return_type
401
+ return_type = opts[:debug_return_type] || 'TemplateResponse'
402
+
403
+ # auth_names
404
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
405
+
406
+ new_options = opts.merge(
407
+ :operation => :"EditApi.post_template",
408
+ :header_params => header_params,
409
+ :query_params => query_params,
410
+ :form_params => form_params,
411
+ :body => post_body,
412
+ :auth_names => auth_names,
413
+ :return_type => return_type
414
+ )
415
+
416
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
417
+ if @api_client.config.debugging
418
+ @api_client.config.logger.debug "API called: EditApi#post_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
419
+ end
420
+ return data, status_code, headers
421
+ end
422
+
423
+ # Render Template
424
+ # Render an asset from a template id and optional merge fields. Merge fields can be used to replace placeholder variables within the [Edit](#tocs_edit). **Base URL:** https://api.shotstack.io/{version}
425
+ # @param template_render [TemplateRender] Render a template by template id.
426
+ # @param [Hash] opts the optional parameters
427
+ # @return [QueuedResponse]
428
+ def post_template_render(template_render, opts = {})
429
+ data, _status_code, _headers = post_template_render_with_http_info(template_render, opts)
430
+ data
431
+ end
432
+
433
+ # Render Template
434
+ # Render an asset from a template id and optional merge fields. Merge fields can be used to replace placeholder variables within the [Edit](#tocs_edit). **Base URL:** https://api.shotstack.io/{version}
435
+ # @param template_render [TemplateRender] Render a template by template id.
436
+ # @param [Hash] opts the optional parameters
437
+ # @return [Array<(QueuedResponse, Integer, Hash)>] QueuedResponse data, response status code and response headers
438
+ def post_template_render_with_http_info(template_render, opts = {})
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug 'Calling API: EditApi.post_template_render ...'
441
+ end
442
+ # verify the required parameter 'template_render' is set
443
+ if @api_client.config.client_side_validation && template_render.nil?
444
+ fail ArgumentError, "Missing the required parameter 'template_render' when calling EditApi.post_template_render"
445
+ end
446
+ # resource path
447
+ local_var_path = '/templates/render'
448
+
449
+ # query parameters
450
+ query_params = opts[:query_params] || {}
451
+
452
+ # header parameters
453
+ header_params = opts[:header_params] || {}
454
+ # HTTP header 'Accept' (if needed)
455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
456
+ # HTTP header 'Content-Type'
457
+ content_type = @api_client.select_header_content_type(['application/json'])
458
+ if !content_type.nil?
459
+ header_params['Content-Type'] = content_type
460
+ end
461
+
462
+ # form parameters
463
+ form_params = opts[:form_params] || {}
464
+
465
+ # http body (model)
466
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(template_render)
467
+
468
+ # return_type
469
+ return_type = opts[:debug_return_type] || 'QueuedResponse'
470
+
471
+ # auth_names
472
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
473
+
474
+ new_options = opts.merge(
475
+ :operation => :"EditApi.post_template_render",
476
+ :header_params => header_params,
477
+ :query_params => query_params,
478
+ :form_params => form_params,
479
+ :body => post_body,
480
+ :auth_names => auth_names,
481
+ :return_type => return_type
482
+ )
483
+
484
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
485
+ if @api_client.config.debugging
486
+ @api_client.config.logger.debug "API called: EditApi#post_template_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
487
+ end
488
+ return data, status_code, headers
489
+ end
490
+
164
491
  # Inspect Media
165
- # Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/{version}
492
+ # Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/{version}
166
493
  # @param url [String] The URL of the media to inspect, must be **URL encoded**.
167
494
  # @param [Hash] opts the optional parameters
168
495
  # @return [ProbeResponse]
@@ -172,7 +499,7 @@ module Shotstack
172
499
  end
173
500
 
174
501
  # Inspect Media
175
- # Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/{version}
502
+ # Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/{version}
176
503
  # @param url [String] The URL of the media to inspect, must be **URL encoded**.
177
504
  # @param [Hash] opts the optional parameters
178
505
  # @return [Array<(ProbeResponse, Integer, Hash)>] ProbeResponse data, response status code and response headers
@@ -223,5 +550,84 @@ module Shotstack
223
550
  end
224
551
  return data, status_code, headers
225
552
  end
553
+
554
+ # Update Template
555
+ # Update an existing template by template id. **Base URL:** https://api.shotstack.io/{version}
556
+ # @param id [String] The id of the template in UUID format
557
+ # @param template [Template] Update an individual templates name and [Edit](#tocs_edit). Both template name and template must be provided. If the template parameter is omitted a blank template will be saved.
558
+ # @param [Hash] opts the optional parameters
559
+ # @return [TemplateResponse]
560
+ def put_template(id, template, opts = {})
561
+ data, _status_code, _headers = put_template_with_http_info(id, template, opts)
562
+ data
563
+ end
564
+
565
+ # Update Template
566
+ # Update an existing template by template id. **Base URL:** https://api.shotstack.io/{version}
567
+ # @param id [String] The id of the template in UUID format
568
+ # @param template [Template] Update an individual templates name and [Edit](#tocs_edit). Both template name and template must be provided. If the template parameter is omitted a blank template will be saved.
569
+ # @param [Hash] opts the optional parameters
570
+ # @return [Array<(TemplateResponse, Integer, Hash)>] TemplateResponse data, response status code and response headers
571
+ def put_template_with_http_info(id, template, opts = {})
572
+ if @api_client.config.debugging
573
+ @api_client.config.logger.debug 'Calling API: EditApi.put_template ...'
574
+ end
575
+ # verify the required parameter 'id' is set
576
+ if @api_client.config.client_side_validation && id.nil?
577
+ fail ArgumentError, "Missing the required parameter 'id' when calling EditApi.put_template"
578
+ end
579
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
580
+ if @api_client.config.client_side_validation && id !~ pattern
581
+ fail ArgumentError, "invalid value for 'id' when calling EditApi.put_template, must conform to the pattern #{pattern}."
582
+ end
583
+
584
+ # verify the required parameter 'template' is set
585
+ if @api_client.config.client_side_validation && template.nil?
586
+ fail ArgumentError, "Missing the required parameter 'template' when calling EditApi.put_template"
587
+ end
588
+ # resource path
589
+ local_var_path = '/templates/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
590
+
591
+ # query parameters
592
+ query_params = opts[:query_params] || {}
593
+
594
+ # header parameters
595
+ header_params = opts[:header_params] || {}
596
+ # HTTP header 'Accept' (if needed)
597
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
598
+ # HTTP header 'Content-Type'
599
+ content_type = @api_client.select_header_content_type(['application/json'])
600
+ if !content_type.nil?
601
+ header_params['Content-Type'] = content_type
602
+ end
603
+
604
+ # form parameters
605
+ form_params = opts[:form_params] || {}
606
+
607
+ # http body (model)
608
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(template)
609
+
610
+ # return_type
611
+ return_type = opts[:debug_return_type] || 'TemplateResponse'
612
+
613
+ # auth_names
614
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
615
+
616
+ new_options = opts.merge(
617
+ :operation => :"EditApi.put_template",
618
+ :header_params => header_params,
619
+ :query_params => query_params,
620
+ :form_params => form_params,
621
+ :body => post_body,
622
+ :auth_names => auth_names,
623
+ :return_type => return_type
624
+ )
625
+
626
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
627
+ if @api_client.config.debugging
628
+ @api_client.config.logger.debug "API called: EditApi#put_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
629
+ end
630
+ return data, status_code, headers
631
+ end
226
632
  end
227
633
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -20,7 +20,7 @@ module Shotstack
20
20
  @api_client = api_client
21
21
  end
22
22
  # Delete Asset
23
- # Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version}
23
+ # Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version}
24
24
  # @param id [String] The id of the asset in UUID format
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [nil]
@@ -30,7 +30,7 @@ module Shotstack
30
30
  end
31
31
 
32
32
  # Delete Asset
33
- # Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version}
33
+ # Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version}
34
34
  # @param id [String] The id of the asset in UUID format
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -86,7 +86,7 @@ module Shotstack
86
86
  end
87
87
 
88
88
  # Get Asset
89
- # The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version}
89
+ # The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version}
90
90
  # @param id [String] The id of the asset in UUID format
91
91
  # @param [Hash] opts the optional parameters
92
92
  # @return [AssetResponse]
@@ -96,7 +96,7 @@ module Shotstack
96
96
  end
97
97
 
98
98
  # Get Asset
99
- # The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version}
99
+ # The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version}
100
100
  # @param id [String] The id of the asset in UUID format
101
101
  # @param [Hash] opts the optional parameters
102
102
  # @return [Array<(AssetResponse, Integer, Hash)>] AssetResponse data, response status code and response headers
@@ -154,7 +154,7 @@ module Shotstack
154
154
  end
155
155
 
156
156
  # Get Asset by Render ID
157
- # A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version}
157
+ # A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version}
158
158
  # @param id [String] The render id associated with the asset in UUID format
159
159
  # @param [Hash] opts the optional parameters
160
160
  # @return [AssetRenderResponse]
@@ -164,7 +164,7 @@ module Shotstack
164
164
  end
165
165
 
166
166
  # Get Asset by Render ID
167
- # A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version}
167
+ # A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version}
168
168
  # @param id [String] The render id associated with the asset in UUID format
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @return [Array<(AssetRenderResponse, Integer, Hash)>] AssetRenderResponse data, response status code and response headers
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7