shotstack 0.0.10 → 0.1.3
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 +17 -12
- data/lib/shotstack.rb +12 -5
- data/lib/shotstack/api/{default_api.rb → endpoints_api.rb} +63 -38
- data/lib/shotstack/api_client.rb +33 -34
- data/lib/shotstack/api_error.rb +4 -4
- data/lib/shotstack/configuration.rb +11 -10
- data/lib/shotstack/models/audio_asset.rb +253 -0
- data/lib/shotstack/models/clip.rb +104 -15
- data/lib/shotstack/models/edit.rb +30 -10
- data/lib/shotstack/models/font.rb +213 -0
- data/lib/shotstack/models/html_asset.rb +319 -0
- data/lib/shotstack/models/image_asset.rb +17 -7
- data/lib/shotstack/models/luma_asset.rb +241 -0
- data/lib/shotstack/models/offset.rb +270 -0
- data/lib/shotstack/models/output.rb +84 -10
- data/lib/shotstack/models/poster.rb +213 -0
- data/lib/shotstack/models/queued_response.rb +17 -5
- data/lib/shotstack/models/queued_response_data.rb +17 -7
- data/lib/shotstack/models/render_response.rb +17 -5
- data/lib/shotstack/models/render_response_data.rb +106 -26
- data/lib/shotstack/models/soundtrack.rb +68 -17
- data/lib/shotstack/models/thumbnail.rb +228 -0
- data/lib/shotstack/models/timeline.rb +33 -9
- data/lib/shotstack/models/title_asset.rb +103 -14
- data/lib/shotstack/models/track.rb +16 -6
- data/lib/shotstack/models/transition.rb +21 -11
- data/lib/shotstack/models/video_asset.rb +20 -10
- data/lib/shotstack/version.rb +5 -5
- data/shotstack.gemspec +6 -12
- metadata +15 -126
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Shotstack
|
|
3
3
|
|
|
4
|
-
#The Shotstack API is a video editing service that allows for the
|
|
4
|
+
#The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.
|
|
9
|
+
OpenAPI Generator version: 4.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module Shotstack
|
|
16
|
-
# A timeline represents the contents of a video edit over time, in seconds. A timeline consists of layers called tracks. Tracks are composed of titles, images or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
|
|
16
|
+
# A timeline represents the contents of a video edit over time, in seconds. A timeline consists of layers called tracks. Tracks are composed of titles, images or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
|
|
17
17
|
class Timeline
|
|
18
18
|
attr_accessor :soundtrack
|
|
19
19
|
|
|
20
|
-
# A
|
|
20
|
+
# A hexadecimal value for the timeline background colour. Defaults to #000000 (black).
|
|
21
21
|
attr_accessor :background
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# An array of custom fonts to be downloaded for use by the HTML assets.
|
|
24
|
+
attr_accessor :fonts
|
|
25
|
+
|
|
26
|
+
# A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images.
|
|
24
27
|
attr_accessor :tracks
|
|
25
28
|
|
|
26
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -28,6 +31,7 @@ module Shotstack
|
|
|
28
31
|
{
|
|
29
32
|
:'soundtrack' => :'soundtrack',
|
|
30
33
|
:'background' => :'background',
|
|
34
|
+
:'fonts' => :'fonts',
|
|
31
35
|
:'tracks' => :'tracks'
|
|
32
36
|
}
|
|
33
37
|
end
|
|
@@ -37,10 +41,17 @@ module Shotstack
|
|
|
37
41
|
{
|
|
38
42
|
:'soundtrack' => :'Soundtrack',
|
|
39
43
|
:'background' => :'String',
|
|
44
|
+
:'fonts' => :'Array<Font>',
|
|
40
45
|
:'tracks' => :'Array<Track>'
|
|
41
46
|
}
|
|
42
47
|
end
|
|
43
48
|
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
44
55
|
# Initializes the object
|
|
45
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
57
|
def initialize(attributes = {})
|
|
@@ -62,6 +73,14 @@ module Shotstack
|
|
|
62
73
|
|
|
63
74
|
if attributes.key?(:'background')
|
|
64
75
|
self.background = attributes[:'background']
|
|
76
|
+
else
|
|
77
|
+
self.background = '#000000'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'fonts')
|
|
81
|
+
if (value = attributes[:'fonts']).is_a?(Array)
|
|
82
|
+
self.fonts = value
|
|
83
|
+
end
|
|
65
84
|
end
|
|
66
85
|
|
|
67
86
|
if attributes.key?(:'tracks')
|
|
@@ -96,6 +115,7 @@ module Shotstack
|
|
|
96
115
|
self.class == o.class &&
|
|
97
116
|
soundtrack == o.soundtrack &&
|
|
98
117
|
background == o.background &&
|
|
118
|
+
fonts == o.fonts &&
|
|
99
119
|
tracks == o.tracks
|
|
100
120
|
end
|
|
101
121
|
|
|
@@ -108,7 +128,7 @@ module Shotstack
|
|
|
108
128
|
# Calculates hash code according to all attributes.
|
|
109
129
|
# @return [Integer] Hash code
|
|
110
130
|
def hash
|
|
111
|
-
[soundtrack, background, tracks].hash
|
|
131
|
+
[soundtrack, background, fonts, tracks].hash
|
|
112
132
|
end
|
|
113
133
|
|
|
114
134
|
# Builds the object from hash
|
|
@@ -197,7 +217,11 @@ module Shotstack
|
|
|
197
217
|
hash = {}
|
|
198
218
|
self.class.attribute_map.each_pair do |attr, param|
|
|
199
219
|
value = self.send(attr)
|
|
200
|
-
|
|
220
|
+
if value.nil?
|
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
223
|
+
end
|
|
224
|
+
|
|
201
225
|
hash[param] = _to_hash(value)
|
|
202
226
|
end
|
|
203
227
|
hash
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Shotstack
|
|
3
3
|
|
|
4
|
-
#The Shotstack API is a video editing service that allows for the
|
|
4
|
+
#The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.
|
|
9
|
+
OpenAPI Generator version: 4.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,17 +14,31 @@ require 'date'
|
|
|
14
14
|
require_relative 'asset'
|
|
15
15
|
|
|
16
16
|
module Shotstack
|
|
17
|
-
# The TitleAsset clip type lets you create video titles from a text string and apply styling.
|
|
17
|
+
# The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
|
|
18
18
|
class TitleAsset < Asset
|
|
19
|
-
# The type of asset - set to
|
|
19
|
+
# The type of asset - set to `title` for titles.
|
|
20
20
|
attr_accessor :type
|
|
21
21
|
|
|
22
22
|
# The title text string - i.e. \"My Title\".
|
|
23
23
|
attr_accessor :text
|
|
24
24
|
|
|
25
|
-
# Uses a preset to apply font properties and
|
|
25
|
+
# Uses a preset to apply font properties and styling to the title. <ul> <li>`minimal`</li> <li>`blockbuster`</li> <li>`vogue`</li> <li>`sketchy`</li> <li>`skinny`</li> <li>`chunk`</li> <li>`chunkLight`</li> <li>`marker`</li> <li>`future`</li> <li>`subtitle`</li> </ul>
|
|
26
26
|
attr_accessor :style
|
|
27
27
|
|
|
28
|
+
# Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.
|
|
29
|
+
attr_accessor :color
|
|
30
|
+
|
|
31
|
+
# Set the relative size of the text using predefined sizes from xx-small to xx-large. <ul> <li>`xx-small`</li> <li>`x-small`</li> <li>`small`</li> <li>`medium`</li> <li>`large`</li> <li>`x-large`</li> <li>`xx-large`</li> </ul>
|
|
32
|
+
attr_accessor :size
|
|
33
|
+
|
|
34
|
+
# Apply a background color behind the text. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency. Omit to use transparent background.
|
|
35
|
+
attr_accessor :background
|
|
36
|
+
|
|
37
|
+
# Place the title in one of nine predefined positions of the viewport. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>
|
|
38
|
+
attr_accessor :position
|
|
39
|
+
|
|
40
|
+
attr_accessor :offset
|
|
41
|
+
|
|
28
42
|
class EnumAttributeValidator
|
|
29
43
|
attr_reader :datatype
|
|
30
44
|
attr_reader :allowable_values
|
|
@@ -52,7 +66,12 @@ module Shotstack
|
|
|
52
66
|
{
|
|
53
67
|
:'type' => :'type',
|
|
54
68
|
:'text' => :'text',
|
|
55
|
-
:'style' => :'style'
|
|
69
|
+
:'style' => :'style',
|
|
70
|
+
:'color' => :'color',
|
|
71
|
+
:'size' => :'size',
|
|
72
|
+
:'background' => :'background',
|
|
73
|
+
:'position' => :'position',
|
|
74
|
+
:'offset' => :'offset'
|
|
56
75
|
}
|
|
57
76
|
end
|
|
58
77
|
|
|
@@ -61,10 +80,21 @@ module Shotstack
|
|
|
61
80
|
{
|
|
62
81
|
:'type' => :'String',
|
|
63
82
|
:'text' => :'String',
|
|
64
|
-
:'style' => :'String'
|
|
83
|
+
:'style' => :'String',
|
|
84
|
+
:'color' => :'String',
|
|
85
|
+
:'size' => :'String',
|
|
86
|
+
:'background' => :'String',
|
|
87
|
+
:'position' => :'String',
|
|
88
|
+
:'offset' => :'Offset'
|
|
65
89
|
}
|
|
66
90
|
end
|
|
67
91
|
|
|
92
|
+
# List of attributes with nullable: true
|
|
93
|
+
def self.openapi_nullable
|
|
94
|
+
Set.new([
|
|
95
|
+
])
|
|
96
|
+
end
|
|
97
|
+
|
|
68
98
|
# Initializes the object
|
|
69
99
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
100
|
def initialize(attributes = {})
|
|
@@ -93,6 +123,32 @@ module Shotstack
|
|
|
93
123
|
if attributes.key?(:'style')
|
|
94
124
|
self.style = attributes[:'style']
|
|
95
125
|
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'color')
|
|
128
|
+
self.color = attributes[:'color']
|
|
129
|
+
else
|
|
130
|
+
self.color = '#ffffff'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'size')
|
|
134
|
+
self.size = attributes[:'size']
|
|
135
|
+
else
|
|
136
|
+
self.size = 'medium'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'background')
|
|
140
|
+
self.background = attributes[:'background']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'position')
|
|
144
|
+
self.position = attributes[:'position']
|
|
145
|
+
else
|
|
146
|
+
self.position = 'center'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'offset')
|
|
150
|
+
self.offset = attributes[:'offset']
|
|
151
|
+
end
|
|
96
152
|
end
|
|
97
153
|
|
|
98
154
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -115,21 +171,45 @@ module Shotstack
|
|
|
115
171
|
def valid?
|
|
116
172
|
return false if @type.nil?
|
|
117
173
|
return false if @text.nil?
|
|
118
|
-
style_validator = EnumAttributeValidator.new('String', ["minimal", "blockbuster", "vogue", "sketchy", "skinny"])
|
|
174
|
+
style_validator = EnumAttributeValidator.new('String', ["minimal", "blockbuster", "vogue", "sketchy", "skinny", "chunk", "chunkLight", "marker", "future", "subtitle"])
|
|
119
175
|
return false unless style_validator.valid?(@style)
|
|
176
|
+
size_validator = EnumAttributeValidator.new('String', ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"])
|
|
177
|
+
return false unless size_validator.valid?(@size)
|
|
178
|
+
position_validator = EnumAttributeValidator.new('String', ["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"])
|
|
179
|
+
return false unless position_validator.valid?(@position)
|
|
120
180
|
true
|
|
121
181
|
end
|
|
122
182
|
|
|
123
183
|
# Custom attribute writer method checking allowed values (enum).
|
|
124
184
|
# @param [Object] style Object to be assigned
|
|
125
185
|
def style=(style)
|
|
126
|
-
validator = EnumAttributeValidator.new('String', ["minimal", "blockbuster", "vogue", "sketchy", "skinny"])
|
|
186
|
+
validator = EnumAttributeValidator.new('String', ["minimal", "blockbuster", "vogue", "sketchy", "skinny", "chunk", "chunkLight", "marker", "future", "subtitle"])
|
|
127
187
|
unless validator.valid?(style)
|
|
128
188
|
fail ArgumentError, "invalid value for \"style\", must be one of #{validator.allowable_values}."
|
|
129
189
|
end
|
|
130
190
|
@style = style
|
|
131
191
|
end
|
|
132
192
|
|
|
193
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
194
|
+
# @param [Object] size Object to be assigned
|
|
195
|
+
def size=(size)
|
|
196
|
+
validator = EnumAttributeValidator.new('String', ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"])
|
|
197
|
+
unless validator.valid?(size)
|
|
198
|
+
fail ArgumentError, "invalid value for \"size\", must be one of #{validator.allowable_values}."
|
|
199
|
+
end
|
|
200
|
+
@size = size
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
204
|
+
# @param [Object] position Object to be assigned
|
|
205
|
+
def position=(position)
|
|
206
|
+
validator = EnumAttributeValidator.new('String', ["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"])
|
|
207
|
+
unless validator.valid?(position)
|
|
208
|
+
fail ArgumentError, "invalid value for \"position\", must be one of #{validator.allowable_values}."
|
|
209
|
+
end
|
|
210
|
+
@position = position
|
|
211
|
+
end
|
|
212
|
+
|
|
133
213
|
# Checks equality by comparing each attribute.
|
|
134
214
|
# @param [Object] Object to be compared
|
|
135
215
|
def ==(o)
|
|
@@ -137,7 +217,12 @@ module Shotstack
|
|
|
137
217
|
self.class == o.class &&
|
|
138
218
|
type == o.type &&
|
|
139
219
|
text == o.text &&
|
|
140
|
-
style == o.style
|
|
220
|
+
style == o.style &&
|
|
221
|
+
color == o.color &&
|
|
222
|
+
size == o.size &&
|
|
223
|
+
background == o.background &&
|
|
224
|
+
position == o.position &&
|
|
225
|
+
offset == o.offset
|
|
141
226
|
end
|
|
142
227
|
|
|
143
228
|
# @see the `==` method
|
|
@@ -149,7 +234,7 @@ module Shotstack
|
|
|
149
234
|
# Calculates hash code according to all attributes.
|
|
150
235
|
# @return [Integer] Hash code
|
|
151
236
|
def hash
|
|
152
|
-
[type, text, style].hash
|
|
237
|
+
[type, text, style, color, size, background, position, offset].hash
|
|
153
238
|
end
|
|
154
239
|
|
|
155
240
|
# Builds the object from hash
|
|
@@ -238,7 +323,11 @@ module Shotstack
|
|
|
238
323
|
hash = {}
|
|
239
324
|
self.class.attribute_map.each_pair do |attr, param|
|
|
240
325
|
value = self.send(attr)
|
|
241
|
-
|
|
326
|
+
if value.nil?
|
|
327
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
328
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
329
|
+
end
|
|
330
|
+
|
|
242
331
|
hash[param] = _to_hash(value)
|
|
243
332
|
end
|
|
244
333
|
hash
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Shotstack
|
|
3
3
|
|
|
4
|
-
#The Shotstack API is a video editing service that allows for the
|
|
4
|
+
#The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.
|
|
9
|
+
OpenAPI Generator version: 4.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module Shotstack
|
|
16
|
-
# A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
|
|
16
|
+
# A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
|
|
17
17
|
class Track
|
|
18
18
|
# An array of Clips comprising of TitleClip, ImageClip or VideoClip.
|
|
19
19
|
attr_accessor :clips
|
|
@@ -32,6 +32,12 @@ module Shotstack
|
|
|
32
32
|
}
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# List of attributes with nullable: true
|
|
36
|
+
def self.openapi_nullable
|
|
37
|
+
Set.new([
|
|
38
|
+
])
|
|
39
|
+
end
|
|
40
|
+
|
|
35
41
|
# Initializes the object
|
|
36
42
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
37
43
|
def initialize(attributes = {})
|
|
@@ -178,7 +184,11 @@ module Shotstack
|
|
|
178
184
|
hash = {}
|
|
179
185
|
self.class.attribute_map.each_pair do |attr, param|
|
|
180
186
|
value = self.send(attr)
|
|
181
|
-
|
|
187
|
+
if value.nil?
|
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
190
|
+
end
|
|
191
|
+
|
|
182
192
|
hash[param] = _to_hash(value)
|
|
183
193
|
end
|
|
184
194
|
hash
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Shotstack
|
|
3
3
|
|
|
4
|
-
#The Shotstack API is a video editing service that allows for the
|
|
4
|
+
#The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.
|
|
9
|
+
OpenAPI Generator version: 4.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -15,10 +15,10 @@ require 'date'
|
|
|
15
15
|
module Shotstack
|
|
16
16
|
# In and out transitions for a clip - i.e. fade in and fade out
|
|
17
17
|
class Transition
|
|
18
|
-
# The transition in
|
|
18
|
+
# The transition in. Available transitions are: <ul> <li>`fade` - fade in</li> <li>`reveal` - reveal from left to right</li> <li>`wipeLeft` - fade across screen to the left</li> <li>`wipeRight` - fade across screen to the right</li> <li>`slideLeft` - move slightly left and fade in</li> <li>`slideRight` - move slightly right and fade in</li> <li>`slideUp` - move slightly up and fade in</li> <li>`slideDown` - move slightly down and fade in</li> <li>`carouselLeft` - slide in from right to left</li> <li>`carouselRight` - slide in from left to right</li> <li>`carouselUp` - slide in from bottom to top</li> <li>`carouselDown` - slide in from top to bottom</li> <li>`zoom` - fast zoom in</li> </ul>
|
|
19
19
|
attr_accessor :_in
|
|
20
20
|
|
|
21
|
-
# The transition out
|
|
21
|
+
# The transition out. Available transitions are: <ul> <li>`fade` - fade out</li> <li>`reveal` - reveal from right to left</li> <li>`wipeLeft` - fade across screen to the left</li> <li>`wipeRight` - fade across screen to the right</li> <li>`slideLeft` - move slightly left and fade out</li> <li>`slideRight` - move slightly right and fade out</li> <li>`slideUp` - move slightly up and fade out</li> <li>`slideDown` - move slightly down and fade out</li> <li>`carouselLeft` - slide out from right to left</li> <li>`carouselRight` - slide out from left to right</li> <li>`carouselUp` - slide out from bottom to top</li> <li>`carouselDown` - slide out from top to bottom</li> <li>`zoom` - fast zoom out</li> </ul>
|
|
22
22
|
attr_accessor :out
|
|
23
23
|
|
|
24
24
|
class EnumAttributeValidator
|
|
@@ -59,6 +59,12 @@ module Shotstack
|
|
|
59
59
|
}
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
# List of attributes with nullable: true
|
|
63
|
+
def self.openapi_nullable
|
|
64
|
+
Set.new([
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
62
68
|
# Initializes the object
|
|
63
69
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
70
|
def initialize(attributes = {})
|
|
@@ -93,9 +99,9 @@ module Shotstack
|
|
|
93
99
|
# Check to see if the all the properties in the model are valid
|
|
94
100
|
# @return true if the model is valid
|
|
95
101
|
def valid?
|
|
96
|
-
_in_validator = EnumAttributeValidator.new('String', ["fade", "wipeLeft", "wipeRight"])
|
|
102
|
+
_in_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
97
103
|
return false unless _in_validator.valid?(@_in)
|
|
98
|
-
out_validator = EnumAttributeValidator.new('String', ["fade", "wipeLeft", "wipeRight"])
|
|
104
|
+
out_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
99
105
|
return false unless out_validator.valid?(@out)
|
|
100
106
|
true
|
|
101
107
|
end
|
|
@@ -103,7 +109,7 @@ module Shotstack
|
|
|
103
109
|
# Custom attribute writer method checking allowed values (enum).
|
|
104
110
|
# @param [Object] _in Object to be assigned
|
|
105
111
|
def _in=(_in)
|
|
106
|
-
validator = EnumAttributeValidator.new('String', ["fade", "wipeLeft", "wipeRight"])
|
|
112
|
+
validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
107
113
|
unless validator.valid?(_in)
|
|
108
114
|
fail ArgumentError, "invalid value for \"_in\", must be one of #{validator.allowable_values}."
|
|
109
115
|
end
|
|
@@ -113,7 +119,7 @@ module Shotstack
|
|
|
113
119
|
# Custom attribute writer method checking allowed values (enum).
|
|
114
120
|
# @param [Object] out Object to be assigned
|
|
115
121
|
def out=(out)
|
|
116
|
-
validator = EnumAttributeValidator.new('String', ["fade", "wipeLeft", "wipeRight"])
|
|
122
|
+
validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
117
123
|
unless validator.valid?(out)
|
|
118
124
|
fail ArgumentError, "invalid value for \"out\", must be one of #{validator.allowable_values}."
|
|
119
125
|
end
|
|
@@ -227,7 +233,11 @@ module Shotstack
|
|
|
227
233
|
hash = {}
|
|
228
234
|
self.class.attribute_map.each_pair do |attr, param|
|
|
229
235
|
value = self.send(attr)
|
|
230
|
-
|
|
236
|
+
if value.nil?
|
|
237
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
238
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
239
|
+
end
|
|
240
|
+
|
|
231
241
|
hash[param] = _to_hash(value)
|
|
232
242
|
end
|
|
233
243
|
hash
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Shotstack
|
|
3
3
|
|
|
4
|
-
#The Shotstack API is a video editing service that allows for the
|
|
4
|
+
#The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io
|
|
5
5
|
|
|
6
|
-
OpenAPI
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
OpenAPI Generator version: 4.
|
|
9
|
+
OpenAPI Generator version: 4.2.1
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -14,18 +14,18 @@ require 'date'
|
|
|
14
14
|
require_relative 'asset'
|
|
15
15
|
|
|
16
16
|
module Shotstack
|
|
17
|
-
# The VideoAsset is used to create video sequences from video files. The src must be a publicly
|
|
17
|
+
# The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.
|
|
18
18
|
class VideoAsset < Asset
|
|
19
|
-
# The type of asset - set to
|
|
19
|
+
# The type of asset - set to `video` for videos.
|
|
20
20
|
attr_accessor :type
|
|
21
21
|
|
|
22
|
-
# The video source URL. The URL must be publicly accessible or include credentials.
|
|
22
|
+
# The video source URL. The URL must be publicly accessible or include credentials.
|
|
23
23
|
attr_accessor :src
|
|
24
24
|
|
|
25
|
-
# The start trim point of the clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached.
|
|
25
|
+
# The start trim point of the video clip, in seconds (defaults to 0). Videos will start from the in trim point. The video will play until the file ends or the Clip length is reached.
|
|
26
26
|
attr_accessor :trim
|
|
27
27
|
|
|
28
|
-
# Set the volume for the clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 0).
|
|
28
|
+
# Set the volume for the video clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 0).
|
|
29
29
|
attr_accessor :volume
|
|
30
30
|
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -48,6 +48,12 @@ module Shotstack
|
|
|
48
48
|
}
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
51
57
|
# Initializes the object
|
|
52
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
59
|
def initialize(attributes = {})
|
|
@@ -214,7 +220,11 @@ module Shotstack
|
|
|
214
220
|
hash = {}
|
|
215
221
|
self.class.attribute_map.each_pair do |attr, param|
|
|
216
222
|
value = self.send(attr)
|
|
217
|
-
|
|
223
|
+
if value.nil?
|
|
224
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
225
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
226
|
+
end
|
|
227
|
+
|
|
218
228
|
hash[param] = _to_hash(value)
|
|
219
229
|
end
|
|
220
230
|
hash
|