shotstack 0.1.9 → 0.2.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 +4 -4
- data/README.md +1099 -11
- data/lib/shotstack/api/edit_api.rb +6 -3
- data/lib/shotstack/api/serve_api.rb +2 -2
- data/lib/shotstack/api_client.rb +4 -4
- data/lib/shotstack/api_error.rb +2 -2
- data/lib/shotstack/configuration.rb +9 -6
- data/lib/shotstack/models/asset.rb +42 -11
- data/lib/shotstack/models/asset_render_response.rb +2 -2
- data/lib/shotstack/models/asset_response.rb +2 -2
- data/lib/shotstack/models/asset_response_attributes.rb +2 -2
- data/lib/shotstack/models/asset_response_data.rb +2 -2
- data/lib/shotstack/models/audio_asset.rb +3 -4
- data/lib/shotstack/models/clip.rb +2 -3
- data/lib/shotstack/models/crop.rb +2 -2
- data/lib/shotstack/models/destinations.rb +256 -0
- data/lib/shotstack/models/edit.rb +4 -4
- data/lib/shotstack/models/flip_transformation.rb +2 -2
- data/lib/shotstack/models/font.rb +2 -2
- data/lib/shotstack/models/html_asset.rb +5 -6
- data/lib/shotstack/models/image_asset.rb +3 -4
- data/lib/shotstack/models/luma_asset.rb +3 -4
- data/lib/shotstack/models/merge_field.rb +3 -3
- data/lib/shotstack/models/mux_destination.rb +236 -0
- data/lib/shotstack/models/mux_destination_options.rb +244 -0
- data/lib/shotstack/models/offset.rb +2 -2
- data/lib/shotstack/models/output.rb +6 -9
- data/lib/shotstack/models/poster.rb +2 -2
- data/lib/shotstack/models/probe_response.rb +2 -2
- data/lib/shotstack/models/queued_response.rb +2 -2
- data/lib/shotstack/models/queued_response_data.rb +2 -2
- data/lib/shotstack/models/range.rb +2 -2
- data/lib/shotstack/models/render_response.rb +2 -2
- data/lib/shotstack/models/render_response_data.rb +2 -2
- data/lib/shotstack/models/rotate_transformation.rb +2 -2
- data/lib/shotstack/models/shotstack_destination.rb +3 -4
- data/lib/shotstack/models/size.rb +2 -2
- data/lib/shotstack/models/skew_transformation.rb +2 -2
- data/lib/shotstack/models/soundtrack.rb +2 -2
- data/lib/shotstack/models/thumbnail.rb +2 -2
- data/lib/shotstack/models/timeline.rb +3 -3
- data/lib/shotstack/models/title_asset.rb +3 -4
- data/lib/shotstack/models/track.rb +2 -2
- data/lib/shotstack/models/transformation.rb +2 -2
- data/lib/shotstack/models/transition.rb +2 -2
- data/lib/shotstack/models/video_asset.rb +3 -4
- data/lib/shotstack/version.rb +3 -3
- data/lib/shotstack.rb +6 -3
- data/shotstack.gemspec +2 -2
- metadata +14 -14
- data/lib/shotstack/api/endpoints_api.rb +0 -158
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -127,7 +127,10 @@ module Shotstack
|
|
|
127
127
|
# HTTP header 'Accept' (if needed)
|
|
128
128
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
129
129
|
# HTTP header 'Content-Type'
|
|
130
|
-
|
|
130
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
131
|
+
if !content_type.nil?
|
|
132
|
+
header_params['Content-Type'] = content_type
|
|
133
|
+
end
|
|
131
134
|
|
|
132
135
|
# form parameters
|
|
133
136
|
form_params = opts[:form_params] || {}
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
data/lib/shotstack/api_client.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -296,7 +296,7 @@ module Shotstack
|
|
|
296
296
|
@config.base_url(opts[:operation]) + path
|
|
297
297
|
end
|
|
298
298
|
|
|
299
|
-
# Update
|
|
299
|
+
# Update header and query params based on authentication settings.
|
|
300
300
|
#
|
|
301
301
|
# @param [Hash] header_params Header parameters
|
|
302
302
|
# @param [Hash] query_params Query parameters
|
|
@@ -308,7 +308,7 @@ module Shotstack
|
|
|
308
308
|
case auth_setting[:in]
|
|
309
309
|
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
|
310
310
|
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
|
311
|
-
else fail ArgumentError, 'Authentication token must be in `query`
|
|
311
|
+
else fail ArgumentError, 'Authentication token must be in `query` or `header`'
|
|
312
312
|
end
|
|
313
313
|
end
|
|
314
314
|
end
|
data/lib/shotstack/api_error.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -147,13 +147,13 @@ module Shotstack
|
|
|
147
147
|
@server_operation_variables = {}
|
|
148
148
|
@api_key = {}
|
|
149
149
|
@api_key_prefix = {}
|
|
150
|
-
@timeout = 0
|
|
151
150
|
@client_side_validation = true
|
|
152
151
|
@verify_ssl = true
|
|
153
152
|
@verify_ssl_host = true
|
|
154
153
|
@params_encoding = nil
|
|
155
154
|
@cert_file = nil
|
|
156
155
|
@key_file = nil
|
|
156
|
+
@timeout = 0
|
|
157
157
|
@debugging = false
|
|
158
158
|
@inject_format = false
|
|
159
159
|
@force_ending_format = false
|
|
@@ -197,11 +197,13 @@ module Shotstack
|
|
|
197
197
|
|
|
198
198
|
# Gets API key (with prefix if set).
|
|
199
199
|
# @param [String] param_name the parameter name of API key auth
|
|
200
|
-
def api_key_with_prefix(param_name)
|
|
200
|
+
def api_key_with_prefix(param_name, param_alias = nil)
|
|
201
|
+
key = @api_key[param_name]
|
|
202
|
+
key = @api_key.fetch(param_alias, key) unless param_alias.nil?
|
|
201
203
|
if @api_key_prefix[param_name]
|
|
202
|
-
"#{@api_key_prefix[param_name]} #{
|
|
204
|
+
"#{@api_key_prefix[param_name]} #{key}"
|
|
203
205
|
else
|
|
204
|
-
|
|
206
|
+
key
|
|
205
207
|
end
|
|
206
208
|
end
|
|
207
209
|
|
|
@@ -295,5 +297,6 @@ module Shotstack
|
|
|
295
297
|
|
|
296
298
|
url
|
|
297
299
|
end
|
|
300
|
+
|
|
298
301
|
end
|
|
299
302
|
end
|
|
@@ -1,17 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shotstack
|
|
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>
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
1
16
|
module Shotstack
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
17
|
+
# The type of asset to display for the duration of this Clip. Value must be one of: <ul> <li><a href=\"#tocs_videoasset\">VideoAsset</a></li> <li><a href=\"#tocs_imageasset\">ImageAsset</a></li> <li><a href=\"#tocs_titleasset\">TitleAsset</a></li> <li><a href=\"#tocs_htmlasset\">HtmlAsset</a></li> <li><a href=\"#tocs_audioasset\">AudioAsset</a></li> <li><a href=\"#tocs_lumaasset\">LumaAsset</a></li> </ul>
|
|
18
|
+
module Asset
|
|
19
|
+
class << self
|
|
20
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
21
|
+
def openapi_one_of
|
|
22
|
+
[
|
|
23
|
+
:'AudioAsset',
|
|
24
|
+
:'HtmlAsset',
|
|
25
|
+
:'ImageAsset',
|
|
26
|
+
:'LumaAsset',
|
|
27
|
+
:'TitleAsset',
|
|
28
|
+
:'VideoAsset'
|
|
29
|
+
]
|
|
30
|
+
end
|
|
9
31
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
32
|
+
# Discriminator's property name (OpenAPI v3)
|
|
33
|
+
def openapi_discriminator_name
|
|
34
|
+
:'asset'
|
|
35
|
+
end
|
|
14
36
|
|
|
37
|
+
# Builds the object
|
|
38
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
39
|
+
# @return [Object] Returns the model or the data itself
|
|
40
|
+
def build(data)
|
|
41
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
42
|
+
return nil unless discriminator_value
|
|
43
|
+
Shotstack.const_get(discriminator_value).build_from_hash(data)
|
|
44
|
+
end
|
|
15
45
|
end
|
|
16
46
|
end
|
|
47
|
+
|
|
17
48
|
end
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -1,22 +1,21 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
require 'time'
|
|
15
|
-
require_relative 'asset'
|
|
16
15
|
|
|
17
16
|
module Shotstack
|
|
18
17
|
# The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.
|
|
19
|
-
class AudioAsset
|
|
18
|
+
class AudioAsset
|
|
20
19
|
# The type of asset - set to `audio` for audio assets.
|
|
21
20
|
attr_accessor :type
|
|
22
21
|
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -16,7 +16,6 @@ require 'time'
|
|
|
16
16
|
module Shotstack
|
|
17
17
|
# A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.
|
|
18
18
|
class Clip
|
|
19
|
-
# The type of asset to display for the duration of this Clip. Value must be one of: <ul> <li><a href=\"#tocs_videoasset\">VideoAsset</a></li> <li><a href=\"#tocs_imageasset\">ImageAsset</a></li> <li><a href=\"#tocs_titleasset\">TitleAsset</a></li> <li><a href=\"#tocs_htmlasset\">HtmlAsset</a></li> <li><a href=\"#tocs_audioasset\">AudioAsset</a></li> <li><a href=\"#tocs_lumaasset\">LumaAsset</a></li> </ul>
|
|
20
19
|
attr_accessor :asset
|
|
21
20
|
|
|
22
21
|
# The start position of the Clip on the timeline, in seconds.
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
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
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 5.
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -1,5 +1,155 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shotstack
|
|
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>
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
1
16
|
module Shotstack
|
|
17
|
+
# A destination is a location where output files can be sent to for serving or hosting. By default all rendered assets are automatically sent to the [Shotstack hosting destination](https://shotstack.io/docs/guide/serving-assets/hosting). You can add other destinations to send assets to. The following destinations are available: <ul> <li><a href=\"#tocs_shotstackdestination\">DestinationShotstack</a></li> <li><a href=\"#tocs_muxdestination\">DestinationMux</a></li> </ul>
|
|
2
18
|
class Destinations
|
|
19
|
+
# The destination to send rendered assets to - set to `mux` for Mux.
|
|
20
|
+
attr_accessor :provider
|
|
21
|
+
|
|
22
|
+
# Set to `true` to opt-out from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.
|
|
23
|
+
attr_accessor :exclude
|
|
24
|
+
|
|
25
|
+
attr_accessor :options
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'provider' => :'provider',
|
|
31
|
+
:'exclude' => :'exclude',
|
|
32
|
+
:'options' => :'options'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'provider' => :'String',
|
|
45
|
+
:'exclude' => :'Boolean',
|
|
46
|
+
:'options' => :'MuxDestinationOptions'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
57
|
+
def self.openapi_any_of
|
|
58
|
+
[
|
|
59
|
+
:'MuxDestination',
|
|
60
|
+
:'ShotstackDestination'
|
|
61
|
+
]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# discriminator's property name in OpenAPI v3
|
|
65
|
+
def self.openapi_discriminator_name
|
|
66
|
+
:'destinations'
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Initializes the object
|
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
71
|
+
def initialize(attributes = {})
|
|
72
|
+
if (!attributes.is_a?(Hash))
|
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shotstack::Destinations` initialize method"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shotstack::Destinations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'provider')
|
|
85
|
+
self.provider = attributes[:'provider']
|
|
86
|
+
else
|
|
87
|
+
self.provider = 'mux'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'exclude')
|
|
91
|
+
self.exclude = attributes[:'exclude']
|
|
92
|
+
else
|
|
93
|
+
self.exclude = false
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'options')
|
|
97
|
+
self.options = attributes[:'options']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
invalid_properties = Array.new
|
|
105
|
+
if @provider.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "provider", provider cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
invalid_properties
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Check to see if the all the properties in the model are valid
|
|
113
|
+
# @return true if the model is valid
|
|
114
|
+
def valid?
|
|
115
|
+
return false if @provider.nil?
|
|
116
|
+
_any_of_found = false
|
|
117
|
+
self.class.openapi_any_of.each do |_class|
|
|
118
|
+
_any_of = Shotstack.const_get(_class).build_from_hash(self.to_hash)
|
|
119
|
+
if _any_of.valid?
|
|
120
|
+
_any_of_found = true
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if !_any_of_found
|
|
125
|
+
return false
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
provider == o.provider &&
|
|
137
|
+
exclude == o.exclude &&
|
|
138
|
+
options == o.options
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @see the `==` method
|
|
142
|
+
# @param [Object] Object to be compared
|
|
143
|
+
def eql?(o)
|
|
144
|
+
self == o
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Calculates hash code according to all attributes.
|
|
148
|
+
# @return [Integer] Hash code
|
|
149
|
+
def hash
|
|
150
|
+
[provider, exclude, options].hash
|
|
151
|
+
end
|
|
152
|
+
|
|
3
153
|
# Builds the object from hash
|
|
4
154
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
5
155
|
# @return [Object] Returns the model itself
|
|
@@ -11,7 +161,113 @@ module Shotstack
|
|
|
11
161
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
12
162
|
# @return [Object] Returns the model itself
|
|
13
163
|
def build_from_hash(attributes)
|
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
|
165
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
166
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
167
|
+
self.send("#{key}=", nil)
|
|
168
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
169
|
+
# check to ensure the input is an array given that the attribute
|
|
170
|
+
# is documented as an array but the input is not
|
|
171
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
172
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
173
|
+
end
|
|
174
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
175
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
176
|
+
end
|
|
177
|
+
end
|
|
14
178
|
|
|
179
|
+
self
|
|
15
180
|
end
|
|
181
|
+
|
|
182
|
+
# Deserializes the data based on type
|
|
183
|
+
# @param string type Data type
|
|
184
|
+
# @param string value Value to be deserialized
|
|
185
|
+
# @return [Object] Deserialized data
|
|
186
|
+
def _deserialize(type, value)
|
|
187
|
+
case type.to_sym
|
|
188
|
+
when :Time
|
|
189
|
+
Time.parse(value)
|
|
190
|
+
when :Date
|
|
191
|
+
Date.parse(value)
|
|
192
|
+
when :String
|
|
193
|
+
value.to_s
|
|
194
|
+
when :Integer
|
|
195
|
+
value.to_i
|
|
196
|
+
when :Float
|
|
197
|
+
value.to_f
|
|
198
|
+
when :Boolean
|
|
199
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
200
|
+
true
|
|
201
|
+
else
|
|
202
|
+
false
|
|
203
|
+
end
|
|
204
|
+
when :Object
|
|
205
|
+
# generic object (usually a Hash), return directly
|
|
206
|
+
value
|
|
207
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
208
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
209
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
210
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
211
|
+
k_type = Regexp.last_match[:k_type]
|
|
212
|
+
v_type = Regexp.last_match[:v_type]
|
|
213
|
+
{}.tap do |hash|
|
|
214
|
+
value.each do |k, v|
|
|
215
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
else # model
|
|
219
|
+
# models (e.g. Pet) or oneOf
|
|
220
|
+
klass = Shotstack.const_get(type)
|
|
221
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Returns the string representation of the object
|
|
226
|
+
# @return [String] String presentation of the object
|
|
227
|
+
def to_s
|
|
228
|
+
to_hash.to_s
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
|
233
|
+
def to_body
|
|
234
|
+
to_hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Returns the object in the form of hash
|
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
|
239
|
+
def to_hash
|
|
240
|
+
hash = {}
|
|
241
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
242
|
+
value = self.send(attr)
|
|
243
|
+
if value.nil?
|
|
244
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
245
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
hash[param] = _to_hash(value)
|
|
249
|
+
end
|
|
250
|
+
hash
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Outputs non-array value in the form of hash
|
|
254
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
255
|
+
# @param [Object] value Any valid value
|
|
256
|
+
# @return [Hash] Returns the value in the form of hash
|
|
257
|
+
def _to_hash(value)
|
|
258
|
+
if value.is_a?(Array)
|
|
259
|
+
value.compact.map { |v| _to_hash(v) }
|
|
260
|
+
elsif value.is_a?(Hash)
|
|
261
|
+
{}.tap do |hash|
|
|
262
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
263
|
+
end
|
|
264
|
+
elsif value.respond_to? :to_hash
|
|
265
|
+
value.to_hash
|
|
266
|
+
else
|
|
267
|
+
value
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
16
271
|
end
|
|
272
|
+
|
|
17
273
|
end
|