shotstack 0.1.0 → 0.1.5
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 +3 -1
- data/lib/shotstack/api/endpoints_api.rb +20 -11
- 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 +70 -12
- data/lib/shotstack/models/clip.rb +27 -13
- 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 +25 -13
- data/lib/shotstack/models/image_asset.rb +34 -13
- data/lib/shotstack/models/luma_asset.rb +20 -8
- data/lib/shotstack/models/offset.rb +23 -7
- data/lib/shotstack/models/output.rb +60 -15
- data/lib/shotstack/models/poster.rb +19 -7
- data/lib/shotstack/models/queued_response.rb +21 -7
- data/lib/shotstack/models/queued_response_data.rb +21 -9
- data/lib/shotstack/models/range.rb +260 -0
- data/lib/shotstack/models/render_response.rb +21 -7
- data/lib/shotstack/models/render_response_data.rb +100 -28
- data/lib/shotstack/models/soundtrack.rb +22 -8
- data/lib/shotstack/models/thumbnail.rb +19 -7
- data/lib/shotstack/models/timeline.rb +19 -7
- data/lib/shotstack/models/title_asset.rb +24 -12
- data/lib/shotstack/models/track.rb +19 -7
- data/lib/shotstack/models/transition.rb +25 -13
- data/lib/shotstack/models/video_asset.rb +33 -12
- data/lib/shotstack/version.rb +2 -2
- data/shotstack.gemspec +6 -7
- metadata +9 -28
- data/shotstack-0.0.11.gem +0 -0
@@ -6,19 +6,20 @@
|
|
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
|
@@ -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 VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.
|
18
19
|
class VideoAsset < Asset
|
19
|
-
# The type of asset - set to
|
20
|
+
# The type of asset - set to `video` for videos.
|
20
21
|
attr_accessor :type
|
21
22
|
|
22
23
|
# The video source URL. The URL must be publicly accessible or include credentials.
|
@@ -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
data/shotstack.gemspec
CHANGED
@@ -8,7 +8,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
|
|
@@ -19,16 +19,15 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.name = "shotstack"
|
20
20
|
s.version = Shotstack::VERSION
|
21
21
|
s.platform = Gem::Platform::RUBY
|
22
|
-
s.authors = ["
|
22
|
+
s.authors = ["Shotstack"]
|
23
23
|
s.email = [""]
|
24
|
-
s.homepage = "https://
|
25
|
-
s.summary = "Shotstack Ruby Gem"
|
24
|
+
s.homepage = "https://shotstack.io"
|
25
|
+
s.summary = "Shotstack SDK Ruby Gem"
|
26
26
|
s.description = "The Shotstack API is a video editing service that allows for the automated creation of videos using JSON. You can configure an edit and POST it to the Shotstack API which will render your video and provide a file location when complete. For more details check https://shotstack.io"
|
27
|
-
s.license = "
|
28
|
-
s.required_ruby_version = ">=
|
27
|
+
s.license = "MIT"
|
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.5
|
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-01-01 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
|
@@ -89,6 +69,7 @@ files:
|
|
89
69
|
- lib/shotstack/models/asset.rb
|
90
70
|
- lib/shotstack/models/audio_asset.rb
|
91
71
|
- lib/shotstack/models/clip.rb
|
72
|
+
- lib/shotstack/models/crop.rb
|
92
73
|
- lib/shotstack/models/edit.rb
|
93
74
|
- lib/shotstack/models/font.rb
|
94
75
|
- lib/shotstack/models/html_asset.rb
|
@@ -99,6 +80,7 @@ files:
|
|
99
80
|
- lib/shotstack/models/poster.rb
|
100
81
|
- lib/shotstack/models/queued_response.rb
|
101
82
|
- lib/shotstack/models/queued_response_data.rb
|
83
|
+
- lib/shotstack/models/range.rb
|
102
84
|
- lib/shotstack/models/render_response.rb
|
103
85
|
- lib/shotstack/models/render_response_data.rb
|
104
86
|
- lib/shotstack/models/soundtrack.rb
|
@@ -109,11 +91,10 @@ files:
|
|
109
91
|
- lib/shotstack/models/transition.rb
|
110
92
|
- lib/shotstack/models/video_asset.rb
|
111
93
|
- lib/shotstack/version.rb
|
112
|
-
- shotstack-0.0.11.gem
|
113
94
|
- shotstack.gemspec
|
114
|
-
homepage: https://
|
95
|
+
homepage: https://shotstack.io
|
115
96
|
licenses:
|
116
|
-
-
|
97
|
+
- MIT
|
117
98
|
metadata: {}
|
118
99
|
post_install_message:
|
119
100
|
rdoc_options: []
|
@@ -123,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
104
|
requirements:
|
124
105
|
- - ">="
|
125
106
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
107
|
+
version: '2.4'
|
127
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
109
|
requirements:
|
129
110
|
- - ">="
|
@@ -134,5 +115,5 @@ rubyforge_project:
|
|
134
115
|
rubygems_version: 2.7.6
|
135
116
|
signing_key:
|
136
117
|
specification_version: 4
|
137
|
-
summary: Shotstack Ruby Gem
|
118
|
+
summary: Shotstack SDK Ruby Gem
|
138
119
|
test_files: []
|
data/shotstack-0.0.11.gem
DELETED
Binary file
|