shotstack 0.1.4 → 0.1.5
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 +3 -1
- data/lib/shotstack/api/endpoints_api.rb +9 -7
- data/lib/shotstack/api_client.rb +49 -45
- data/lib/shotstack/api_error.rb +1 -1
- data/lib/shotstack/configuration.rb +35 -8
- data/lib/shotstack/models/audio_asset.rb +67 -11
- data/lib/shotstack/models/clip.rb +20 -8
- data/lib/shotstack/models/crop.rb +346 -0
- data/lib/shotstack/models/edit.rb +19 -7
- data/lib/shotstack/models/font.rb +19 -7
- data/lib/shotstack/models/html_asset.rb +23 -11
- data/lib/shotstack/models/image_asset.rb +33 -12
- data/lib/shotstack/models/luma_asset.rb +20 -8
- data/lib/shotstack/models/offset.rb +19 -7
- data/lib/shotstack/models/output.rb +60 -15
- data/lib/shotstack/models/poster.rb +19 -7
- data/lib/shotstack/models/queued_response.rb +19 -7
- data/lib/shotstack/models/queued_response_data.rb +19 -7
- data/lib/shotstack/models/range.rb +260 -0
- data/lib/shotstack/models/render_response.rb +19 -7
- data/lib/shotstack/models/render_response_data.rb +19 -7
- data/lib/shotstack/models/soundtrack.rb +19 -7
- data/lib/shotstack/models/thumbnail.rb +19 -7
- data/lib/shotstack/models/timeline.rb +19 -7
- data/lib/shotstack/models/title_asset.rb +19 -7
- data/lib/shotstack/models/track.rb +19 -7
- data/lib/shotstack/models/transition.rb +19 -7
- data/lib/shotstack/models/video_asset.rb +32 -11
- data/lib/shotstack/version.rb +2 -2
- data/shotstack.gemspec +2 -3
- metadata +5 -23
@@ -6,11 +6,12 @@
|
|
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
|
# Download a custom font to use with the HTML asset type, using the font name in the CSS or font tag.
|
@@ -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
|
{
|
@@ -109,7 +115,9 @@ module Shotstack
|
|
109
115
|
def build_from_hash(attributes)
|
110
116
|
return nil unless attributes.is_a?(Hash)
|
111
117
|
self.class.openapi_types.each_pair do |key, type|
|
112
|
-
if
|
118
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
119
|
+
self.send("#{key}=", nil)
|
120
|
+
elsif type =~ /\AArray<(.*)>/i
|
113
121
|
# check to ensure the input is an array given that the attribute
|
114
122
|
# is documented as an array but the input is not
|
115
123
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -117,7 +125,7 @@ module Shotstack
|
|
117
125
|
end
|
118
126
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
119
127
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
-
end
|
128
|
+
end
|
121
129
|
end
|
122
130
|
|
123
131
|
self
|
@@ -129,8 +137,8 @@ module Shotstack
|
|
129
137
|
# @return [Object] Deserialized data
|
130
138
|
def _deserialize(type, value)
|
131
139
|
case type.to_sym
|
132
|
-
when :
|
133
|
-
|
140
|
+
when :Time
|
141
|
+
Time.parse(value)
|
134
142
|
when :Date
|
135
143
|
Date.parse(value)
|
136
144
|
when :String
|
@@ -160,7 +168,9 @@ module Shotstack
|
|
160
168
|
end
|
161
169
|
end
|
162
170
|
else # model
|
163
|
-
|
171
|
+
# models (e.g. Pet) or oneOf
|
172
|
+
klass = Shotstack.const_get(type)
|
173
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
164
174
|
end
|
165
175
|
end
|
166
176
|
|
@@ -186,7 +196,7 @@ module Shotstack
|
|
186
196
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
197
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
198
|
end
|
189
|
-
|
199
|
+
|
190
200
|
hash[param] = _to_hash(value)
|
191
201
|
end
|
192
202
|
hash
|
@@ -209,5 +219,7 @@ module Shotstack
|
|
209
219
|
value
|
210
220
|
end
|
211
221
|
end
|
222
|
+
|
212
223
|
end
|
224
|
+
|
213
225
|
end
|
@@ -6,11 +6,12 @@
|
|
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
|
@@ -25,10 +26,10 @@ module Shotstack
|
|
25
26
|
# The CSS text string to apply styling to the HTML.
|
26
27
|
attr_accessor :css
|
27
28
|
|
28
|
-
# Set the width of the HTML asset bounding box. Text will wrap to fill the bounding box.
|
29
|
+
# Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box.
|
29
30
|
attr_accessor :width
|
30
31
|
|
31
|
-
# Set the width of the HTML asset bounding box. Text and elements will be masked if they exceed the height of the bounding box.
|
32
|
+
# Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box.
|
32
33
|
attr_accessor :height
|
33
34
|
|
34
35
|
# Apply a background color behind the HTML bounding box using. 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.
|
@@ -72,14 +73,19 @@ module Shotstack
|
|
72
73
|
}
|
73
74
|
end
|
74
75
|
|
76
|
+
# Returns all the JSON keys this model knows about
|
77
|
+
def self.acceptable_attributes
|
78
|
+
attribute_map.values
|
79
|
+
end
|
80
|
+
|
75
81
|
# Attribute type mapping.
|
76
82
|
def self.openapi_types
|
77
83
|
{
|
78
84
|
:'type' => :'String',
|
79
85
|
:'html' => :'String',
|
80
86
|
:'css' => :'String',
|
81
|
-
:'width' => :'
|
82
|
-
:'height' => :'
|
87
|
+
:'width' => :'Integer',
|
88
|
+
:'height' => :'Integer',
|
83
89
|
:'background' => :'String',
|
84
90
|
:'position' => :'String'
|
85
91
|
}
|
@@ -215,7 +221,9 @@ module Shotstack
|
|
215
221
|
def build_from_hash(attributes)
|
216
222
|
return nil unless attributes.is_a?(Hash)
|
217
223
|
self.class.openapi_types.each_pair do |key, type|
|
218
|
-
if
|
224
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
225
|
+
self.send("#{key}=", nil)
|
226
|
+
elsif type =~ /\AArray<(.*)>/i
|
219
227
|
# check to ensure the input is an array given that the attribute
|
220
228
|
# is documented as an array but the input is not
|
221
229
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -223,7 +231,7 @@ module Shotstack
|
|
223
231
|
end
|
224
232
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
225
233
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
226
|
-
end
|
234
|
+
end
|
227
235
|
end
|
228
236
|
|
229
237
|
self
|
@@ -235,8 +243,8 @@ module Shotstack
|
|
235
243
|
# @return [Object] Deserialized data
|
236
244
|
def _deserialize(type, value)
|
237
245
|
case type.to_sym
|
238
|
-
when :
|
239
|
-
|
246
|
+
when :Time
|
247
|
+
Time.parse(value)
|
240
248
|
when :Date
|
241
249
|
Date.parse(value)
|
242
250
|
when :String
|
@@ -266,7 +274,9 @@ module Shotstack
|
|
266
274
|
end
|
267
275
|
end
|
268
276
|
else # model
|
269
|
-
|
277
|
+
# models (e.g. Pet) or oneOf
|
278
|
+
klass = Shotstack.const_get(type)
|
279
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
270
280
|
end
|
271
281
|
end
|
272
282
|
|
@@ -292,7 +302,7 @@ module Shotstack
|
|
292
302
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
293
303
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
294
304
|
end
|
295
|
-
|
305
|
+
|
296
306
|
hash[param] = _to_hash(value)
|
297
307
|
end
|
298
308
|
hash
|
@@ -315,5 +325,7 @@ module Shotstack
|
|
315
325
|
value
|
316
326
|
end
|
317
327
|
end
|
328
|
+
|
318
329
|
end
|
330
|
+
|
319
331
|
end
|
@@ -6,35 +6,45 @@
|
|
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 ImageAsset is used to create video from images. The src must be a publicly accessible URL to an image resource such as a jpg or png file.
|
18
19
|
class ImageAsset < Asset
|
19
|
-
# The type of asset - set to
|
20
|
+
# The type of asset - set to `image` for images.
|
20
21
|
attr_accessor :type
|
21
22
|
|
22
23
|
# The image source URL. The URL must be publicly accessible or include credentials.
|
23
24
|
attr_accessor :src
|
24
25
|
|
26
|
+
attr_accessor :crop
|
27
|
+
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
29
|
def self.attribute_map
|
27
30
|
{
|
28
31
|
:'type' => :'type',
|
29
|
-
:'src' => :'src'
|
32
|
+
:'src' => :'src',
|
33
|
+
:'crop' => :'crop'
|
30
34
|
}
|
31
35
|
end
|
32
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
33
42
|
# Attribute type mapping.
|
34
43
|
def self.openapi_types
|
35
44
|
{
|
36
45
|
:'type' => :'String',
|
37
|
-
:'src' => :'String'
|
46
|
+
:'src' => :'String',
|
47
|
+
:'crop' => :'Crop'
|
38
48
|
}
|
39
49
|
end
|
40
50
|
|
@@ -68,6 +78,10 @@ module Shotstack
|
|
68
78
|
if attributes.key?(:'src')
|
69
79
|
self.src = attributes[:'src']
|
70
80
|
end
|
81
|
+
|
82
|
+
if attributes.key?(:'crop')
|
83
|
+
self.crop = attributes[:'crop']
|
84
|
+
end
|
71
85
|
end
|
72
86
|
|
73
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -99,7 +113,8 @@ module Shotstack
|
|
99
113
|
return true if self.equal?(o)
|
100
114
|
self.class == o.class &&
|
101
115
|
type == o.type &&
|
102
|
-
src == o.src
|
116
|
+
src == o.src &&
|
117
|
+
crop == o.crop
|
103
118
|
end
|
104
119
|
|
105
120
|
# @see the `==` method
|
@@ -111,7 +126,7 @@ module Shotstack
|
|
111
126
|
# Calculates hash code according to all attributes.
|
112
127
|
# @return [Integer] Hash code
|
113
128
|
def hash
|
114
|
-
[type, src].hash
|
129
|
+
[type, src, crop].hash
|
115
130
|
end
|
116
131
|
|
117
132
|
# Builds the object from hash
|
@@ -127,7 +142,9 @@ module Shotstack
|
|
127
142
|
def build_from_hash(attributes)
|
128
143
|
return nil unless attributes.is_a?(Hash)
|
129
144
|
self.class.openapi_types.each_pair do |key, type|
|
130
|
-
if
|
145
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
146
|
+
self.send("#{key}=", nil)
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
131
148
|
# check to ensure the input is an array given that the attribute
|
132
149
|
# is documented as an array but the input is not
|
133
150
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -135,7 +152,7 @@ module Shotstack
|
|
135
152
|
end
|
136
153
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
154
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
-
end
|
155
|
+
end
|
139
156
|
end
|
140
157
|
|
141
158
|
self
|
@@ -147,8 +164,8 @@ module Shotstack
|
|
147
164
|
# @return [Object] Deserialized data
|
148
165
|
def _deserialize(type, value)
|
149
166
|
case type.to_sym
|
150
|
-
when :
|
151
|
-
|
167
|
+
when :Time
|
168
|
+
Time.parse(value)
|
152
169
|
when :Date
|
153
170
|
Date.parse(value)
|
154
171
|
when :String
|
@@ -178,7 +195,9 @@ module Shotstack
|
|
178
195
|
end
|
179
196
|
end
|
180
197
|
else # model
|
181
|
-
|
198
|
+
# models (e.g. Pet) or oneOf
|
199
|
+
klass = Shotstack.const_get(type)
|
200
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
201
|
end
|
183
202
|
end
|
184
203
|
|
@@ -204,7 +223,7 @@ module Shotstack
|
|
204
223
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
205
224
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
206
225
|
end
|
207
|
-
|
226
|
+
|
208
227
|
hash[param] = _to_hash(value)
|
209
228
|
end
|
210
229
|
hash
|
@@ -227,5 +246,7 @@ module Shotstack
|
|
227
246
|
value
|
228
247
|
end
|
229
248
|
end
|
249
|
+
|
230
250
|
end
|
251
|
+
|
231
252
|
end
|
@@ -6,17 +6,18 @@
|
|
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 LumaAsset is used to create luma matte transitions between other assets. A luma matte is a grey scale 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.
|
18
19
|
class LumaAsset < Asset
|
19
|
-
# The type of asset - set to
|
20
|
+
# The type of asset - set to `luma` for luma mattes.
|
20
21
|
attr_accessor :type
|
21
22
|
|
22
23
|
# The luma matte video source URL. The URL must be publicly accessible or include credentials.
|
@@ -34,6 +35,11 @@ module Shotstack
|
|
34
35
|
}
|
35
36
|
end
|
36
37
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
39
|
+
def self.acceptable_attributes
|
40
|
+
attribute_map.values
|
41
|
+
end
|
42
|
+
|
37
43
|
# Attribute type mapping.
|
38
44
|
def self.openapi_types
|
39
45
|
{
|
@@ -137,7 +143,9 @@ module Shotstack
|
|
137
143
|
def build_from_hash(attributes)
|
138
144
|
return nil unless attributes.is_a?(Hash)
|
139
145
|
self.class.openapi_types.each_pair do |key, type|
|
140
|
-
if
|
146
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
147
|
+
self.send("#{key}=", nil)
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
141
149
|
# check to ensure the input is an array given that the attribute
|
142
150
|
# is documented as an array but the input is not
|
143
151
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -145,7 +153,7 @@ module Shotstack
|
|
145
153
|
end
|
146
154
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
147
155
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
148
|
-
end
|
156
|
+
end
|
149
157
|
end
|
150
158
|
|
151
159
|
self
|
@@ -157,8 +165,8 @@ module Shotstack
|
|
157
165
|
# @return [Object] Deserialized data
|
158
166
|
def _deserialize(type, value)
|
159
167
|
case type.to_sym
|
160
|
-
when :
|
161
|
-
|
168
|
+
when :Time
|
169
|
+
Time.parse(value)
|
162
170
|
when :Date
|
163
171
|
Date.parse(value)
|
164
172
|
when :String
|
@@ -188,7 +196,9 @@ module Shotstack
|
|
188
196
|
end
|
189
197
|
end
|
190
198
|
else # model
|
191
|
-
|
199
|
+
# models (e.g. Pet) or oneOf
|
200
|
+
klass = Shotstack.const_get(type)
|
201
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
192
202
|
end
|
193
203
|
end
|
194
204
|
|
@@ -214,7 +224,7 @@ module Shotstack
|
|
214
224
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
215
225
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
216
226
|
end
|
217
|
-
|
227
|
+
|
218
228
|
hash[param] = _to_hash(value)
|
219
229
|
end
|
220
230
|
hash
|
@@ -237,5 +247,7 @@ module Shotstack
|
|
237
247
|
value
|
238
248
|
end
|
239
249
|
end
|
250
|
+
|
240
251
|
end
|
252
|
+
|
241
253
|
end
|
@@ -6,11 +6,12 @@
|
|
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
|
# Offsets the position of an asset horizontally or vertically by a relative distance.
|
@@ -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
|
{
|
@@ -166,7 +172,9 @@ module Shotstack
|
|
166
172
|
def build_from_hash(attributes)
|
167
173
|
return nil unless attributes.is_a?(Hash)
|
168
174
|
self.class.openapi_types.each_pair do |key, type|
|
169
|
-
if
|
175
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
176
|
+
self.send("#{key}=", nil)
|
177
|
+
elsif type =~ /\AArray<(.*)>/i
|
170
178
|
# check to ensure the input is an array given that the attribute
|
171
179
|
# is documented as an array but the input is not
|
172
180
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -174,7 +182,7 @@ module Shotstack
|
|
174
182
|
end
|
175
183
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
176
184
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
177
|
-
end
|
185
|
+
end
|
178
186
|
end
|
179
187
|
|
180
188
|
self
|
@@ -186,8 +194,8 @@ module Shotstack
|
|
186
194
|
# @return [Object] Deserialized data
|
187
195
|
def _deserialize(type, value)
|
188
196
|
case type.to_sym
|
189
|
-
when :
|
190
|
-
|
197
|
+
when :Time
|
198
|
+
Time.parse(value)
|
191
199
|
when :Date
|
192
200
|
Date.parse(value)
|
193
201
|
when :String
|
@@ -217,7 +225,9 @@ module Shotstack
|
|
217
225
|
end
|
218
226
|
end
|
219
227
|
else # model
|
220
|
-
|
228
|
+
# models (e.g. Pet) or oneOf
|
229
|
+
klass = Shotstack.const_get(type)
|
230
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
221
231
|
end
|
222
232
|
end
|
223
233
|
|
@@ -243,7 +253,7 @@ module Shotstack
|
|
243
253
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
244
254
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
245
255
|
end
|
246
|
-
|
256
|
+
|
247
257
|
hash[param] = _to_hash(value)
|
248
258
|
end
|
249
259
|
hash
|
@@ -266,5 +276,7 @@ module Shotstack
|
|
266
276
|
value
|
267
277
|
end
|
268
278
|
end
|
279
|
+
|
269
280
|
end
|
281
|
+
|
270
282
|
end
|