shotstack 0.2.2 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Rakefile +10 -0
- data/lib/shotstack/api/create_api.rb +158 -0
- data/lib/shotstack/api/edit_api.rb +20 -20
- data/lib/shotstack/api/ingest_api.rb +338 -0
- data/lib/shotstack/api/serve_api.rb +76 -8
- data/lib/shotstack/api_client.rb +28 -24
- data/lib/shotstack/api_error.rb +3 -2
- data/lib/shotstack/configuration.rb +55 -9
- data/lib/shotstack/models/asset.rb +3 -3
- data/lib/shotstack/models/asset_render_response.rb +18 -20
- data/lib/shotstack/models/asset_response.rb +18 -20
- data/lib/shotstack/models/asset_response_attributes.rb +23 -21
- data/lib/shotstack/models/asset_response_data.rb +20 -20
- data/lib/shotstack/models/audio_asset.rb +57 -21
- data/lib/shotstack/models/audio_enhancement.rb +43 -0
- data/lib/shotstack/models/clip.rb +27 -25
- data/lib/shotstack/models/crop.rb +40 -28
- data/lib/shotstack/models/destinations.rb +78 -243
- data/lib/shotstack/models/did_generated_asset.rb +273 -0
- data/lib/shotstack/models/did_generated_asset_options.rb +54 -0
- data/lib/shotstack/models/did_text_to_avatar_options.rb +313 -0
- data/lib/shotstack/models/dolby_enhancement.rb +239 -0
- data/lib/shotstack/models/dolby_enhancement_options.rb +257 -0
- data/lib/shotstack/models/edit.rb +22 -22
- data/lib/shotstack/models/eleven_labs_generated_asset.rb +273 -0
- data/lib/shotstack/models/eleven_labs_generated_asset_options.rb +54 -0
- data/lib/shotstack/models/eleven_labs_text_to_speech_options.rb +303 -0
- data/lib/shotstack/models/enhancements.rb +215 -0
- data/lib/shotstack/models/flip_transformation.rb +16 -20
- data/lib/shotstack/models/font.rb +18 -20
- data/lib/shotstack/models/generated_asset.rb +48 -0
- data/lib/shotstack/models/generated_asset_error_response.rb +225 -0
- data/lib/shotstack/models/generated_asset_error_response_data.rb +257 -0
- data/lib/shotstack/models/generated_asset_response.rb +222 -0
- data/lib/shotstack/models/generated_asset_response_attributes.rb +376 -0
- data/lib/shotstack/models/generated_asset_response_data.rb +256 -0
- data/lib/shotstack/models/google_cloud_storage_destination.rb +232 -0
- data/lib/shotstack/models/google_cloud_storage_destination_options.rb +243 -0
- data/lib/shotstack/models/google_drive_destination.rb +239 -0
- data/lib/shotstack/models/google_drive_destination_options.rb +233 -0
- data/lib/shotstack/models/hey_gen_generated_asset.rb +273 -0
- data/lib/shotstack/models/hey_gen_generated_asset_options.rb +54 -0
- data/lib/shotstack/models/hey_gen_text_to_avatar_options.rb +396 -0
- data/lib/shotstack/models/html_asset.rb +20 -22
- data/lib/shotstack/models/image_asset.rb +18 -20
- data/lib/shotstack/models/ingest_error_response.rb +225 -0
- data/lib/shotstack/models/ingest_error_response_data.rb +257 -0
- data/lib/shotstack/models/luma_asset.rb +18 -20
- data/lib/shotstack/models/merge_field.rb +20 -20
- data/lib/shotstack/models/mux_destination.rb +18 -22
- data/lib/shotstack/models/mux_destination_options.rb +50 -25
- data/lib/shotstack/models/offset.rb +28 -24
- data/lib/shotstack/models/open_ai_generated_asset.rb +273 -0
- data/lib/shotstack/models/open_ai_generated_asset_options.rb +54 -0
- data/lib/shotstack/models/open_ai_text_generator_options.rb +313 -0
- data/lib/shotstack/models/output.rb +27 -29
- data/lib/shotstack/models/outputs.rb +227 -0
- data/lib/shotstack/models/outputs_response.rb +218 -0
- data/lib/shotstack/models/poster.rb +18 -20
- data/lib/shotstack/models/probe_response.rb +22 -20
- data/lib/shotstack/models/queued_response.rb +22 -20
- data/lib/shotstack/models/queued_response_data.rb +20 -20
- data/lib/shotstack/models/queued_source_response.rb +222 -0
- data/lib/shotstack/models/queued_source_response_data.rb +240 -0
- data/lib/shotstack/models/range.rb +26 -22
- data/lib/shotstack/models/render_response.rb +22 -20
- data/lib/shotstack/models/render_response_data.rb +22 -20
- data/lib/shotstack/models/rendition.rb +429 -0
- data/lib/shotstack/models/rendition_response_attributes.rb +336 -0
- data/lib/shotstack/models/rotate_transformation.rb +16 -20
- data/lib/shotstack/models/s3_destination.rb +18 -22
- data/lib/shotstack/models/s3_destination_options.rb +21 -21
- data/lib/shotstack/models/shotstack_destination.rb +19 -23
- data/lib/shotstack/models/shotstack_generated_asset.rb +273 -0
- data/lib/shotstack/models/shotstack_generated_asset_options.rb +60 -0
- data/lib/shotstack/models/shotstack_image_to_video_options.rb +298 -0
- data/lib/shotstack/models/shotstack_text_generator_options.rb +274 -0
- data/lib/shotstack/models/shotstack_text_to_image_options.rb +308 -0
- data/lib/shotstack/models/shotstack_text_to_speech_options.rb +339 -0
- data/lib/shotstack/models/size.rb +36 -32
- data/lib/shotstack/models/skew_transformation.rb +16 -20
- data/lib/shotstack/models/soundtrack.rb +18 -20
- data/lib/shotstack/models/source.rb +244 -0
- data/lib/shotstack/models/source_list_response.rb +225 -0
- data/lib/shotstack/models/source_response.rb +222 -0
- data/lib/shotstack/models/source_response_attributes.rb +373 -0
- data/lib/shotstack/models/source_response_data.rb +256 -0
- data/lib/shotstack/models/speed.rb +254 -0
- data/lib/shotstack/models/stability_ai_generated_asset.rb +273 -0
- data/lib/shotstack/models/stability_ai_generated_asset_options.rb +54 -0
- data/lib/shotstack/models/stability_ai_text_to_image_options.rb +390 -0
- data/lib/shotstack/models/template.rb +18 -20
- data/lib/shotstack/models/template_data_response.rb +23 -21
- data/lib/shotstack/models/template_data_response_data.rb +24 -20
- data/lib/shotstack/models/template_list_response.rb +24 -22
- data/lib/shotstack/models/template_list_response_data.rb +20 -20
- data/lib/shotstack/models/template_list_response_item.rb +20 -20
- data/lib/shotstack/models/template_render.rb +18 -20
- data/lib/shotstack/models/template_response.rb +22 -20
- data/lib/shotstack/models/template_response_data.rb +20 -20
- data/lib/shotstack/models/thumbnail.rb +20 -20
- data/lib/shotstack/models/timeline.rb +19 -21
- data/lib/shotstack/models/title_asset.rb +18 -20
- data/lib/shotstack/models/track.rb +18 -20
- data/lib/shotstack/models/transcription.rb +250 -0
- data/lib/shotstack/models/transfer.rb +259 -0
- data/lib/shotstack/models/transfer_response.rb +222 -0
- data/lib/shotstack/models/transfer_response_attributes.rb +280 -0
- data/lib/shotstack/models/transfer_response_data.rb +225 -0
- data/lib/shotstack/models/transformation.rb +16 -20
- data/lib/shotstack/models/transition.rb +16 -20
- data/lib/shotstack/models/upload_response.rb +222 -0
- data/lib/shotstack/models/upload_response_attributes.rb +257 -0
- data/lib/shotstack/models/upload_response_data.rb +256 -0
- data/lib/shotstack/models/video_asset.rb +57 -21
- data/lib/shotstack/version.rb +3 -3
- data/lib/shotstack.rb +61 -2
- data/shotstack.gemspec +8 -8
- metadata +69 -16
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
4
|
+
# Official Ruby SDK for the Shotstack Cloud Video Editing API
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -76,6 +76,7 @@ module Shotstack
|
|
76
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
77
|
# @return Array for valid properties with the reasons
|
78
78
|
def list_invalid_properties
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
80
|
invalid_properties = Array.new
|
80
81
|
if !@start.nil? && @start < 0
|
81
82
|
invalid_properties.push('invalid value for "start", must be greater than or equal to 0.')
|
@@ -91,6 +92,7 @@ module Shotstack
|
|
91
92
|
# Check to see if the all the properties in the model are valid
|
92
93
|
# @return true if the model is valid
|
93
94
|
def valid?
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
94
96
|
return false if !@start.nil? && @start < 0
|
95
97
|
return false if !@length.nil? && @length < 0
|
96
98
|
true
|
@@ -99,7 +101,11 @@ module Shotstack
|
|
99
101
|
# Custom attribute writer method with validation
|
100
102
|
# @param [Object] start Value to be assigned
|
101
103
|
def start=(start)
|
102
|
-
if
|
104
|
+
if start.nil?
|
105
|
+
fail ArgumentError, 'start cannot be nil'
|
106
|
+
end
|
107
|
+
|
108
|
+
if start < 0
|
103
109
|
fail ArgumentError, 'invalid value for "start", must be greater than or equal to 0.'
|
104
110
|
end
|
105
111
|
|
@@ -109,7 +115,11 @@ module Shotstack
|
|
109
115
|
# Custom attribute writer method with validation
|
110
116
|
# @param [Object] length Value to be assigned
|
111
117
|
def length=(length)
|
112
|
-
if
|
118
|
+
if length.nil?
|
119
|
+
fail ArgumentError, 'length cannot be nil'
|
120
|
+
end
|
121
|
+
|
122
|
+
if length < 0
|
113
123
|
fail ArgumentError, 'invalid value for "length", must be greater than or equal to 0.'
|
114
124
|
end
|
115
125
|
|
@@ -141,36 +151,30 @@ module Shotstack
|
|
141
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
142
152
|
# @return [Object] Returns the model itself
|
143
153
|
def self.build_from_hash(attributes)
|
144
|
-
new.build_from_hash(attributes)
|
145
|
-
end
|
146
|
-
|
147
|
-
# Builds the object from hash
|
148
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
-
# @return [Object] Returns the model itself
|
150
|
-
def build_from_hash(attributes)
|
151
154
|
return nil unless attributes.is_a?(Hash)
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
156
|
+
transformed_hash = {}
|
157
|
+
openapi_types.each_pair do |key, type|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = nil
|
155
160
|
elsif type =~ /\AArray<(.*)>/i
|
156
161
|
# check to ensure the input is an array given that the attribute
|
157
162
|
# is documented as an array but the input is not
|
158
|
-
if attributes[
|
159
|
-
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
165
|
end
|
161
|
-
elsif !attributes[
|
162
|
-
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
168
|
end
|
164
169
|
end
|
165
|
-
|
166
|
-
self
|
170
|
+
new(transformed_hash)
|
167
171
|
end
|
168
172
|
|
169
173
|
# Deserializes the data based on type
|
170
174
|
# @param string type Data type
|
171
175
|
# @param string value Value to be deserialized
|
172
176
|
# @return [Object] Deserialized data
|
173
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
174
178
|
case type.to_sym
|
175
179
|
when :Time
|
176
180
|
Time.parse(value)
|
@@ -205,7 +209,7 @@ module Shotstack
|
|
205
209
|
else # model
|
206
210
|
# models (e.g. Pet) or oneOf
|
207
211
|
klass = Shotstack.const_get(type)
|
208
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
213
|
end
|
210
214
|
end
|
211
215
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
4
|
+
# Official Ruby SDK for the Shotstack Cloud Video Editing API
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -70,20 +70,27 @@ module Shotstack
|
|
70
70
|
|
71
71
|
if attributes.key?(:'success')
|
72
72
|
self.success = attributes[:'success']
|
73
|
+
else
|
74
|
+
self.success = nil
|
73
75
|
end
|
74
76
|
|
75
77
|
if attributes.key?(:'message')
|
76
78
|
self.message = attributes[:'message']
|
79
|
+
else
|
80
|
+
self.message = nil
|
77
81
|
end
|
78
82
|
|
79
83
|
if attributes.key?(:'response')
|
80
84
|
self.response = attributes[:'response']
|
85
|
+
else
|
86
|
+
self.response = nil
|
81
87
|
end
|
82
88
|
end
|
83
89
|
|
84
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
91
|
# @return Array for valid properties with the reasons
|
86
92
|
def list_invalid_properties
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
94
|
invalid_properties = Array.new
|
88
95
|
if @success.nil?
|
89
96
|
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
@@ -103,6 +110,7 @@ module Shotstack
|
|
103
110
|
# Check to see if the all the properties in the model are valid
|
104
111
|
# @return true if the model is valid
|
105
112
|
def valid?
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
106
114
|
return false if @success.nil?
|
107
115
|
return false if @message.nil?
|
108
116
|
return false if @response.nil?
|
@@ -135,36 +143,30 @@ module Shotstack
|
|
135
143
|
# @param [Hash] attributes Model attributes in the form of hash
|
136
144
|
# @return [Object] Returns the model itself
|
137
145
|
def self.build_from_hash(attributes)
|
138
|
-
new.build_from_hash(attributes)
|
139
|
-
end
|
140
|
-
|
141
|
-
# Builds the object from hash
|
142
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
-
# @return [Object] Returns the model itself
|
144
|
-
def build_from_hash(attributes)
|
145
146
|
return nil unless attributes.is_a?(Hash)
|
146
|
-
|
147
|
-
|
148
|
-
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
149
152
|
elsif type =~ /\AArray<(.*)>/i
|
150
153
|
# check to ensure the input is an array given that the attribute
|
151
154
|
# is documented as an array but the input is not
|
152
|
-
if attributes[
|
153
|
-
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
154
157
|
end
|
155
|
-
elsif !attributes[
|
156
|
-
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
157
160
|
end
|
158
161
|
end
|
159
|
-
|
160
|
-
self
|
162
|
+
new(transformed_hash)
|
161
163
|
end
|
162
164
|
|
163
165
|
# Deserializes the data based on type
|
164
166
|
# @param string type Data type
|
165
167
|
# @param string value Value to be deserialized
|
166
168
|
# @return [Object] Deserialized data
|
167
|
-
def _deserialize(type, value)
|
169
|
+
def self._deserialize(type, value)
|
168
170
|
case type.to_sym
|
169
171
|
when :Time
|
170
172
|
Time.parse(value)
|
@@ -199,7 +201,7 @@ module Shotstack
|
|
199
201
|
else # model
|
200
202
|
# models (e.g. Pet) or oneOf
|
201
203
|
klass = Shotstack.const_get(type)
|
202
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
203
205
|
end
|
204
206
|
end
|
205
207
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
4
|
+
# Official Ruby SDK for the Shotstack Cloud Video Editing API
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.4.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -144,10 +144,14 @@ module Shotstack
|
|
144
144
|
|
145
145
|
if attributes.key?(:'id')
|
146
146
|
self.id = attributes[:'id']
|
147
|
+
else
|
148
|
+
self.id = nil
|
147
149
|
end
|
148
150
|
|
149
151
|
if attributes.key?(:'owner')
|
150
152
|
self.owner = attributes[:'owner']
|
153
|
+
else
|
154
|
+
self.owner = nil
|
151
155
|
end
|
152
156
|
|
153
157
|
if attributes.key?(:'plan')
|
@@ -156,6 +160,8 @@ module Shotstack
|
|
156
160
|
|
157
161
|
if attributes.key?(:'status')
|
158
162
|
self.status = attributes[:'status']
|
163
|
+
else
|
164
|
+
self.status = nil
|
159
165
|
end
|
160
166
|
|
161
167
|
if attributes.key?(:'error')
|
@@ -198,6 +204,7 @@ module Shotstack
|
|
198
204
|
# Show invalid properties with the reasons. Usually used together with valid?
|
199
205
|
# @return Array for valid properties with the reasons
|
200
206
|
def list_invalid_properties
|
207
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
201
208
|
invalid_properties = Array.new
|
202
209
|
if @id.nil?
|
203
210
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
@@ -217,6 +224,7 @@ module Shotstack
|
|
217
224
|
# Check to see if the all the properties in the model are valid
|
218
225
|
# @return true if the model is valid
|
219
226
|
def valid?
|
227
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
220
228
|
return false if @id.nil?
|
221
229
|
return false if @owner.nil?
|
222
230
|
return false if @status.nil?
|
@@ -271,36 +279,30 @@ module Shotstack
|
|
271
279
|
# @param [Hash] attributes Model attributes in the form of hash
|
272
280
|
# @return [Object] Returns the model itself
|
273
281
|
def self.build_from_hash(attributes)
|
274
|
-
new.build_from_hash(attributes)
|
275
|
-
end
|
276
|
-
|
277
|
-
# Builds the object from hash
|
278
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
279
|
-
# @return [Object] Returns the model itself
|
280
|
-
def build_from_hash(attributes)
|
281
282
|
return nil unless attributes.is_a?(Hash)
|
282
|
-
|
283
|
-
|
284
|
-
|
283
|
+
attributes = attributes.transform_keys(&:to_sym)
|
284
|
+
transformed_hash = {}
|
285
|
+
openapi_types.each_pair do |key, type|
|
286
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
287
|
+
transformed_hash["#{key}"] = nil
|
285
288
|
elsif type =~ /\AArray<(.*)>/i
|
286
289
|
# check to ensure the input is an array given that the attribute
|
287
290
|
# is documented as an array but the input is not
|
288
|
-
if attributes[
|
289
|
-
|
291
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
292
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
290
293
|
end
|
291
|
-
elsif !attributes[
|
292
|
-
|
294
|
+
elsif !attributes[attribute_map[key]].nil?
|
295
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
293
296
|
end
|
294
297
|
end
|
295
|
-
|
296
|
-
self
|
298
|
+
new(transformed_hash)
|
297
299
|
end
|
298
300
|
|
299
301
|
# Deserializes the data based on type
|
300
302
|
# @param string type Data type
|
301
303
|
# @param string value Value to be deserialized
|
302
304
|
# @return [Object] Deserialized data
|
303
|
-
def _deserialize(type, value)
|
305
|
+
def self._deserialize(type, value)
|
304
306
|
case type.to_sym
|
305
307
|
when :Time
|
306
308
|
Time.parse(value)
|
@@ -335,7 +337,7 @@ module Shotstack
|
|
335
337
|
else # model
|
336
338
|
# models (e.g. Pet) or oneOf
|
337
339
|
klass = Shotstack.const_get(type)
|
338
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
340
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
339
341
|
end
|
340
342
|
end
|
341
343
|
|