shotstack 0.2.0 → 0.2.2
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/README.md +387 -23
- data/lib/shotstack/api/edit_api.rb +413 -7
- data/lib/shotstack/api/serve_api.rb +7 -7
- data/lib/shotstack/api_client.rb +1 -1
- data/lib/shotstack/api_error.rb +1 -1
- data/lib/shotstack/configuration.rb +1 -1
- data/lib/shotstack/models/asset.rb +2 -2
- data/lib/shotstack/models/asset_render_response.rb +6 -1
- data/lib/shotstack/models/asset_response.rb +6 -1
- data/lib/shotstack/models/asset_response_attributes.rb +27 -2
- data/lib/shotstack/models/asset_response_data.rb +11 -1
- data/lib/shotstack/models/audio_asset.rb +1 -3
- data/lib/shotstack/models/clip.rb +6 -12
- data/lib/shotstack/models/crop.rb +1 -1
- data/lib/shotstack/models/destinations.rb +7 -8
- data/lib/shotstack/models/edit.rb +2 -4
- data/lib/shotstack/models/flip_transformation.rb +1 -5
- data/lib/shotstack/models/font.rb +1 -1
- data/lib/shotstack/models/html_asset.rb +1 -5
- data/lib/shotstack/models/image_asset.rb +1 -1
- data/lib/shotstack/models/luma_asset.rb +1 -1
- data/lib/shotstack/models/merge_field.rb +1 -1
- data/lib/shotstack/models/mux_destination.rb +2 -2
- data/lib/shotstack/models/mux_destination_options.rb +1 -1
- data/lib/shotstack/models/offset.rb +23 -27
- data/lib/shotstack/models/output.rb +16 -9
- data/lib/shotstack/models/poster.rb +1 -1
- data/lib/shotstack/models/probe_response.rb +2 -2
- data/lib/shotstack/models/queued_response.rb +2 -2
- data/lib/shotstack/models/queued_response_data.rb +1 -1
- data/lib/shotstack/models/range.rb +1 -1
- data/lib/shotstack/models/render_response.rb +1 -1
- data/lib/shotstack/models/render_response_data.rb +3 -16
- data/lib/shotstack/models/rotate_transformation.rb +1 -3
- data/lib/shotstack/models/s3_destination.rb +236 -0
- data/lib/shotstack/models/s3_destination_options.rb +270 -0
- data/lib/shotstack/models/shotstack_destination.rb +3 -5
- data/lib/shotstack/models/size.rb +4 -4
- data/lib/shotstack/models/skew_transformation.rb +1 -5
- data/lib/shotstack/models/soundtrack.rb +1 -3
- data/lib/shotstack/models/template.rb +234 -0
- data/lib/shotstack/models/template_data_response.rb +254 -0
- data/lib/shotstack/models/template_data_response_data.rb +269 -0
- data/lib/shotstack/models/template_list_response.rb +254 -0
- data/lib/shotstack/models/template_list_response_data.rb +242 -0
- data/lib/shotstack/models/template_list_response_item.rb +260 -0
- data/lib/shotstack/models/template_render.rb +237 -0
- data/lib/shotstack/models/template_response.rb +254 -0
- data/lib/shotstack/models/template_response_data.rb +240 -0
- data/lib/shotstack/models/thumbnail.rb +1 -1
- data/lib/shotstack/models/timeline.rb +1 -5
- data/lib/shotstack/models/title_asset.rb +2 -8
- data/lib/shotstack/models/track.rb +1 -1
- data/lib/shotstack/models/transformation.rb +1 -1
- data/lib/shotstack/models/transition.rb +1 -1
- data/lib/shotstack/models/video_asset.rb +47 -3
- data/lib/shotstack/version.rb +2 -2
- data/lib/shotstack.rb +12 -1
- metadata +24 -12
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shotstack
|
|
3
|
+
|
|
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.io/docs/guide/) 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
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Shotstack
|
|
17
|
+
# The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
|
|
18
|
+
class TemplateResponse
|
|
19
|
+
# `true` if successfully created, else `false`.
|
|
20
|
+
attr_accessor :success
|
|
21
|
+
|
|
22
|
+
# `Created`, `Bad Request` or an error message.
|
|
23
|
+
attr_accessor :message
|
|
24
|
+
|
|
25
|
+
attr_accessor :response
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'success' => :'success',
|
|
31
|
+
:'message' => :'message',
|
|
32
|
+
:'response' => :'response'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'success' => :'Boolean',
|
|
45
|
+
:'message' => :'String',
|
|
46
|
+
:'response' => :'TemplateResponseData'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shotstack::TemplateResponse` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shotstack::TemplateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'success')
|
|
72
|
+
self.success = attributes[:'success']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'message')
|
|
76
|
+
self.message = attributes[:'message']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'response')
|
|
80
|
+
self.response = attributes[:'response']
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @success.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @message.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if @response.nil?
|
|
97
|
+
invalid_properties.push('invalid value for "response", response cannot be nil.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
return false if @success.nil?
|
|
107
|
+
return false if @message.nil?
|
|
108
|
+
return false if @response.nil?
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
success == o.success &&
|
|
118
|
+
message == o.message &&
|
|
119
|
+
response == o.response
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def eql?(o)
|
|
125
|
+
self == o
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Integer] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[success, message, response].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Builds the object from hash
|
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
+
# @return [Object] Returns the model itself
|
|
137
|
+
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
|
+
return nil unless attributes.is_a?(Hash)
|
|
146
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
147
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
148
|
+
self.send("#{key}=", nil)
|
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
150
|
+
# check to ensure the input is an array given that the attribute
|
|
151
|
+
# is documented as an array but the input is not
|
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
154
|
+
end
|
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
self
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Deserializes the data based on type
|
|
164
|
+
# @param string type Data type
|
|
165
|
+
# @param string value Value to be deserialized
|
|
166
|
+
# @return [Object] Deserialized data
|
|
167
|
+
def _deserialize(type, value)
|
|
168
|
+
case type.to_sym
|
|
169
|
+
when :Time
|
|
170
|
+
Time.parse(value)
|
|
171
|
+
when :Date
|
|
172
|
+
Date.parse(value)
|
|
173
|
+
when :String
|
|
174
|
+
value.to_s
|
|
175
|
+
when :Integer
|
|
176
|
+
value.to_i
|
|
177
|
+
when :Float
|
|
178
|
+
value.to_f
|
|
179
|
+
when :Boolean
|
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
181
|
+
true
|
|
182
|
+
else
|
|
183
|
+
false
|
|
184
|
+
end
|
|
185
|
+
when :Object
|
|
186
|
+
# generic object (usually a Hash), return directly
|
|
187
|
+
value
|
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each do |k, v|
|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
else # model
|
|
200
|
+
# models (e.g. Pet) or oneOf
|
|
201
|
+
klass = Shotstack.const_get(type)
|
|
202
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Returns the string representation of the object
|
|
207
|
+
# @return [String] String presentation of the object
|
|
208
|
+
def to_s
|
|
209
|
+
to_hash.to_s
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_body
|
|
215
|
+
to_hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns the object in the form of hash
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_hash
|
|
221
|
+
hash = {}
|
|
222
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
223
|
+
value = self.send(attr)
|
|
224
|
+
if value.nil?
|
|
225
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
226
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
hash[param] = _to_hash(value)
|
|
230
|
+
end
|
|
231
|
+
hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Outputs non-array value in the form of hash
|
|
235
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
236
|
+
# @param [Object] value Any valid value
|
|
237
|
+
# @return [Hash] Returns the value in the form of hash
|
|
238
|
+
def _to_hash(value)
|
|
239
|
+
if value.is_a?(Array)
|
|
240
|
+
value.compact.map { |v| _to_hash(v) }
|
|
241
|
+
elsif value.is_a?(Hash)
|
|
242
|
+
{}.tap do |hash|
|
|
243
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
244
|
+
end
|
|
245
|
+
elsif value.respond_to? :to_hash
|
|
246
|
+
value.to_hash
|
|
247
|
+
else
|
|
248
|
+
value
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shotstack
|
|
3
|
+
|
|
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.io/docs/guide/) 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
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Shotstack
|
|
17
|
+
# The response data returned with the [TemplateResponse](#tocs_templateresponse).
|
|
18
|
+
class TemplateResponseData
|
|
19
|
+
# Success response message or error details.
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# The unique id of the template in UUID format.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'message' => :'message',
|
|
29
|
+
:'id' => :'id'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'message' => :'String',
|
|
42
|
+
:'id' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Shotstack::TemplateResponseData` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Shotstack::TemplateResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'message')
|
|
68
|
+
self.message = attributes[:'message']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'id')
|
|
72
|
+
self.id = attributes[:'id']
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
invalid_properties = Array.new
|
|
80
|
+
if @message.nil?
|
|
81
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if @id.nil?
|
|
85
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
return false if @message.nil?
|
|
95
|
+
return false if @id.nil?
|
|
96
|
+
true
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Checks equality by comparing each attribute.
|
|
100
|
+
# @param [Object] Object to be compared
|
|
101
|
+
def ==(o)
|
|
102
|
+
return true if self.equal?(o)
|
|
103
|
+
self.class == o.class &&
|
|
104
|
+
message == o.message &&
|
|
105
|
+
id == o.id
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# @see the `==` method
|
|
109
|
+
# @param [Object] Object to be compared
|
|
110
|
+
def eql?(o)
|
|
111
|
+
self == o
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Calculates hash code according to all attributes.
|
|
115
|
+
# @return [Integer] Hash code
|
|
116
|
+
def hash
|
|
117
|
+
[message, id].hash
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Builds the object from hash
|
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
122
|
+
# @return [Object] Returns the model itself
|
|
123
|
+
def self.build_from_hash(attributes)
|
|
124
|
+
new.build_from_hash(attributes)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
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
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
self
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def _deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
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)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the object in the form of hash
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_hash
|
|
207
|
+
hash = {}
|
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shotstack
|
|
3
3
|
|
|
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.io/docs/guide/) documentation.
|
|
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.io/docs/guide/) 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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shotstack
|
|
3
3
|
|
|
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.io/docs/guide/) documentation.
|
|
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.io/docs/guide/) 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
|
|
|
@@ -84,8 +84,6 @@ module Shotstack
|
|
|
84
84
|
|
|
85
85
|
if attributes.key?(:'background')
|
|
86
86
|
self.background = attributes[:'background']
|
|
87
|
-
else
|
|
88
|
-
self.background = '#000000'
|
|
89
87
|
end
|
|
90
88
|
|
|
91
89
|
if attributes.key?(:'fonts')
|
|
@@ -102,8 +100,6 @@ module Shotstack
|
|
|
102
100
|
|
|
103
101
|
if attributes.key?(:'cache')
|
|
104
102
|
self.cache = attributes[:'cache']
|
|
105
|
-
else
|
|
106
|
-
self.cache = true
|
|
107
103
|
end
|
|
108
104
|
end
|
|
109
105
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shotstack
|
|
3
3
|
|
|
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.io/docs/guide/) documentation.
|
|
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.io/docs/guide/) 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
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Shotstack
|
|
17
|
-
# The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
|
|
17
|
+
# **Notice: The title asset is deprecated, use the [HTML asset](#tocs_htmlasset) instead.** The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
|
|
18
18
|
class TitleAsset
|
|
19
19
|
# The type of asset - set to `title` for titles.
|
|
20
20
|
attr_accessor :type
|
|
@@ -131,14 +131,10 @@ module Shotstack
|
|
|
131
131
|
|
|
132
132
|
if attributes.key?(:'color')
|
|
133
133
|
self.color = attributes[:'color']
|
|
134
|
-
else
|
|
135
|
-
self.color = '#ffffff'
|
|
136
134
|
end
|
|
137
135
|
|
|
138
136
|
if attributes.key?(:'size')
|
|
139
137
|
self.size = attributes[:'size']
|
|
140
|
-
else
|
|
141
|
-
self.size = 'medium'
|
|
142
138
|
end
|
|
143
139
|
|
|
144
140
|
if attributes.key?(:'background')
|
|
@@ -147,8 +143,6 @@ module Shotstack
|
|
|
147
143
|
|
|
148
144
|
if attributes.key?(:'position')
|
|
149
145
|
self.position = attributes[:'position']
|
|
150
|
-
else
|
|
151
|
-
self.position = 'center'
|
|
152
146
|
end
|
|
153
147
|
|
|
154
148
|
if attributes.key?(:'offset')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shotstack
|
|
3
3
|
|
|
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.io/docs/guide/) documentation.
|
|
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.io/docs/guide/) 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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shotstack
|
|
3
3
|
|
|
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.io/docs/guide/) documentation.
|
|
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.io/docs/guide/) 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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Shotstack
|
|
3
3
|
|
|
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.io/docs/guide/) documentation.
|
|
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.io/docs/guide/) 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
|
|