shotstack 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -12
- data/lib/shotstack.rb +4 -2
- data/lib/shotstack/api/endpoints_api.rb +21 -12
- data/lib/shotstack/api_client.rb +50 -46
- data/lib/shotstack/api_error.rb +2 -2
- data/lib/shotstack/configuration.rb +36 -9
- data/lib/shotstack/models/audio_asset.rb +71 -13
- data/lib/shotstack/models/clip.rb +25 -11
- data/lib/shotstack/models/crop.rb +346 -0
- data/lib/shotstack/models/edit.rb +71 -13
- data/lib/shotstack/models/font.rb +21 -9
- data/lib/shotstack/models/html_asset.rb +28 -16
- data/lib/shotstack/models/image_asset.rb +35 -14
- data/lib/shotstack/models/luma_asset.rb +21 -9
- data/lib/shotstack/models/offset.rb +24 -8
- data/lib/shotstack/models/output.rb +61 -16
- data/lib/shotstack/models/poster.rb +20 -8
- data/lib/shotstack/models/queued_response.rb +22 -8
- data/lib/shotstack/models/queued_response_data.rb +22 -10
- data/lib/shotstack/models/range.rb +260 -0
- data/lib/shotstack/models/render_response.rb +22 -8
- data/lib/shotstack/models/render_response_data.rb +101 -29
- data/lib/shotstack/models/soundtrack.rb +23 -9
- data/lib/shotstack/models/thumbnail.rb +20 -8
- data/lib/shotstack/models/timeline.rb +36 -12
- data/lib/shotstack/models/title_asset.rb +25 -13
- data/lib/shotstack/models/track.rb +20 -8
- data/lib/shotstack/models/transition.rb +26 -14
- data/lib/shotstack/models/video_asset.rb +34 -13
- data/lib/shotstack/version.rb +3 -3
- data/shotstack.gemspec +8 -9
- metadata +11 -30
- data/shotstack-0.0.11.gem +0 -0
- data/shotstack-0.1.0.gem +0 -0
@@ -1,16 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
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
|
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
|
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:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Shotstack
|
16
17
|
# Generate a thumbnail image for the video at a specific point from the timeline.
|
@@ -29,6 +30,11 @@ module Shotstack
|
|
29
30
|
}
|
30
31
|
end
|
31
32
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
32
38
|
# Attribute type mapping.
|
33
39
|
def self.openapi_types
|
34
40
|
{
|
@@ -124,7 +130,9 @@ module Shotstack
|
|
124
130
|
def build_from_hash(attributes)
|
125
131
|
return nil unless attributes.is_a?(Hash)
|
126
132
|
self.class.openapi_types.each_pair do |key, type|
|
127
|
-
if
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
134
|
+
self.send("#{key}=", nil)
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
128
136
|
# check to ensure the input is an array given that the attribute
|
129
137
|
# is documented as an array but the input is not
|
130
138
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -132,7 +140,7 @@ module Shotstack
|
|
132
140
|
end
|
133
141
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
134
142
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
135
|
-
end
|
143
|
+
end
|
136
144
|
end
|
137
145
|
|
138
146
|
self
|
@@ -144,8 +152,8 @@ module Shotstack
|
|
144
152
|
# @return [Object] Deserialized data
|
145
153
|
def _deserialize(type, value)
|
146
154
|
case type.to_sym
|
147
|
-
when :
|
148
|
-
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
149
157
|
when :Date
|
150
158
|
Date.parse(value)
|
151
159
|
when :String
|
@@ -175,7 +183,9 @@ module Shotstack
|
|
175
183
|
end
|
176
184
|
end
|
177
185
|
else # model
|
178
|
-
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = Shotstack.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
189
|
end
|
180
190
|
end
|
181
191
|
|
@@ -201,7 +211,7 @@ module Shotstack
|
|
201
211
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
212
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
213
|
end
|
204
|
-
|
214
|
+
|
205
215
|
hash[param] = _to_hash(value)
|
206
216
|
end
|
207
217
|
hash
|
@@ -224,5 +234,7 @@ module Shotstack
|
|
224
234
|
value
|
225
235
|
end
|
226
236
|
end
|
237
|
+
|
227
238
|
end
|
239
|
+
|
228
240
|
end
|
@@ -1,16 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
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
|
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
|
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:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Shotstack
|
16
17
|
# 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.
|
@@ -26,23 +27,33 @@ module Shotstack
|
|
26
27
|
# 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.
|
27
28
|
attr_accessor :tracks
|
28
29
|
|
30
|
+
# Disable the caching of ingested source footage and assets. See [caching](https://shotstack.gitbook.io/docs/guides/architecting-an-application/caching) for more details.
|
31
|
+
attr_accessor :cache
|
32
|
+
|
29
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
34
|
def self.attribute_map
|
31
35
|
{
|
32
36
|
:'soundtrack' => :'soundtrack',
|
33
37
|
:'background' => :'background',
|
34
38
|
:'fonts' => :'fonts',
|
35
|
-
:'tracks' => :'tracks'
|
39
|
+
:'tracks' => :'tracks',
|
40
|
+
:'cache' => :'cache'
|
36
41
|
}
|
37
42
|
end
|
38
43
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
39
49
|
# Attribute type mapping.
|
40
50
|
def self.openapi_types
|
41
51
|
{
|
42
52
|
:'soundtrack' => :'Soundtrack',
|
43
53
|
:'background' => :'String',
|
44
54
|
:'fonts' => :'Array<Font>',
|
45
|
-
:'tracks' => :'Array<Track>'
|
55
|
+
:'tracks' => :'Array<Track>',
|
56
|
+
:'cache' => :'Boolean'
|
46
57
|
}
|
47
58
|
end
|
48
59
|
|
@@ -88,6 +99,12 @@ module Shotstack
|
|
88
99
|
self.tracks = value
|
89
100
|
end
|
90
101
|
end
|
102
|
+
|
103
|
+
if attributes.key?(:'cache')
|
104
|
+
self.cache = attributes[:'cache']
|
105
|
+
else
|
106
|
+
self.cache = true
|
107
|
+
end
|
91
108
|
end
|
92
109
|
|
93
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -116,7 +133,8 @@ module Shotstack
|
|
116
133
|
soundtrack == o.soundtrack &&
|
117
134
|
background == o.background &&
|
118
135
|
fonts == o.fonts &&
|
119
|
-
tracks == o.tracks
|
136
|
+
tracks == o.tracks &&
|
137
|
+
cache == o.cache
|
120
138
|
end
|
121
139
|
|
122
140
|
# @see the `==` method
|
@@ -128,7 +146,7 @@ module Shotstack
|
|
128
146
|
# Calculates hash code according to all attributes.
|
129
147
|
# @return [Integer] Hash code
|
130
148
|
def hash
|
131
|
-
[soundtrack, background, fonts, tracks].hash
|
149
|
+
[soundtrack, background, fonts, tracks, cache].hash
|
132
150
|
end
|
133
151
|
|
134
152
|
# Builds the object from hash
|
@@ -144,7 +162,9 @@ module Shotstack
|
|
144
162
|
def build_from_hash(attributes)
|
145
163
|
return nil unless attributes.is_a?(Hash)
|
146
164
|
self.class.openapi_types.each_pair do |key, type|
|
147
|
-
if
|
165
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
166
|
+
self.send("#{key}=", nil)
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
148
168
|
# check to ensure the input is an array given that the attribute
|
149
169
|
# is documented as an array but the input is not
|
150
170
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -152,7 +172,7 @@ module Shotstack
|
|
152
172
|
end
|
153
173
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
154
174
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
155
|
-
end
|
175
|
+
end
|
156
176
|
end
|
157
177
|
|
158
178
|
self
|
@@ -164,8 +184,8 @@ module Shotstack
|
|
164
184
|
# @return [Object] Deserialized data
|
165
185
|
def _deserialize(type, value)
|
166
186
|
case type.to_sym
|
167
|
-
when :
|
168
|
-
|
187
|
+
when :Time
|
188
|
+
Time.parse(value)
|
169
189
|
when :Date
|
170
190
|
Date.parse(value)
|
171
191
|
when :String
|
@@ -195,7 +215,9 @@ module Shotstack
|
|
195
215
|
end
|
196
216
|
end
|
197
217
|
else # model
|
198
|
-
|
218
|
+
# models (e.g. Pet) or oneOf
|
219
|
+
klass = Shotstack.const_get(type)
|
220
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
221
|
end
|
200
222
|
end
|
201
223
|
|
@@ -221,7 +243,7 @@ module Shotstack
|
|
221
243
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
222
244
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
223
245
|
end
|
224
|
-
|
246
|
+
|
225
247
|
hash[param] = _to_hash(value)
|
226
248
|
end
|
227
249
|
hash
|
@@ -244,5 +266,7 @@ module Shotstack
|
|
244
266
|
value
|
245
267
|
end
|
246
268
|
end
|
269
|
+
|
247
270
|
end
|
271
|
+
|
248
272
|
end
|
@@ -1,40 +1,41 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
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
|
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
|
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:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
require_relative 'asset'
|
15
16
|
|
16
17
|
module Shotstack
|
17
18
|
# The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
|
18
19
|
class TitleAsset < Asset
|
19
|
-
# The type of asset - set to
|
20
|
+
# The type of asset - set to `title` for titles.
|
20
21
|
attr_accessor :type
|
21
22
|
|
22
23
|
# The title text string - i.e. \"My Title\".
|
23
24
|
attr_accessor :text
|
24
25
|
|
25
|
-
# Uses a preset to apply font properties and styling to the title.
|
26
|
+
# 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
27
|
attr_accessor :style
|
27
28
|
|
28
29
|
# 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
30
|
attr_accessor :color
|
30
31
|
|
31
|
-
# Set the relative size of the text using predefined sizes from xx-small to xx-large.
|
32
|
+
# 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
33
|
attr_accessor :size
|
33
34
|
|
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.
|
35
|
+
# 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
36
|
attr_accessor :background
|
36
37
|
|
37
|
-
# Place the title in one of nine predefined positions of the viewport.
|
38
|
+
# 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
39
|
attr_accessor :position
|
39
40
|
|
40
41
|
attr_accessor :offset
|
@@ -75,6 +76,11 @@ module Shotstack
|
|
75
76
|
}
|
76
77
|
end
|
77
78
|
|
79
|
+
# Returns all the JSON keys this model knows about
|
80
|
+
def self.acceptable_attributes
|
81
|
+
attribute_map.values
|
82
|
+
end
|
83
|
+
|
78
84
|
# Attribute type mapping.
|
79
85
|
def self.openapi_types
|
80
86
|
{
|
@@ -250,7 +256,9 @@ module Shotstack
|
|
250
256
|
def build_from_hash(attributes)
|
251
257
|
return nil unless attributes.is_a?(Hash)
|
252
258
|
self.class.openapi_types.each_pair do |key, type|
|
253
|
-
if
|
259
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
260
|
+
self.send("#{key}=", nil)
|
261
|
+
elsif type =~ /\AArray<(.*)>/i
|
254
262
|
# check to ensure the input is an array given that the attribute
|
255
263
|
# is documented as an array but the input is not
|
256
264
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -258,7 +266,7 @@ module Shotstack
|
|
258
266
|
end
|
259
267
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
260
268
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
261
|
-
end
|
269
|
+
end
|
262
270
|
end
|
263
271
|
|
264
272
|
self
|
@@ -270,8 +278,8 @@ module Shotstack
|
|
270
278
|
# @return [Object] Deserialized data
|
271
279
|
def _deserialize(type, value)
|
272
280
|
case type.to_sym
|
273
|
-
when :
|
274
|
-
|
281
|
+
when :Time
|
282
|
+
Time.parse(value)
|
275
283
|
when :Date
|
276
284
|
Date.parse(value)
|
277
285
|
when :String
|
@@ -301,7 +309,9 @@ module Shotstack
|
|
301
309
|
end
|
302
310
|
end
|
303
311
|
else # model
|
304
|
-
|
312
|
+
# models (e.g. Pet) or oneOf
|
313
|
+
klass = Shotstack.const_get(type)
|
314
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
305
315
|
end
|
306
316
|
end
|
307
317
|
|
@@ -327,7 +337,7 @@ module Shotstack
|
|
327
337
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
328
338
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
329
339
|
end
|
330
|
-
|
340
|
+
|
331
341
|
hash[param] = _to_hash(value)
|
332
342
|
end
|
333
343
|
hash
|
@@ -350,5 +360,7 @@ module Shotstack
|
|
350
360
|
value
|
351
361
|
end
|
352
362
|
end
|
363
|
+
|
353
364
|
end
|
365
|
+
|
354
366
|
end
|
@@ -1,16 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
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
|
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
|
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:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Shotstack
|
16
17
|
# 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.
|
@@ -25,6 +26,11 @@ module Shotstack
|
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
28
34
|
# Attribute type mapping.
|
29
35
|
def self.openapi_types
|
30
36
|
{
|
@@ -111,7 +117,9 @@ module Shotstack
|
|
111
117
|
def build_from_hash(attributes)
|
112
118
|
return nil unless attributes.is_a?(Hash)
|
113
119
|
self.class.openapi_types.each_pair do |key, type|
|
114
|
-
if
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
123
|
# check to ensure the input is an array given that the attribute
|
116
124
|
# is documented as an array but the input is not
|
117
125
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -119,7 +127,7 @@ module Shotstack
|
|
119
127
|
end
|
120
128
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
129
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
-
end
|
130
|
+
end
|
123
131
|
end
|
124
132
|
|
125
133
|
self
|
@@ -131,8 +139,8 @@ module Shotstack
|
|
131
139
|
# @return [Object] Deserialized data
|
132
140
|
def _deserialize(type, value)
|
133
141
|
case type.to_sym
|
134
|
-
when :
|
135
|
-
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
136
144
|
when :Date
|
137
145
|
Date.parse(value)
|
138
146
|
when :String
|
@@ -162,7 +170,9 @@ module Shotstack
|
|
162
170
|
end
|
163
171
|
end
|
164
172
|
else # model
|
165
|
-
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = Shotstack.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
166
176
|
end
|
167
177
|
end
|
168
178
|
|
@@ -188,7 +198,7 @@ module Shotstack
|
|
188
198
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
199
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
200
|
end
|
191
|
-
|
201
|
+
|
192
202
|
hash[param] = _to_hash(value)
|
193
203
|
end
|
194
204
|
hash
|
@@ -211,5 +221,7 @@ module Shotstack
|
|
211
221
|
value
|
212
222
|
end
|
213
223
|
end
|
224
|
+
|
214
225
|
end
|
226
|
+
|
215
227
|
end
|
@@ -1,24 +1,25 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
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
|
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.
|
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:
|
9
|
+
OpenAPI Generator version: 5.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module Shotstack
|
16
17
|
# In and out transitions for a clip - i.e. fade in and fade out
|
17
18
|
class Transition
|
18
|
-
# The transition in
|
19
|
+
# 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
20
|
attr_accessor :_in
|
20
21
|
|
21
|
-
# The transition out
|
22
|
+
# 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
23
|
attr_accessor :out
|
23
24
|
|
24
25
|
class EnumAttributeValidator
|
@@ -51,6 +52,11 @@ module Shotstack
|
|
51
52
|
}
|
52
53
|
end
|
53
54
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
54
60
|
# Attribute type mapping.
|
55
61
|
def self.openapi_types
|
56
62
|
{
|
@@ -99,9 +105,9 @@ module Shotstack
|
|
99
105
|
# Check to see if the all the properties in the model are valid
|
100
106
|
# @return true if the model is valid
|
101
107
|
def valid?
|
102
|
-
_in_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight"])
|
108
|
+
_in_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
103
109
|
return false unless _in_validator.valid?(@_in)
|
104
|
-
out_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight"])
|
110
|
+
out_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
105
111
|
return false unless out_validator.valid?(@out)
|
106
112
|
true
|
107
113
|
end
|
@@ -109,7 +115,7 @@ module Shotstack
|
|
109
115
|
# Custom attribute writer method checking allowed values (enum).
|
110
116
|
# @param [Object] _in Object to be assigned
|
111
117
|
def _in=(_in)
|
112
|
-
validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight"])
|
118
|
+
validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
113
119
|
unless validator.valid?(_in)
|
114
120
|
fail ArgumentError, "invalid value for \"_in\", must be one of #{validator.allowable_values}."
|
115
121
|
end
|
@@ -119,7 +125,7 @@ module Shotstack
|
|
119
125
|
# Custom attribute writer method checking allowed values (enum).
|
120
126
|
# @param [Object] out Object to be assigned
|
121
127
|
def out=(out)
|
122
|
-
validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight"])
|
128
|
+
validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
123
129
|
unless validator.valid?(out)
|
124
130
|
fail ArgumentError, "invalid value for \"out\", must be one of #{validator.allowable_values}."
|
125
131
|
end
|
@@ -160,7 +166,9 @@ module Shotstack
|
|
160
166
|
def build_from_hash(attributes)
|
161
167
|
return nil unless attributes.is_a?(Hash)
|
162
168
|
self.class.openapi_types.each_pair do |key, type|
|
163
|
-
if
|
169
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
170
|
+
self.send("#{key}=", nil)
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
164
172
|
# check to ensure the input is an array given that the attribute
|
165
173
|
# is documented as an array but the input is not
|
166
174
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -168,7 +176,7 @@ module Shotstack
|
|
168
176
|
end
|
169
177
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
170
178
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
171
|
-
end
|
179
|
+
end
|
172
180
|
end
|
173
181
|
|
174
182
|
self
|
@@ -180,8 +188,8 @@ module Shotstack
|
|
180
188
|
# @return [Object] Deserialized data
|
181
189
|
def _deserialize(type, value)
|
182
190
|
case type.to_sym
|
183
|
-
when :
|
184
|
-
|
191
|
+
when :Time
|
192
|
+
Time.parse(value)
|
185
193
|
when :Date
|
186
194
|
Date.parse(value)
|
187
195
|
when :String
|
@@ -211,7 +219,9 @@ module Shotstack
|
|
211
219
|
end
|
212
220
|
end
|
213
221
|
else # model
|
214
|
-
|
222
|
+
# models (e.g. Pet) or oneOf
|
223
|
+
klass = Shotstack.const_get(type)
|
224
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
225
|
end
|
216
226
|
end
|
217
227
|
|
@@ -237,7 +247,7 @@ module Shotstack
|
|
237
247
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
238
248
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
239
249
|
end
|
240
|
-
|
250
|
+
|
241
251
|
hash[param] = _to_hash(value)
|
242
252
|
end
|
243
253
|
hash
|
@@ -260,5 +270,7 @@ module Shotstack
|
|
260
270
|
value
|
261
271
|
end
|
262
272
|
end
|
273
|
+
|
263
274
|
end
|
275
|
+
|
264
276
|
end
|