Skip to content

Commit 8418c7c

Browse files
dazzatronusgithub-actions[bot]
authored andcommitted
chore: regenerate SDK from @shotstack/schemas v1.17.0
1 parent 7c86411 commit 8418c7c

31 files changed

Lines changed: 2529 additions & 83 deletions

.oas-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.10.4
1+
1.17.0

lib/shotstack/api/edit_api.rb

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,196 @@ def delete_template_with_http_info(id, opts = {})
8585
return data, status_code, headers
8686
end
8787

88+
# Get Generation Status
89+
# Get the status of an on-demand asset generation job created with the generate endpoint. Jobs are owner-scoped. **Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>
90+
# @param id [String] The generation job id returned by the generate endpoint.
91+
# @param [Hash] opts the optional parameters
92+
# @return [Object]
93+
def get_generate(id, opts = {})
94+
data, _status_code, _headers = get_generate_with_http_info(id, opts)
95+
data
96+
end
97+
98+
# Get Generation Status
99+
# Get the status of an on-demand asset generation job created with the generate endpoint. Jobs are owner-scoped. **Base URL:** &lt;a href&#x3D;\&quot;#\&quot;&gt;https://api.shotstack.io/edit/{version}&lt;/a&gt;
100+
# @param id [String] The generation job id returned by the generate endpoint.
101+
# @param [Hash] opts the optional parameters
102+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
103+
def get_generate_with_http_info(id, opts = {})
104+
if @api_client.config.debugging
105+
@api_client.config.logger.debug 'Calling API: EditApi.get_generate ...'
106+
end
107+
# verify the required parameter 'id' is set
108+
if @api_client.config.client_side_validation && id.nil?
109+
fail ArgumentError, "Missing the required parameter 'id' when calling EditApi.get_generate"
110+
end
111+
# resource path
112+
local_var_path = '/generate/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
113+
114+
# query parameters
115+
query_params = opts[:query_params] || {}
116+
117+
# header parameters
118+
header_params = opts[:header_params] || {}
119+
# HTTP header 'Accept' (if needed)
120+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121+
122+
# form parameters
123+
form_params = opts[:form_params] || {}
124+
125+
# http body (model)
126+
post_body = opts[:debug_body]
127+
128+
# return_type
129+
return_type = opts[:debug_return_type] || 'Object'
130+
131+
# auth_names
132+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
133+
134+
new_options = opts.merge(
135+
:operation => :"EditApi.get_generate",
136+
:header_params => header_params,
137+
:query_params => query_params,
138+
:form_params => form_params,
139+
:body => post_body,
140+
:auth_names => auth_names,
141+
:return_type => return_type
142+
)
143+
144+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
145+
if @api_client.config.debugging
146+
@api_client.config.logger.debug "API called: EditApi#get_generate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
147+
end
148+
return data, status_code, headers
149+
end
150+
151+
# Get Generation Model
152+
# Get one generation model, including the JSON Schema for the options it accepts and what it costs in credits. **Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>
153+
# @param id [String] The model identifier, as returned by the list endpoint.
154+
# @param [Hash] opts the optional parameters
155+
# @return [GetModel200Response]
156+
def get_model(id, opts = {})
157+
data, _status_code, _headers = get_model_with_http_info(id, opts)
158+
data
159+
end
160+
161+
# Get Generation Model
162+
# Get one generation model, including the JSON Schema for the options it accepts and what it costs in credits. **Base URL:** &lt;a href&#x3D;\&quot;#\&quot;&gt;https://api.shotstack.io/edit/{version}&lt;/a&gt;
163+
# @param id [String] The model identifier, as returned by the list endpoint.
164+
# @param [Hash] opts the optional parameters
165+
# @return [Array<(GetModel200Response, Integer, Hash)>] GetModel200Response data, response status code and response headers
166+
def get_model_with_http_info(id, opts = {})
167+
if @api_client.config.debugging
168+
@api_client.config.logger.debug 'Calling API: EditApi.get_model ...'
169+
end
170+
# verify the required parameter 'id' is set
171+
if @api_client.config.client_side_validation && id.nil?
172+
fail ArgumentError, "Missing the required parameter 'id' when calling EditApi.get_model"
173+
end
174+
# resource path
175+
local_var_path = '/models/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
176+
177+
# query parameters
178+
query_params = opts[:query_params] || {}
179+
180+
# header parameters
181+
header_params = opts[:header_params] || {}
182+
# HTTP header 'Accept' (if needed)
183+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
184+
185+
# form parameters
186+
form_params = opts[:form_params] || {}
187+
188+
# http body (model)
189+
post_body = opts[:debug_body]
190+
191+
# return_type
192+
return_type = opts[:debug_return_type] || 'GetModel200Response'
193+
194+
# auth_names
195+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
196+
197+
new_options = opts.merge(
198+
:operation => :"EditApi.get_model",
199+
:header_params => header_params,
200+
:query_params => query_params,
201+
:form_params => form_params,
202+
:body => post_body,
203+
:auth_names => auth_names,
204+
:return_type => return_type
205+
)
206+
207+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
208+
if @api_client.config.debugging
209+
@api_client.config.logger.debug "API called: EditApi#get_model\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210+
end
211+
return data, status_code, headers
212+
end
213+
214+
# List Generation Models
215+
# List the generation models available for `prompt`-bearing image, video and audio assets, with the options each accepts and what it costs in credits. Use this to populate a model picker and render its option fields, rather than hard coding a model list. A newly launched model appears here without any change on your side. Each entry carries the asset type it generates, so filter the list client side when a picker only needs one kind. Option schemas are omitted by default. Request them with `expand=options`. **Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>
216+
# @param [Hash] opts the optional parameters
217+
# @option opts [String] :expand Set to &#x60;options&#x60; to include each model&#39;s option schema in the list. Omitted by default to keep the response small.
218+
# @return [GetModels200Response]
219+
def get_models(opts = {})
220+
data, _status_code, _headers = get_models_with_http_info(opts)
221+
data
222+
end
223+
224+
# List Generation Models
225+
# List the generation models available for &#x60;prompt&#x60;-bearing image, video and audio assets, with the options each accepts and what it costs in credits. Use this to populate a model picker and render its option fields, rather than hard coding a model list. A newly launched model appears here without any change on your side. Each entry carries the asset type it generates, so filter the list client side when a picker only needs one kind. Option schemas are omitted by default. Request them with &#x60;expand&#x3D;options&#x60;. **Base URL:** &lt;a href&#x3D;\&quot;#\&quot;&gt;https://api.shotstack.io/edit/{version}&lt;/a&gt;
226+
# @param [Hash] opts the optional parameters
227+
# @option opts [String] :expand Set to &#x60;options&#x60; to include each model&#39;s option schema in the list. Omitted by default to keep the response small.
228+
# @return [Array<(GetModels200Response, Integer, Hash)>] GetModels200Response data, response status code and response headers
229+
def get_models_with_http_info(opts = {})
230+
if @api_client.config.debugging
231+
@api_client.config.logger.debug 'Calling API: EditApi.get_models ...'
232+
end
233+
allowable_values = ["options"]
234+
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
235+
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
236+
end
237+
# resource path
238+
local_var_path = '/models'
239+
240+
# query parameters
241+
query_params = opts[:query_params] || {}
242+
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
243+
244+
# header parameters
245+
header_params = opts[:header_params] || {}
246+
# HTTP header 'Accept' (if needed)
247+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
248+
249+
# form parameters
250+
form_params = opts[:form_params] || {}
251+
252+
# http body (model)
253+
post_body = opts[:debug_body]
254+
255+
# return_type
256+
return_type = opts[:debug_return_type] || 'GetModels200Response'
257+
258+
# auth_names
259+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
260+
261+
new_options = opts.merge(
262+
:operation => :"EditApi.get_models",
263+
:header_params => header_params,
264+
:query_params => query_params,
265+
:form_params => form_params,
266+
:body => post_body,
267+
:auth_names => auth_names,
268+
:return_type => return_type
269+
)
270+
271+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
272+
if @api_client.config.debugging
273+
@api_client.config.logger.debug "API called: EditApi#get_models\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
274+
end
275+
return data, status_code, headers
276+
end
277+
88278
# Get Render Status
89279
# Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>
90280
# @param id [String] The id of the timeline render task in UUID format
@@ -284,6 +474,70 @@ def get_templates_with_http_info(opts = {})
284474
return data, status_code, headers
285475
end
286476

477+
# Generate Asset
478+
# Generate a single image, video or audio asset from a text prompt without rendering a full edit. Submit a prompt-bearing asset; the response is immediate when an identical asset has been generated before (results are cached by prompt, model and options), otherwise the job is queued and can be polled via the status endpoint. Generation is billed in credits per asset. Identical repeat requests resolve from the cache at no charge. **Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>
479+
# @param [Hash] opts the optional parameters
480+
# @option opts [PostGenerateRequest] :post_generate_request A prompt-bearing image, video or audio asset to generate.
481+
# @return [PostGenerate200Response]
482+
def post_generate(opts = {})
483+
data, _status_code, _headers = post_generate_with_http_info(opts)
484+
data
485+
end
486+
487+
# Generate Asset
488+
# Generate a single image, video or audio asset from a text prompt without rendering a full edit. Submit a prompt-bearing asset; the response is immediate when an identical asset has been generated before (results are cached by prompt, model and options), otherwise the job is queued and can be polled via the status endpoint. Generation is billed in credits per asset. Identical repeat requests resolve from the cache at no charge. **Base URL:** &lt;a href&#x3D;\&quot;#\&quot;&gt;https://api.shotstack.io/edit/{version}&lt;/a&gt;
489+
# @param [Hash] opts the optional parameters
490+
# @option opts [PostGenerateRequest] :post_generate_request A prompt-bearing image, video or audio asset to generate.
491+
# @return [Array<(PostGenerate200Response, Integer, Hash)>] PostGenerate200Response data, response status code and response headers
492+
def post_generate_with_http_info(opts = {})
493+
if @api_client.config.debugging
494+
@api_client.config.logger.debug 'Calling API: EditApi.post_generate ...'
495+
end
496+
# resource path
497+
local_var_path = '/generate'
498+
499+
# query parameters
500+
query_params = opts[:query_params] || {}
501+
502+
# header parameters
503+
header_params = opts[:header_params] || {}
504+
# HTTP header 'Accept' (if needed)
505+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
506+
# HTTP header 'Content-Type'
507+
content_type = @api_client.select_header_content_type(['application/json'])
508+
if !content_type.nil?
509+
header_params['Content-Type'] = content_type
510+
end
511+
512+
# form parameters
513+
form_params = opts[:form_params] || {}
514+
515+
# http body (model)
516+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'post_generate_request'])
517+
518+
# return_type
519+
return_type = opts[:debug_return_type] || 'PostGenerate200Response'
520+
521+
# auth_names
522+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
523+
524+
new_options = opts.merge(
525+
:operation => :"EditApi.post_generate",
526+
:header_params => header_params,
527+
:query_params => query_params,
528+
:form_params => form_params,
529+
:body => post_body,
530+
:auth_names => auth_names,
531+
:return_type => return_type
532+
)
533+
534+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
535+
if @api_client.config.debugging
536+
@api_client.config.logger.debug "API called: EditApi#post_generate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
537+
end
538+
return data, status_code, headers
539+
end
540+
287541
# Render Asset
288542
# Queue and render the contents of an [Edit](#tocs_edit) as a video, image or audio file. **Rendering Process:** 1. **Validation**: The edit JSON is validated 2. **Download**: All assets are downloaded and cached 3. **Preprocessing**: Video assets are automatically processed to fix compatibility issues 4. **Rendering**: The timeline is rendered using the processed assets 5. **Output**: The final media file is generated and stored **Video Preprocessing:** Video assets undergo automatic preprocessing to ensure compatibility. You can force preprocessing by setting `\"transcode\": true` on video assets. See [Preprocessing](#preprocessing) for more details. **Base URL:** <a href=\"#\">https://api.shotstack.io/edit/{version}</a>
289543
# @param edit [Edit] The video, image or audio edit specified using JSON.

lib/shotstack/models/asset.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def openapi_one_of
2222
[
2323
:'AudioAsset',
2424
:'CaptionAsset',
25+
:'Html5Asset',
2526
:'HtmlAsset',
2627
:'ImageAsset',
2728
:'ImageToVideoAsset',
@@ -49,6 +50,7 @@ def openapi_discriminator_mapping
4950
:'audio' => :'AudioAsset',
5051
:'caption' => :'CaptionAsset',
5152
:'html' => :'HtmlAsset',
53+
:'html5' => :'Html5Asset',
5254
:'image' => :'ImageAsset',
5355
:'image-to-video' => :'ImageToVideoAsset',
5456
:'luma' => :'LumaAsset',

0 commit comments

Comments
 (0)