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,24 +1,25 @@
|
|
|
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
|
# In and out transitions for a clip - i.e. fade in and fade out
|
|
17
18
|
class Transition
|
|
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
|
|
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>`shuffleTopRight` - rotate in from top right</li> <li>`shuffleRightTop` - rotate in from right top</li> <li>`shuffleRightBottom` - rotate in from right bottom</li> <li>`shuffleBottomRight` - rotate in from bottom right</li> <li>`shuffleBottomLeft` - rotate in from bottom left</li> <li>`shuffleLeftBottom` - rotate in from left bottom</li> <li>`shuffleLeftTop` - rotate in from left top</li> <li>`shuffleTopLeft` - rotate in from top left</li> <li>`zoom` - fast zoom in</li> </ul> The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`.
|
|
19
20
|
attr_accessor :_in
|
|
20
21
|
|
|
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
|
+
# 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>`shuffleTopRight` - rotate out from top right</li> <li>`shuffleRightTop` - rotate out from right top</li> <li>`shuffleRightBottom` - rotate out from right bottom</li> <li>`shuffleBottomRight` - rotate out from bottom right</li> <li>`shuffleBottomLeft` - rotate out from bottom left</li> <li>`shuffleLeftBottom` - rotate out from left bottom</li> <li>`shuffleLeftTop` - rotate out from left top</li> <li>`shuffleTopLeft` - rotate out from top left</li> <li>`zoom` - fast zoom out</li> </ul> The transition speed can also be controlled by appending `Fast` or `Slow` to the transition, e.g. `fadeFast` or `CarouselLeftSlow`.
|
|
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", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
108
|
+
_in_validator = EnumAttributeValidator.new('String', ["fade", "fadeSlow", "fadeFast", "reveal", "revealSlow", "revealFast", "wipeLeft", "wipeLeftSlow", "wipeLeftFast", "wipeRight", "wipeRightSlow", "wipeRightFast", "slideLeft", "slideLeftSlow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast", "carouselLeft", "carouselLeftSlow", "carouselLeftFast", "carouselRight", "carouselRightSlow", "carouselRightFast", "carouselUp", "carouselUpSlow", "carouselUpFast", "carouselDown", "carouselDownSlow", "carouselDownFast", "shuffleTopRight", "shuffleTopRightSlow", "shuffleTopRightFast", "shuffleRightTop", "shuffleRightTopSlow", "shuffleRightTopFast", "shuffleRightBottom", "shuffleRightBottomSlow", "shuffleRightBottomFast", "shuffleBottomRight", "shuffleBottomRightSlow", "shuffleBottomRightFast", "shuffleBottomLeft", "shuffleBottomLeftSlow", "shuffleBottomLeftFast", "shuffleLeftBottom", "shuffleLeftBottomSlow", "shuffleLeftBottomFast", "shuffleLeftTop", "shuffleLeftTopSlow", "shuffleLeftTopFast", "shuffleTopLeft", "shuffleTopLeftSlow", "shuffleTopLeftFast", "zoom"])
|
|
103
109
|
return false unless _in_validator.valid?(@_in)
|
|
104
|
-
out_validator = EnumAttributeValidator.new('String', ["fade", "reveal", "wipeLeft", "wipeRight", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
110
|
+
out_validator = EnumAttributeValidator.new('String', ["fade", "fadeSlow", "fadeFast", "reveal", "revealSlow", "revealFast", "wipeLeft", "wipeLeftSlow", "wipeLeftFast", "wipeRight", "wipeRightSlow", "wipeRightFast", "slideLeft", "slideLeftSlow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast", "carouselLeft", "carouselLeftSlow", "carouselLeftFast", "carouselRight", "carouselRightSlow", "carouselRightFast", "carouselUp", "carouselUpSlow", "carouselUpFast", "carouselDown", "carouselDownSlow", "carouselDownFast", "shuffleTopRight", "shuffleTopRightSlow", "shuffleTopRightFast", "shuffleRightTop", "shuffleRightTopSlow", "shuffleRightTopFast", "shuffleRightBottom", "shuffleRightBottomSlow", "shuffleRightBottomFast", "shuffleBottomRight", "shuffleBottomRightSlow", "shuffleBottomRightFast", "shuffleBottomLeft", "shuffleBottomLeftSlow", "shuffleBottomLeftFast", "shuffleLeftBottom", "shuffleLeftBottomSlow", "shuffleLeftBottomFast", "shuffleLeftTop", "shuffleLeftTopSlow", "shuffleLeftTopFast", "shuffleTopLeft", "shuffleTopLeftSlow", "shuffleTopLeftFast", "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", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
118
|
+
validator = EnumAttributeValidator.new('String', ["fade", "fadeSlow", "fadeFast", "reveal", "revealSlow", "revealFast", "wipeLeft", "wipeLeftSlow", "wipeLeftFast", "wipeRight", "wipeRightSlow", "wipeRightFast", "slideLeft", "slideLeftSlow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast", "carouselLeft", "carouselLeftSlow", "carouselLeftFast", "carouselRight", "carouselRightSlow", "carouselRightFast", "carouselUp", "carouselUpSlow", "carouselUpFast", "carouselDown", "carouselDownSlow", "carouselDownFast", "shuffleTopRight", "shuffleTopRightSlow", "shuffleTopRightFast", "shuffleRightTop", "shuffleRightTopSlow", "shuffleRightTopFast", "shuffleRightBottom", "shuffleRightBottomSlow", "shuffleRightBottomFast", "shuffleBottomRight", "shuffleBottomRightSlow", "shuffleBottomRightFast", "shuffleBottomLeft", "shuffleBottomLeftSlow", "shuffleBottomLeftFast", "shuffleLeftBottom", "shuffleLeftBottomSlow", "shuffleLeftBottomFast", "shuffleLeftTop", "shuffleLeftTopSlow", "shuffleLeftTopFast", "shuffleTopLeft", "shuffleTopLeftSlow", "shuffleTopLeftFast", "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", "slideLeft", "slideRight", "slideUp", "slideDown", "carouselLeft", "carouselRight", "carouselUp", "carouselDown", "zoom"])
|
|
128
|
+
validator = EnumAttributeValidator.new('String', ["fade", "fadeSlow", "fadeFast", "reveal", "revealSlow", "revealFast", "wipeLeft", "wipeLeftSlow", "wipeLeftFast", "wipeRight", "wipeRightSlow", "wipeRightFast", "slideLeft", "slideLeftSlow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast", "carouselLeft", "carouselLeftSlow", "carouselLeftFast", "carouselRight", "carouselRightSlow", "carouselRightFast", "carouselUp", "carouselUpSlow", "carouselUpFast", "carouselDown", "carouselDownSlow", "carouselDownFast", "shuffleTopRight", "shuffleTopRightSlow", "shuffleTopRightFast", "shuffleRightTop", "shuffleRightTopSlow", "shuffleRightTopFast", "shuffleRightBottom", "shuffleRightBottomSlow", "shuffleRightBottomFast", "shuffleBottomRight", "shuffleBottomRightSlow", "shuffleBottomRightFast", "shuffleBottomLeft", "shuffleBottomLeftSlow", "shuffleBottomLeftFast", "shuffleLeftBottom", "shuffleLeftBottomSlow", "shuffleLeftBottomFast", "shuffleLeftTop", "shuffleLeftTopSlow", "shuffleLeftTopFast", "shuffleTopLeft", "shuffleTopLeftSlow", "shuffleTopLeftFast", "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
|
|
@@ -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
|
|
@@ -28,23 +29,32 @@ module Shotstack
|
|
|
28
29
|
# Set the volume for the video clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 0).
|
|
29
30
|
attr_accessor :volume
|
|
30
31
|
|
|
32
|
+
attr_accessor :crop
|
|
33
|
+
|
|
31
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
35
|
def self.attribute_map
|
|
33
36
|
{
|
|
34
37
|
:'type' => :'type',
|
|
35
38
|
:'src' => :'src',
|
|
36
39
|
:'trim' => :'trim',
|
|
37
|
-
:'volume' => :'volume'
|
|
40
|
+
:'volume' => :'volume',
|
|
41
|
+
:'crop' => :'crop'
|
|
38
42
|
}
|
|
39
43
|
end
|
|
40
44
|
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
41
50
|
# Attribute type mapping.
|
|
42
51
|
def self.openapi_types
|
|
43
52
|
{
|
|
44
53
|
:'type' => :'String',
|
|
45
54
|
:'src' => :'String',
|
|
46
55
|
:'trim' => :'Float',
|
|
47
|
-
:'volume' => :'Float'
|
|
56
|
+
:'volume' => :'Float',
|
|
57
|
+
:'crop' => :'Crop'
|
|
48
58
|
}
|
|
49
59
|
end
|
|
50
60
|
|
|
@@ -86,6 +96,10 @@ module Shotstack
|
|
|
86
96
|
if attributes.key?(:'volume')
|
|
87
97
|
self.volume = attributes[:'volume']
|
|
88
98
|
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'crop')
|
|
101
|
+
self.crop = attributes[:'crop']
|
|
102
|
+
end
|
|
89
103
|
end
|
|
90
104
|
|
|
91
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -119,7 +133,8 @@ module Shotstack
|
|
|
119
133
|
type == o.type &&
|
|
120
134
|
src == o.src &&
|
|
121
135
|
trim == o.trim &&
|
|
122
|
-
volume == o.volume
|
|
136
|
+
volume == o.volume &&
|
|
137
|
+
crop == o.crop
|
|
123
138
|
end
|
|
124
139
|
|
|
125
140
|
# @see the `==` method
|
|
@@ -131,7 +146,7 @@ module Shotstack
|
|
|
131
146
|
# Calculates hash code according to all attributes.
|
|
132
147
|
# @return [Integer] Hash code
|
|
133
148
|
def hash
|
|
134
|
-
[type, src, trim, volume].hash
|
|
149
|
+
[type, src, trim, volume, crop].hash
|
|
135
150
|
end
|
|
136
151
|
|
|
137
152
|
# Builds the object from hash
|
|
@@ -147,7 +162,9 @@ module Shotstack
|
|
|
147
162
|
def build_from_hash(attributes)
|
|
148
163
|
return nil unless attributes.is_a?(Hash)
|
|
149
164
|
self.class.openapi_types.each_pair do |key, type|
|
|
150
|
-
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
|
|
151
168
|
# check to ensure the input is an array given that the attribute
|
|
152
169
|
# is documented as an array but the input is not
|
|
153
170
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -155,7 +172,7 @@ module Shotstack
|
|
|
155
172
|
end
|
|
156
173
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
157
174
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
158
|
-
end
|
|
175
|
+
end
|
|
159
176
|
end
|
|
160
177
|
|
|
161
178
|
self
|
|
@@ -167,8 +184,8 @@ module Shotstack
|
|
|
167
184
|
# @return [Object] Deserialized data
|
|
168
185
|
def _deserialize(type, value)
|
|
169
186
|
case type.to_sym
|
|
170
|
-
when :
|
|
171
|
-
|
|
187
|
+
when :Time
|
|
188
|
+
Time.parse(value)
|
|
172
189
|
when :Date
|
|
173
190
|
Date.parse(value)
|
|
174
191
|
when :String
|
|
@@ -198,7 +215,9 @@ module Shotstack
|
|
|
198
215
|
end
|
|
199
216
|
end
|
|
200
217
|
else # model
|
|
201
|
-
|
|
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)
|
|
202
221
|
end
|
|
203
222
|
end
|
|
204
223
|
|
|
@@ -224,7 +243,7 @@ module Shotstack
|
|
|
224
243
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
225
244
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
226
245
|
end
|
|
227
|
-
|
|
246
|
+
|
|
228
247
|
hash[param] = _to_hash(value)
|
|
229
248
|
end
|
|
230
249
|
hash
|
|
@@ -247,5 +266,7 @@ module Shotstack
|
|
|
247
266
|
value
|
|
248
267
|
end
|
|
249
268
|
end
|
|
269
|
+
|
|
250
270
|
end
|
|
271
|
+
|
|
251
272
|
end
|
data/lib/shotstack/version.rb
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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
|
module Shotstack
|
|
14
|
-
VERSION = '0.1.
|
|
14
|
+
VERSION = '0.1.8'
|
|
15
15
|
end
|
data/shotstack.gemspec
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
=begin
|
|
4
4
|
#Shotstack
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
#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>
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
9
|
|
|
10
10
|
Generated by: https://openapi-generator.tech
|
|
11
|
-
OpenAPI Generator version:
|
|
11
|
+
OpenAPI Generator version: 5.0.0
|
|
12
12
|
|
|
13
13
|
=end
|
|
14
14
|
|
|
@@ -23,12 +23,11 @@ Gem::Specification.new do |s|
|
|
|
23
23
|
s.email = [""]
|
|
24
24
|
s.homepage = "https://shotstack.io"
|
|
25
25
|
s.summary = "Shotstack SDK Ruby Gem"
|
|
26
|
-
s.description = "
|
|
26
|
+
s.description = "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>"
|
|
27
27
|
s.license = "MIT"
|
|
28
|
-
s.required_ruby_version = ">=
|
|
28
|
+
s.required_ruby_version = ">= 2.4"
|
|
29
29
|
|
|
30
30
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
31
|
-
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
|
32
31
|
|
|
33
32
|
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
33
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shotstack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shotstack
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -30,26 +30,6 @@ dependencies:
|
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 1.0.1
|
|
33
|
-
- !ruby/object:Gem::Dependency
|
|
34
|
-
name: json
|
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '2.1'
|
|
40
|
-
- - ">="
|
|
41
|
-
- !ruby/object:Gem::Version
|
|
42
|
-
version: 2.1.0
|
|
43
|
-
type: :runtime
|
|
44
|
-
prerelease: false
|
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
46
|
-
requirements:
|
|
47
|
-
- - "~>"
|
|
48
|
-
- !ruby/object:Gem::Version
|
|
49
|
-
version: '2.1'
|
|
50
|
-
- - ">="
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: 2.1.0
|
|
53
33
|
- !ruby/object:Gem::Dependency
|
|
54
34
|
name: rspec
|
|
55
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -70,10 +50,14 @@ dependencies:
|
|
|
70
50
|
- - ">="
|
|
71
51
|
- !ruby/object:Gem::Version
|
|
72
52
|
version: 3.6.0
|
|
73
|
-
description:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
more details
|
|
53
|
+
description: 'Shotstack is a video, image and audio editing service that allows for
|
|
54
|
+
the automated generation of videos, images and audio using JSON and a RESTful API. You
|
|
55
|
+
arrange and configure an edit and POST it to the API which will render your media
|
|
56
|
+
and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io)
|
|
57
|
+
or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started)
|
|
58
|
+
documentation. There are two main API''s, one for editing and generating assets
|
|
59
|
+
(Edit API) and one for managing hosted assets (Serve API). The Edit API base URL
|
|
60
|
+
is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>'
|
|
77
61
|
email:
|
|
78
62
|
- ''
|
|
79
63
|
executables: []
|
|
@@ -82,13 +66,21 @@ extra_rdoc_files: []
|
|
|
82
66
|
files:
|
|
83
67
|
- README.md
|
|
84
68
|
- lib/shotstack.rb
|
|
69
|
+
- lib/shotstack/api/edit_api.rb
|
|
85
70
|
- lib/shotstack/api/endpoints_api.rb
|
|
71
|
+
- lib/shotstack/api/serve_api.rb
|
|
86
72
|
- lib/shotstack/api_client.rb
|
|
87
73
|
- lib/shotstack/api_error.rb
|
|
88
74
|
- lib/shotstack/configuration.rb
|
|
89
75
|
- lib/shotstack/models/asset.rb
|
|
76
|
+
- lib/shotstack/models/asset_render_response.rb
|
|
77
|
+
- lib/shotstack/models/asset_response.rb
|
|
78
|
+
- lib/shotstack/models/asset_response_attributes.rb
|
|
79
|
+
- lib/shotstack/models/asset_response_data.rb
|
|
90
80
|
- lib/shotstack/models/audio_asset.rb
|
|
91
81
|
- lib/shotstack/models/clip.rb
|
|
82
|
+
- lib/shotstack/models/crop.rb
|
|
83
|
+
- lib/shotstack/models/destinations.rb
|
|
92
84
|
- lib/shotstack/models/edit.rb
|
|
93
85
|
- lib/shotstack/models/font.rb
|
|
94
86
|
- lib/shotstack/models/html_asset.rb
|
|
@@ -99,8 +91,11 @@ files:
|
|
|
99
91
|
- lib/shotstack/models/poster.rb
|
|
100
92
|
- lib/shotstack/models/queued_response.rb
|
|
101
93
|
- lib/shotstack/models/queued_response_data.rb
|
|
94
|
+
- lib/shotstack/models/range.rb
|
|
102
95
|
- lib/shotstack/models/render_response.rb
|
|
103
96
|
- lib/shotstack/models/render_response_data.rb
|
|
97
|
+
- lib/shotstack/models/shotstack_destination.rb
|
|
98
|
+
- lib/shotstack/models/size.rb
|
|
104
99
|
- lib/shotstack/models/soundtrack.rb
|
|
105
100
|
- lib/shotstack/models/thumbnail.rb
|
|
106
101
|
- lib/shotstack/models/timeline.rb
|
|
@@ -122,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
122
117
|
requirements:
|
|
123
118
|
- - ">="
|
|
124
119
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '
|
|
120
|
+
version: '2.4'
|
|
126
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
122
|
requirements:
|
|
128
123
|
- - ">="
|