Skip to content

Commit 51d9716

Browse files
author
Jeff Shillitto
committed
Syncing SDK with latest changes
1 parent 8d6c7a1 commit 51d9716

117 files changed

Lines changed: 15624 additions & 1346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/shotstack.rb

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
=begin
22
#Shotstack
33
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+
# Official Ruby SDK for the Shotstack Cloud Video Editing API
55
66
The version of the OpenAPI document: v1
77
88
Generated by: https://openapi-generator.tech
9-
OpenAPI Generator version: 5.4.0
9+
Generator version: 7.4.0
1010
1111
=end
1212

@@ -23,34 +23,83 @@
2323
require 'shotstack/models/asset_response_attributes'
2424
require 'shotstack/models/asset_response_data'
2525
require 'shotstack/models/audio_asset'
26+
require 'shotstack/models/audio_enhancement'
2627
require 'shotstack/models/clip'
2728
require 'shotstack/models/crop'
29+
require 'shotstack/models/did_generated_asset'
30+
require 'shotstack/models/did_generated_asset_options'
31+
require 'shotstack/models/did_text_to_avatar_options'
2832
require 'shotstack/models/destinations'
33+
require 'shotstack/models/dolby_enhancement'
34+
require 'shotstack/models/dolby_enhancement_options'
2935
require 'shotstack/models/edit'
36+
require 'shotstack/models/eleven_labs_generated_asset'
37+
require 'shotstack/models/eleven_labs_generated_asset_options'
38+
require 'shotstack/models/eleven_labs_text_to_speech_options'
39+
require 'shotstack/models/enhancements'
3040
require 'shotstack/models/flip_transformation'
3141
require 'shotstack/models/font'
42+
require 'shotstack/models/generated_asset'
43+
require 'shotstack/models/generated_asset_error_response'
44+
require 'shotstack/models/generated_asset_error_response_data'
45+
require 'shotstack/models/generated_asset_response'
46+
require 'shotstack/models/generated_asset_response_attributes'
47+
require 'shotstack/models/generated_asset_response_data'
48+
require 'shotstack/models/google_cloud_storage_destination'
49+
require 'shotstack/models/google_cloud_storage_destination_options'
50+
require 'shotstack/models/google_drive_destination'
51+
require 'shotstack/models/google_drive_destination_options'
52+
require 'shotstack/models/hey_gen_generated_asset'
53+
require 'shotstack/models/hey_gen_generated_asset_options'
54+
require 'shotstack/models/hey_gen_text_to_avatar_options'
3255
require 'shotstack/models/html_asset'
3356
require 'shotstack/models/image_asset'
57+
require 'shotstack/models/ingest_error_response'
58+
require 'shotstack/models/ingest_error_response_data'
3459
require 'shotstack/models/luma_asset'
3560
require 'shotstack/models/merge_field'
3661
require 'shotstack/models/mux_destination'
3762
require 'shotstack/models/mux_destination_options'
3863
require 'shotstack/models/offset'
64+
require 'shotstack/models/open_ai_generated_asset'
65+
require 'shotstack/models/open_ai_generated_asset_options'
66+
require 'shotstack/models/open_ai_text_generator_options'
3967
require 'shotstack/models/output'
68+
require 'shotstack/models/outputs'
69+
require 'shotstack/models/outputs_response'
4070
require 'shotstack/models/poster'
4171
require 'shotstack/models/probe_response'
4272
require 'shotstack/models/queued_response'
4373
require 'shotstack/models/queued_response_data'
74+
require 'shotstack/models/queued_source_response'
75+
require 'shotstack/models/queued_source_response_data'
4476
require 'shotstack/models/range'
4577
require 'shotstack/models/render_response'
4678
require 'shotstack/models/render_response_data'
79+
require 'shotstack/models/rendition'
80+
require 'shotstack/models/rendition_response_attributes'
4781
require 'shotstack/models/rotate_transformation'
4882
require 'shotstack/models/s3_destination'
4983
require 'shotstack/models/s3_destination_options'
5084
require 'shotstack/models/shotstack_destination'
85+
require 'shotstack/models/shotstack_generated_asset'
86+
require 'shotstack/models/shotstack_generated_asset_options'
87+
require 'shotstack/models/shotstack_image_to_video_options'
88+
require 'shotstack/models/shotstack_text_generator_options'
89+
require 'shotstack/models/shotstack_text_to_image_options'
90+
require 'shotstack/models/shotstack_text_to_speech_options'
5191
require 'shotstack/models/size'
5292
require 'shotstack/models/skew_transformation'
5393
require 'shotstack/models/soundtrack'
94+
require 'shotstack/models/source'
95+
require 'shotstack/models/source_list_response'
96+
require 'shotstack/models/source_response'
97+
require 'shotstack/models/source_response_attributes'
98+
require 'shotstack/models/source_response_data'
99+
require 'shotstack/models/speed'
100+
require 'shotstack/models/stability_ai_generated_asset'
101+
require 'shotstack/models/stability_ai_generated_asset_options'
102+
require 'shotstack/models/stability_ai_text_to_image_options'
54103
require 'shotstack/models/template'
55104
require 'shotstack/models/template_data_response'
56105
require 'shotstack/models/template_data_response_data'
@@ -64,12 +113,22 @@
64113
require 'shotstack/models/timeline'
65114
require 'shotstack/models/title_asset'
66115
require 'shotstack/models/track'
116+
require 'shotstack/models/transcription'
117+
require 'shotstack/models/transfer'
118+
require 'shotstack/models/transfer_response'
119+
require 'shotstack/models/transfer_response_attributes'
120+
require 'shotstack/models/transfer_response_data'
67121
require 'shotstack/models/transformation'
68122
require 'shotstack/models/transition'
123+
require 'shotstack/models/upload_response'
124+
require 'shotstack/models/upload_response_attributes'
125+
require 'shotstack/models/upload_response_data'
69126
require 'shotstack/models/video_asset'
70127

71128
# APIs
129+
require 'shotstack/api/create_api'
72130
require 'shotstack/api/edit_api'
131+
require 'shotstack/api/ingest_api'
73132
require 'shotstack/api/serve_api'
74133

75134
module Shotstack

lib/shotstack/api/create_api.rb

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
=begin
2+
#Shotstack
3+
4+
# Official Ruby SDK for the Shotstack Cloud Video Editing API
5+
6+
The version of the OpenAPI document: v1
7+
8+
Generated by: https://openapi-generator.tech
9+
Generator version: 7.4.0
10+
11+
=end
12+
13+
require 'cgi'
14+
15+
module Shotstack
16+
class CreateApi
17+
attr_accessor :api_client
18+
19+
def initialize(api_client = ApiClient.default)
20+
@api_client = api_client
21+
end
22+
# Get Generated Asset
23+
# Get the generated assets status, url and details by ID. **Base URL:** <a href=\"#\">https://api.shotstack.io/create/{version}</a>
24+
# @param id [String] The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format.
25+
# @param [Hash] opts the optional parameters
26+
# @return [GeneratedAssetResponse]
27+
def get_generated_asset(id, opts = {})
28+
data, _status_code, _headers = get_generated_asset_with_http_info(id, opts)
29+
data
30+
end
31+
32+
# Get Generated Asset
33+
# Get the generated assets status, url and details by ID. **Base URL:** &lt;a href&#x3D;\&quot;#\&quot;&gt;https://api.shotstack.io/create/{version}&lt;/a&gt;
34+
# @param id [String] The id of the source file in [KSUID](https://github.com/segmentio/ksuid#what-is-a-ksuid) format.
35+
# @param [Hash] opts the optional parameters
36+
# @return [Array<(GeneratedAssetResponse, Integer, Hash)>] GeneratedAssetResponse data, response status code and response headers
37+
def get_generated_asset_with_http_info(id, opts = {})
38+
if @api_client.config.debugging
39+
@api_client.config.logger.debug 'Calling API: CreateApi.get_generated_asset ...'
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 CreateApi.get_generated_asset"
44+
end
45+
pattern = Regexp.new(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
46+
if @api_client.config.client_side_validation && id !~ pattern
47+
fail ArgumentError, "invalid value for 'id' when calling CreateApi.get_generated_asset, must conform to the pattern #{pattern}."
48+
end
49+
50+
# resource path
51+
local_var_path = '/assets/{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+
# HTTP header 'Accept' (if needed)
59+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60+
61+
# form parameters
62+
form_params = opts[:form_params] || {}
63+
64+
# http body (model)
65+
post_body = opts[:debug_body]
66+
67+
# return_type
68+
return_type = opts[:debug_return_type] || 'GeneratedAssetResponse'
69+
70+
# auth_names
71+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
72+
73+
new_options = opts.merge(
74+
:operation => :"CreateApi.get_generated_asset",
75+
:header_params => header_params,
76+
:query_params => query_params,
77+
:form_params => form_params,
78+
:body => post_body,
79+
:auth_names => auth_names,
80+
:return_type => return_type
81+
)
82+
83+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
84+
if @api_client.config.debugging
85+
@api_client.config.logger.debug "API called: CreateApi#get_generated_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86+
end
87+
return data, status_code, headers
88+
end
89+
90+
# Generate Asset
91+
# Generate an asset using a Shotstack or third party provider. Chose the provider, type of asset and provide prompts, inputs and options to generate the asset. Once generated the asset can be used with the [Edit](#tocs_edit) API or downloaded. **Base URL:** <a href=\"#\">https://api.shotstack.io/create/{version}</a>
92+
# @param generated_asset [GeneratedAsset] Generate an asset using the specified provider, type and options.
93+
# @param [Hash] opts the optional parameters
94+
# @return [GeneratedAssetResponse]
95+
def post_generate_asset(generated_asset, opts = {})
96+
data, _status_code, _headers = post_generate_asset_with_http_info(generated_asset, opts)
97+
data
98+
end
99+
100+
# Generate Asset
101+
# Generate an asset using a Shotstack or third party provider. Chose the provider, type of asset and provide prompts, inputs and options to generate the asset. Once generated the asset can be used with the [Edit](#tocs_edit) API or downloaded. **Base URL:** &lt;a href&#x3D;\&quot;#\&quot;&gt;https://api.shotstack.io/create/{version}&lt;/a&gt;
102+
# @param generated_asset [GeneratedAsset] Generate an asset using the specified provider, type and options.
103+
# @param [Hash] opts the optional parameters
104+
# @return [Array<(GeneratedAssetResponse, Integer, Hash)>] GeneratedAssetResponse data, response status code and response headers
105+
def post_generate_asset_with_http_info(generated_asset, opts = {})
106+
if @api_client.config.debugging
107+
@api_client.config.logger.debug 'Calling API: CreateApi.post_generate_asset ...'
108+
end
109+
# verify the required parameter 'generated_asset' is set
110+
if @api_client.config.client_side_validation && generated_asset.nil?
111+
fail ArgumentError, "Missing the required parameter 'generated_asset' when calling CreateApi.post_generate_asset"
112+
end
113+
# resource path
114+
local_var_path = '/assets'
115+
116+
# query parameters
117+
query_params = opts[:query_params] || {}
118+
119+
# header parameters
120+
header_params = opts[:header_params] || {}
121+
# HTTP header 'Accept' (if needed)
122+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123+
# HTTP header 'Content-Type'
124+
content_type = @api_client.select_header_content_type(['application/json'])
125+
if !content_type.nil?
126+
header_params['Content-Type'] = content_type
127+
end
128+
129+
# form parameters
130+
form_params = opts[:form_params] || {}
131+
132+
# http body (model)
133+
post_body = opts[:debug_body] || @api_client.object_to_http_body(generated_asset)
134+
135+
# return_type
136+
return_type = opts[:debug_return_type] || 'GeneratedAssetResponse'
137+
138+
# auth_names
139+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
140+
141+
new_options = opts.merge(
142+
:operation => :"CreateApi.post_generate_asset",
143+
:header_params => header_params,
144+
:query_params => query_params,
145+
:form_params => form_params,
146+
:body => post_body,
147+
:auth_names => auth_names,
148+
:return_type => return_type
149+
)
150+
151+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152+
if @api_client.config.debugging
153+
@api_client.config.logger.debug "API called: CreateApi#post_generate_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154+
end
155+
return data, status_code, headers
156+
end
157+
end
158+
end

0 commit comments

Comments
 (0)