shotstack 0.1.4 → 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 +12 -2
- data/lib/shotstack/api/edit_api.rb +155 -0
- data/lib/shotstack/api/endpoints_api.rb +10 -8
- data/lib/shotstack/api/serve_api.rb +224 -0
- data/lib/shotstack/api_client.rb +50 -46
- data/lib/shotstack/api_error.rb +2 -2
- data/lib/shotstack/configuration.rb +50 -9
- 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 +68 -12
- data/lib/shotstack/models/clip.rb +23 -11
- data/lib/shotstack/models/crop.rb +346 -0
- data/lib/shotstack/models/destinations.rb +17 -0
- data/lib/shotstack/models/edit.rb +72 -14
- data/lib/shotstack/models/font.rb +21 -9
- data/lib/shotstack/models/html_asset.rb +26 -14
- data/lib/shotstack/models/image_asset.rb +34 -13
- data/lib/shotstack/models/luma_asset.rb +24 -12
- data/lib/shotstack/models/offset.rb +20 -8
- data/lib/shotstack/models/output.rb +111 -26
- data/lib/shotstack/models/poster.rb +20 -8
- data/lib/shotstack/models/queued_response.rb +21 -8
- data/lib/shotstack/models/queued_response_data.rb +21 -8
- data/lib/shotstack/models/range.rb +260 -0
- data/lib/shotstack/models/render_response.rb +21 -8
- data/lib/shotstack/models/render_response_data.rb +25 -12
- data/lib/shotstack/models/shotstack_destination.rb +240 -0
- data/lib/shotstack/models/size.rb +278 -0
- data/lib/shotstack/models/soundtrack.rb +20 -8
- data/lib/shotstack/models/thumbnail.rb +21 -9
- data/lib/shotstack/models/timeline.rb +37 -13
- data/lib/shotstack/models/title_asset.rb +20 -8
- data/lib/shotstack/models/track.rb +20 -8
- data/lib/shotstack/models/transition.rb +26 -14
- data/lib/shotstack/models/video_asset.rb +33 -12
- data/lib/shotstack/version.rb +3 -3
- data/shotstack.gemspec +4 -5
- metadata +22 -27
|
@@ -1,16 +1,17 @@
|
|
|
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
|
|
|
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 music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
|
|
@@ -55,6 +56,11 @@ module Shotstack
|
|
|
55
56
|
}
|
|
56
57
|
end
|
|
57
58
|
|
|
59
|
+
# Returns all the JSON keys this model knows about
|
|
60
|
+
def self.acceptable_attributes
|
|
61
|
+
attribute_map.values
|
|
62
|
+
end
|
|
63
|
+
|
|
58
64
|
# Attribute type mapping.
|
|
59
65
|
def self.openapi_types
|
|
60
66
|
{
|
|
@@ -165,7 +171,9 @@ module Shotstack
|
|
|
165
171
|
def build_from_hash(attributes)
|
|
166
172
|
return nil unless attributes.is_a?(Hash)
|
|
167
173
|
self.class.openapi_types.each_pair do |key, type|
|
|
168
|
-
if
|
|
174
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
175
|
+
self.send("#{key}=", nil)
|
|
176
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
169
177
|
# check to ensure the input is an array given that the attribute
|
|
170
178
|
# is documented as an array but the input is not
|
|
171
179
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -173,7 +181,7 @@ module Shotstack
|
|
|
173
181
|
end
|
|
174
182
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
175
183
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
176
|
-
end
|
|
184
|
+
end
|
|
177
185
|
end
|
|
178
186
|
|
|
179
187
|
self
|
|
@@ -185,8 +193,8 @@ module Shotstack
|
|
|
185
193
|
# @return [Object] Deserialized data
|
|
186
194
|
def _deserialize(type, value)
|
|
187
195
|
case type.to_sym
|
|
188
|
-
when :
|
|
189
|
-
|
|
196
|
+
when :Time
|
|
197
|
+
Time.parse(value)
|
|
190
198
|
when :Date
|
|
191
199
|
Date.parse(value)
|
|
192
200
|
when :String
|
|
@@ -216,7 +224,9 @@ module Shotstack
|
|
|
216
224
|
end
|
|
217
225
|
end
|
|
218
226
|
else # model
|
|
219
|
-
|
|
227
|
+
# models (e.g. Pet) or oneOf
|
|
228
|
+
klass = Shotstack.const_get(type)
|
|
229
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
220
230
|
end
|
|
221
231
|
end
|
|
222
232
|
|
|
@@ -242,7 +252,7 @@ module Shotstack
|
|
|
242
252
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
243
253
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
244
254
|
end
|
|
245
|
-
|
|
255
|
+
|
|
246
256
|
hash[param] = _to_hash(value)
|
|
247
257
|
end
|
|
248
258
|
hash
|
|
@@ -265,5 +275,7 @@ module Shotstack
|
|
|
265
275
|
value
|
|
266
276
|
end
|
|
267
277
|
end
|
|
278
|
+
|
|
268
279
|
end
|
|
280
|
+
|
|
269
281
|
end
|
|
@@ -1,19 +1,20 @@
|
|
|
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
|
|
|
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
|
-
# Generate a thumbnail image for the video at a specific point from the timeline.
|
|
17
|
+
# Generate a thumbnail image for the video or image at a specific point from the timeline.
|
|
17
18
|
class Thumbnail
|
|
18
19
|
# The point on the timeline in seconds to capture a single frame to use as the thumbnail image.
|
|
19
20
|
attr_accessor :capture
|
|
@@ -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,19 +1,20 @@
|
|
|
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
|
|
|
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
|
-
# 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
|
+
# A timeline represents the contents of a video edit over time, an audio edit over time, in seconds, or an image layout. A timeline consists of layers called tracks. Tracks are composed of titles, images, audio, html 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
18
|
class Timeline
|
|
18
19
|
attr_accessor :soundtrack
|
|
19
20
|
|
|
@@ -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,16 +1,17 @@
|
|
|
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
|
|
|
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
|
|
@@ -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
|
-
#
|
|
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
|
|
|
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
|