shotstack 0.1.7 → 0.1.8
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/lib/shotstack.rb +9 -1
- data/lib/shotstack/api/edit_api.rb +155 -0
- data/lib/shotstack/api/serve_api.rb +224 -0
- data/lib/shotstack/api_client.rb +1 -1
- data/lib/shotstack/api_error.rb +1 -1
- data/lib/shotstack/configuration.rb +16 -2
- data/lib/shotstack/models/asset_render_response.rb +222 -0
- data/lib/shotstack/models/asset_response.rb +219 -0
- data/lib/shotstack/models/asset_response_attributes.rb +334 -0
- data/lib/shotstack/models/asset_response_data.rb +229 -0
- data/lib/shotstack/models/audio_asset.rb +1 -1
- data/lib/shotstack/models/clip.rb +1 -1
- data/lib/shotstack/models/crop.rb +1 -1
- data/lib/shotstack/models/destinations.rb +17 -0
- data/lib/shotstack/models/edit.rb +3 -3
- data/lib/shotstack/models/font.rb +1 -1
- data/lib/shotstack/models/html_asset.rb +1 -1
- data/lib/shotstack/models/image_asset.rb +1 -1
- data/lib/shotstack/models/luma_asset.rb +4 -4
- data/lib/shotstack/models/offset.rb +1 -1
- data/lib/shotstack/models/output.rb +56 -16
- data/lib/shotstack/models/poster.rb +1 -1
- data/lib/shotstack/models/queued_response.rb +2 -1
- data/lib/shotstack/models/queued_response_data.rb +2 -1
- data/lib/shotstack/models/range.rb +3 -3
- data/lib/shotstack/models/render_response.rb +2 -1
- data/lib/shotstack/models/render_response_data.rb +6 -5
- data/lib/shotstack/models/shotstack_destination.rb +240 -0
- data/lib/shotstack/models/size.rb +278 -0
- data/lib/shotstack/models/soundtrack.rb +1 -1
- data/lib/shotstack/models/thumbnail.rb +2 -2
- data/lib/shotstack/models/timeline.rb +2 -2
- data/lib/shotstack/models/title_asset.rb +1 -1
- data/lib/shotstack/models/track.rb +1 -1
- data/lib/shotstack/models/transition.rb +7 -7
- data/lib/shotstack/models/video_asset.rb +1 -1
- data/lib/shotstack/version.rb +2 -2
- data/shotstack.gemspec +2 -2
- metadata +19 -7
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Shotstack
|
2
|
+
class Destinations
|
3
|
+
# Builds the object from hash
|
4
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
5
|
+
# @return [Object] Returns the model itself
|
6
|
+
def self.build_from_hash(attributes)
|
7
|
+
new.build_from_hash(attributes)
|
8
|
+
end
|
9
|
+
|
10
|
+
# Builds the object from hash
|
11
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
12
|
+
# @return [Object] Returns the model itself
|
13
|
+
def build_from_hash(attributes)
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
-
# An edit defines the
|
17
|
+
# An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format.
|
18
18
|
class Edit
|
19
19
|
attr_accessor :timeline
|
20
20
|
|
@@ -23,7 +23,7 @@ module Shotstack
|
|
23
23
|
# An optional webhook callback URL used to receive status notifications when a render completes or fails. See [webhooks](https://shotstack.gitbook.io/docs/guides/architecting-an-application/webhooks) for more details.
|
24
24
|
attr_accessor :callback
|
25
25
|
|
26
|
-
# The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.gitbook.io/docs/guides/architecting-an-application/disk-types) for more details. <ul> <li>`local` -
|
26
|
+
# The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.gitbook.io/docs/guides/architecting-an-application/disk-types) for more details. <ul> <li>`local` - optimized for high speed rendering with up to 512MB storage</li> <li>`mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render</li> </ul>
|
27
27
|
attr_accessor :disk
|
28
28
|
|
29
29
|
class EnumAttributeValidator
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -15,15 +15,15 @@ require 'time'
|
|
15
15
|
require_relative 'asset'
|
16
16
|
|
17
17
|
module Shotstack
|
18
|
-
# The LumaAsset is used to create luma matte transitions between other assets. A luma matte is
|
18
|
+
# The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file.
|
19
19
|
class LumaAsset < Asset
|
20
20
|
# The type of asset - set to `luma` for luma mattes.
|
21
21
|
attr_accessor :type
|
22
22
|
|
23
|
-
# The luma matte
|
23
|
+
# The luma matte source URL. The URL must be publicly accessible or include credentials.
|
24
24
|
attr_accessor :src
|
25
25
|
|
26
|
-
# The start trim point of the luma
|
26
|
+
# The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached.
|
27
27
|
attr_accessor :trim
|
28
28
|
|
29
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -16,27 +16,35 @@ require 'time'
|
|
16
16
|
module Shotstack
|
17
17
|
# The output format, render range and type of media to generate.
|
18
18
|
class Output
|
19
|
-
# The output format and type of media file to generate. <ul> <li>`mp4` - mp4 video file</li> <li>`gif` - animated gif</li> <li>`mp3` - mp3 audio file (
|
19
|
+
# The output format and type of media file to generate. <ul> <li>`mp4` - mp4 video file</li> <li>`gif` - animated gif</li> <li>`jpg` - jpg image file</li> <li>`png` - png image file</li> <li>`bmp` - bmp image file</li> <li>`mp3` - mp3 audio file (audio only)</li> </ul>
|
20
20
|
attr_accessor :format
|
21
21
|
|
22
|
-
# The output resolution of the video. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @ 25fps</li> <li>`hd` - 1280px x 720px @ 25fps</li> <li>`1080` - 1920px x 1080px @ 25fps</li> </ul>
|
22
|
+
# The output resolution of the video or image. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @ 25fps</li> <li>`hd` - 1280px x 720px @ 25fps</li> <li>`1080` - 1920px x 1080px @ 25fps</li> </ul>
|
23
23
|
attr_accessor :resolution
|
24
24
|
|
25
|
-
# The aspect ratio (shape) of the video. Useful for social media
|
25
|
+
# The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul> <li>`16:9` - regular landscape/horizontal aspect ratio (default)</li> <li>`9:16` - vertical/portrait aspect ratio</li> <li>`1:1` - square aspect ratio</li> <li>`4:5` - short vertical/portrait aspect ratio</li> <li>`4:3` - legacy TV aspect ratio</li> </ul>
|
26
26
|
attr_accessor :aspect_ratio
|
27
27
|
|
28
|
+
attr_accessor :size
|
29
|
+
|
28
30
|
# Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`25` - 25fps</li> <li>`30` - 30fps</li> </ul>
|
29
31
|
attr_accessor :fps
|
30
32
|
|
31
|
-
# Override the resolution and scale the video to render at a different size. When using scaleTo the
|
33
|
+
# Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @25fps</li> <li>`hd` - 1280px x 720px @25fps</li> <li>`1080` - 1920px x 1080px @25fps</li> </ul>
|
32
34
|
attr_accessor :scale_to
|
33
35
|
|
36
|
+
# Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul> <li>`low` - slightly reduced quality, smaller file size</li> <li>`medium` - optimized quality, render speeds and file size</li> <li>`high` - slightly increased quality, larger file size</li> </ul>
|
37
|
+
attr_accessor :quality
|
38
|
+
|
34
39
|
attr_accessor :range
|
35
40
|
|
36
41
|
attr_accessor :poster
|
37
42
|
|
38
43
|
attr_accessor :thumbnail
|
39
44
|
|
45
|
+
# 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. [DestinationShotstack](/#tocs_shotstackdestination) is currently the only option with plans to add more in the future such as S3, YouTube, Vimeo and Mux. If you do not require hosting you can opt-out using the `exclude` property.
|
46
|
+
attr_accessor :destinations
|
47
|
+
|
40
48
|
class EnumAttributeValidator
|
41
49
|
attr_reader :datatype
|
42
50
|
attr_reader :allowable_values
|
@@ -65,11 +73,14 @@ module Shotstack
|
|
65
73
|
:'format' => :'format',
|
66
74
|
:'resolution' => :'resolution',
|
67
75
|
:'aspect_ratio' => :'aspectRatio',
|
76
|
+
:'size' => :'size',
|
68
77
|
:'fps' => :'fps',
|
69
78
|
:'scale_to' => :'scaleTo',
|
79
|
+
:'quality' => :'quality',
|
70
80
|
:'range' => :'range',
|
71
81
|
:'poster' => :'poster',
|
72
|
-
:'thumbnail' => :'thumbnail'
|
82
|
+
:'thumbnail' => :'thumbnail',
|
83
|
+
:'destinations' => :'destinations'
|
73
84
|
}
|
74
85
|
end
|
75
86
|
|
@@ -84,11 +95,14 @@ module Shotstack
|
|
84
95
|
:'format' => :'String',
|
85
96
|
:'resolution' => :'String',
|
86
97
|
:'aspect_ratio' => :'String',
|
98
|
+
:'size' => :'Size',
|
87
99
|
:'fps' => :'Integer',
|
88
100
|
:'scale_to' => :'String',
|
101
|
+
:'quality' => :'String',
|
89
102
|
:'range' => :'Range',
|
90
103
|
:'poster' => :'Poster',
|
91
|
-
:'thumbnail' => :'Thumbnail'
|
104
|
+
:'thumbnail' => :'Thumbnail',
|
105
|
+
:'destinations' => :'Array<Destinations>'
|
92
106
|
}
|
93
107
|
end
|
94
108
|
|
@@ -125,6 +139,10 @@ module Shotstack
|
|
125
139
|
self.aspect_ratio = attributes[:'aspect_ratio']
|
126
140
|
end
|
127
141
|
|
142
|
+
if attributes.key?(:'size')
|
143
|
+
self.size = attributes[:'size']
|
144
|
+
end
|
145
|
+
|
128
146
|
if attributes.key?(:'fps')
|
129
147
|
self.fps = attributes[:'fps']
|
130
148
|
else
|
@@ -135,6 +153,12 @@ module Shotstack
|
|
135
153
|
self.scale_to = attributes[:'scale_to']
|
136
154
|
end
|
137
155
|
|
156
|
+
if attributes.key?(:'quality')
|
157
|
+
self.quality = attributes[:'quality']
|
158
|
+
else
|
159
|
+
self.quality = 'medium'
|
160
|
+
end
|
161
|
+
|
138
162
|
if attributes.key?(:'range')
|
139
163
|
self.range = attributes[:'range']
|
140
164
|
end
|
@@ -146,6 +170,12 @@ module Shotstack
|
|
146
170
|
if attributes.key?(:'thumbnail')
|
147
171
|
self.thumbnail = attributes[:'thumbnail']
|
148
172
|
end
|
173
|
+
|
174
|
+
if attributes.key?(:'destinations')
|
175
|
+
if (value = attributes[:'destinations']).is_a?(Array)
|
176
|
+
self.destinations = value
|
177
|
+
end
|
178
|
+
end
|
149
179
|
end
|
150
180
|
|
151
181
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -156,10 +186,6 @@ module Shotstack
|
|
156
186
|
invalid_properties.push('invalid value for "format", format cannot be nil.')
|
157
187
|
end
|
158
188
|
|
159
|
-
if @resolution.nil?
|
160
|
-
invalid_properties.push('invalid value for "resolution", resolution cannot be nil.')
|
161
|
-
end
|
162
|
-
|
163
189
|
invalid_properties
|
164
190
|
end
|
165
191
|
|
@@ -169,15 +195,16 @@ module Shotstack
|
|
169
195
|
return false if @format.nil?
|
170
196
|
format_validator = EnumAttributeValidator.new('String', ["mp4", "gif", "mp3", "jpg", "png", "bmp"])
|
171
197
|
return false unless format_validator.valid?(@format)
|
172
|
-
return false if @resolution.nil?
|
173
198
|
resolution_validator = EnumAttributeValidator.new('String', ["preview", "mobile", "sd", "hd", "1080"])
|
174
199
|
return false unless resolution_validator.valid?(@resolution)
|
175
|
-
aspect_ratio_validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5"])
|
200
|
+
aspect_ratio_validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5", "4:3"])
|
176
201
|
return false unless aspect_ratio_validator.valid?(@aspect_ratio)
|
177
202
|
fps_validator = EnumAttributeValidator.new('Integer', [12, 15, 24, 25, 30])
|
178
203
|
return false unless fps_validator.valid?(@fps)
|
179
204
|
scale_to_validator = EnumAttributeValidator.new('String', ["preview", "mobile", "sd", "hd", "1080"])
|
180
205
|
return false unless scale_to_validator.valid?(@scale_to)
|
206
|
+
quality_validator = EnumAttributeValidator.new('String', ["low", "medium", "high"])
|
207
|
+
return false unless quality_validator.valid?(@quality)
|
181
208
|
true
|
182
209
|
end
|
183
210
|
|
@@ -204,7 +231,7 @@ module Shotstack
|
|
204
231
|
# Custom attribute writer method checking allowed values (enum).
|
205
232
|
# @param [Object] aspect_ratio Object to be assigned
|
206
233
|
def aspect_ratio=(aspect_ratio)
|
207
|
-
validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5"])
|
234
|
+
validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5", "4:3"])
|
208
235
|
unless validator.valid?(aspect_ratio)
|
209
236
|
fail ArgumentError, "invalid value for \"aspect_ratio\", must be one of #{validator.allowable_values}."
|
210
237
|
end
|
@@ -231,6 +258,16 @@ module Shotstack
|
|
231
258
|
@scale_to = scale_to
|
232
259
|
end
|
233
260
|
|
261
|
+
# Custom attribute writer method checking allowed values (enum).
|
262
|
+
# @param [Object] quality Object to be assigned
|
263
|
+
def quality=(quality)
|
264
|
+
validator = EnumAttributeValidator.new('String', ["low", "medium", "high"])
|
265
|
+
unless validator.valid?(quality)
|
266
|
+
fail ArgumentError, "invalid value for \"quality\", must be one of #{validator.allowable_values}."
|
267
|
+
end
|
268
|
+
@quality = quality
|
269
|
+
end
|
270
|
+
|
234
271
|
# Checks equality by comparing each attribute.
|
235
272
|
# @param [Object] Object to be compared
|
236
273
|
def ==(o)
|
@@ -239,11 +276,14 @@ module Shotstack
|
|
239
276
|
format == o.format &&
|
240
277
|
resolution == o.resolution &&
|
241
278
|
aspect_ratio == o.aspect_ratio &&
|
279
|
+
size == o.size &&
|
242
280
|
fps == o.fps &&
|
243
281
|
scale_to == o.scale_to &&
|
282
|
+
quality == o.quality &&
|
244
283
|
range == o.range &&
|
245
284
|
poster == o.poster &&
|
246
|
-
thumbnail == o.thumbnail
|
285
|
+
thumbnail == o.thumbnail &&
|
286
|
+
destinations == o.destinations
|
247
287
|
end
|
248
288
|
|
249
289
|
# @see the `==` method
|
@@ -255,7 +295,7 @@ module Shotstack
|
|
255
295
|
# Calculates hash code according to all attributes.
|
256
296
|
# @return [Integer] Hash code
|
257
297
|
def hash
|
258
|
-
[format, resolution, aspect_ratio, fps, scale_to, range, poster, thumbnail].hash
|
298
|
+
[format, resolution, aspect_ratio, size, fps, scale_to, quality, range, poster, thumbnail, destinations].hash
|
259
299
|
end
|
260
300
|
|
261
301
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
+
# The response received after a [render request](#render-asset) is submitted. The render task is queued for rendering and a unique render id is returned.
|
17
18
|
class QueuedResponse
|
18
19
|
# `true` if successfully queued, else `false`.
|
19
20
|
attr_accessor :success
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
+
# The response data returned with the [QueuedResponse](#tocs_queuedresponse).
|
17
18
|
class QueuedResponseData
|
18
19
|
# Success response message or error details.
|
19
20
|
attr_accessor :message
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -14,12 +14,12 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
-
# Specify a time range to render, i.e. to render only a portion of a video or audio file. Omit this setting to export the entire video.
|
17
|
+
# Specify a time range to render, i.e. to render only a portion of a video or audio file. Omit this setting to export the entire video. Range can also be used to render a frame at a specific time point - setting a range and output format as `jpg` will output a single frame image at the range `start` point.
|
18
18
|
class Range
|
19
19
|
# The point on the timeline, in seconds, to start the render from - i.e. start at second 3.
|
20
20
|
attr_accessor :start
|
21
21
|
|
22
|
-
# The length of the portion of the video to render - i.e. render 6 seconds of the video.
|
22
|
+
# The length of the portion of the video or audio to render - i.e. render 6 seconds of the video.
|
23
23
|
attr_accessor :length
|
24
24
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
+
# The response received after a [render status request](#get-render-status) is submitted. The response includes details about status of a render and the output URL.
|
17
18
|
class RenderResponse
|
18
19
|
# `true` if status available, else `false`.
|
19
20
|
attr_accessor :success
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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.gitbook.io/docs/guides/getting-started) 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
|
|
@@ -14,6 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Shotstack
|
17
|
+
# The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
|
17
18
|
class RenderResponseData
|
18
19
|
# The id of the render task in UUID format.
|
19
20
|
attr_accessor :id
|
@@ -24,19 +25,19 @@ module Shotstack
|
|
24
25
|
# The customer subscription plan.
|
25
26
|
attr_accessor :plan
|
26
27
|
|
27
|
-
# The status of the render task. <ul> <li>`queued` - render is queued waiting to be rendered</li> <li>`fetching` - assets are being fetched</li> <li>`rendering` - the
|
28
|
+
# The status of the render task. <ul> <li>`queued` - render is queued waiting to be rendered</li> <li>`fetching` - assets are being fetched</li> <li>`rendering` - the asset is being rendered</li> <li>`saving` - the final asset is being saved to storage</li> <li>`done` - the asset is ready to be downloaded</li> <li>`failed` - there was an error rendering the asset</li> </ul>
|
28
29
|
attr_accessor :status
|
29
30
|
|
30
31
|
# An error message, only displayed if an error occurred.
|
31
32
|
attr_accessor :error
|
32
33
|
|
33
|
-
# The output video length in seconds.
|
34
|
+
# The output video or audio length in seconds.
|
34
35
|
attr_accessor :duration
|
35
36
|
|
36
|
-
# The time taken to render the
|
37
|
+
# The time taken to render the asset in milliseconds.
|
37
38
|
attr_accessor :render_time
|
38
39
|
|
39
|
-
# The URL of the final
|
40
|
+
# The URL of the final asset. This will only be available if status is done. This is a temporary URL and will be deleted after 24 hours. By default all assets are copied to the Shotstack hosting and CDN destination.
|
40
41
|
attr_accessor :url
|
41
42
|
|
42
43
|
# The URL of the poster image if requested. This will only be available if status is done.
|