shotstack 0.1.5 → 0.1.9

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shotstack/api/edit_api.rb +224 -0
  3. data/lib/shotstack/api/endpoints_api.rb +1 -1
  4. data/lib/shotstack/api/serve_api.rb +224 -0
  5. data/lib/shotstack/api_client.rb +1 -1
  6. data/lib/shotstack/api_error.rb +1 -1
  7. data/lib/shotstack/configuration.rb +16 -2
  8. data/lib/shotstack/models/asset_render_response.rb +222 -0
  9. data/lib/shotstack/models/asset_response.rb +219 -0
  10. data/lib/shotstack/models/asset_response_attributes.rb +334 -0
  11. data/lib/shotstack/models/asset_response_data.rb +229 -0
  12. data/lib/shotstack/models/audio_asset.rb +1 -1
  13. data/lib/shotstack/models/clip.rb +17 -8
  14. data/lib/shotstack/models/crop.rb +1 -1
  15. data/lib/shotstack/models/destinations.rb +17 -0
  16. data/lib/shotstack/models/edit.rb +65 -7
  17. data/lib/shotstack/models/flip_transformation.rb +234 -0
  18. data/lib/shotstack/models/font.rb +2 -2
  19. data/lib/shotstack/models/html_asset.rb +3 -3
  20. data/lib/shotstack/models/image_asset.rb +2 -2
  21. data/lib/shotstack/models/luma_asset.rb +4 -4
  22. data/lib/shotstack/models/merge_field.rb +236 -0
  23. data/lib/shotstack/models/offset.rb +1 -1
  24. data/lib/shotstack/models/output.rb +71 -19
  25. data/lib/shotstack/models/poster.rb +1 -1
  26. data/lib/shotstack/models/probe_response.rb +255 -0
  27. data/lib/shotstack/models/queued_response.rb +2 -1
  28. data/lib/shotstack/models/queued_response_data.rb +2 -1
  29. data/lib/shotstack/models/range.rb +3 -3
  30. data/lib/shotstack/models/render_response.rb +2 -1
  31. data/lib/shotstack/models/render_response_data.rb +6 -5
  32. data/lib/shotstack/models/rotate_transformation.rb +222 -0
  33. data/lib/shotstack/models/shotstack_destination.rb +240 -0
  34. data/lib/shotstack/models/size.rb +278 -0
  35. data/lib/shotstack/models/skew_transformation.rb +234 -0
  36. data/lib/shotstack/models/soundtrack.rb +1 -1
  37. data/lib/shotstack/models/thumbnail.rb +2 -2
  38. data/lib/shotstack/models/timeline.rb +18 -6
  39. data/lib/shotstack/models/title_asset.rb +1 -1
  40. data/lib/shotstack/models/track.rb +1 -1
  41. data/lib/shotstack/models/transformation.rb +237 -0
  42. data/lib/shotstack/models/transition.rb +7 -7
  43. data/lib/shotstack/models/video_asset.rb +1 -1
  44. data/lib/shotstack/version.rb +2 -2
  45. data/lib/shotstack.rb +15 -1
  46. data/shotstack.gemspec +2 -2
  47. metadata +25 -6
@@ -0,0 +1,236 @@
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.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
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Shotstack
17
+ # A merge field consists of a key; `find`, and a value; `replace`. Merge fields can be used to replace placeholders within the JSON edit to create re-usable templates. Placeholders should be a string with double brace delimiters, i.e. `\"{{NAME}}\"`. A placeholder can be used for any value within the JSON edit.
18
+ class MergeField
19
+ # The string to find <u>without</u> delimiters.
20
+ attr_accessor :find
21
+
22
+ # The replacement value. The replacement can be any valid JSON type - string, boolean, number, etc...
23
+ attr_accessor :replace
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'find' => :'find',
29
+ :'replace' => :'replace'
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
+ :'find' => :'String',
42
+ :'replace' => :'AnyType'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ :'replace'
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shotstack::MergeField` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shotstack::MergeField`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'find')
69
+ self.find = attributes[:'find']
70
+ end
71
+
72
+ if attributes.key?(:'replace')
73
+ self.replace = attributes[:'replace']
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ invalid_properties = Array.new
81
+ if @find.nil?
82
+ invalid_properties.push('invalid value for "find", find cannot be nil.')
83
+ end
84
+
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ return false if @find.nil?
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ find == o.find &&
101
+ replace == o.replace
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [find, replace].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ self.class.openapi_types.each_pair do |key, type|
129
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
130
+ self.send("#{key}=", nil)
131
+ elsif type =~ /\AArray<(.*)>/i
132
+ # check to ensure the input is an array given that the attribute
133
+ # is documented as an array but the input is not
134
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
135
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
136
+ end
137
+ elsif !attributes[self.class.attribute_map[key]].nil?
138
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
139
+ end
140
+ end
141
+
142
+ self
143
+ end
144
+
145
+ # Deserializes the data based on type
146
+ # @param string type Data type
147
+ # @param string value Value to be deserialized
148
+ # @return [Object] Deserialized data
149
+ def _deserialize(type, value)
150
+ case type.to_sym
151
+ when :Time
152
+ Time.parse(value)
153
+ when :Date
154
+ Date.parse(value)
155
+ when :String
156
+ value.to_s
157
+ when :Integer
158
+ value.to_i
159
+ when :Float
160
+ value.to_f
161
+ when :Boolean
162
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163
+ true
164
+ else
165
+ false
166
+ end
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ else # model
182
+ # models (e.g. Pet) or oneOf
183
+ klass = Shotstack.const_get(type)
184
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
+ end
186
+ end
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # to_body is an alias to to_hash (backward compatibility)
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #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
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
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #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
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
 
@@ -16,27 +16,38 @@ require 'time'
16
16
  module Shotstack
17
17
  # The output format, render range and type of media to generate.
18
18
  class Output
19
- # The output format and type of media file to generate. <ul> <li>`mp4` - mp4 video file</li> <li>`gif` - animated gif</li> <li>`mp3` - mp3 audio file (no video)</li> </ul>
19
+ # The output format and type of media file to generate. <ul> <li>`mp4` - mp4 video file</li> <li>`gif` - animated gif</li> <li>`jpg` - jpg image file</li> <li>`png` - png image file</li> <li>`bmp` - bmp image file</li> <li>`mp3` - mp3 audio file (audio only)</li> </ul>
20
20
  attr_accessor :format
21
21
 
22
- # The output resolution of the video. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @ 25fps</li> <li>`hd` - 1280px x 720px @ 25fps</li> <li>`1080` - 1920px x 1080px @ 25fps</li> </ul>
22
+ # The output resolution of the video or image. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @ 25fps</li> <li>`hd` - 1280px x 720px @ 25fps</li> <li>`1080` - 1920px x 1080px @ 25fps</li> </ul>
23
23
  attr_accessor :resolution
24
24
 
25
- # The aspect ratio (shape) of the video. Useful for social media video. Options are: <ul> <li>`16:9` - regular landscape/horizontal aspect ratio (default)</li> <li>`9:16` - vertical/portrait aspect ratio</li> <li>`1:1` - square aspect ratio</li> <li>`4:5` - short vertical/portrait aspect ratio</li> </ul>
25
+ # The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul> <li>`16:9` - regular landscape/horizontal aspect ratio (default)</li> <li>`9:16` - vertical/portrait aspect ratio</li> <li>`1:1` - square aspect ratio</li> <li>`4:5` - short vertical/portrait aspect ratio</li> <li>`4:3` - legacy TV aspect ratio</li> </ul>
26
26
  attr_accessor :aspect_ratio
27
27
 
28
- # Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`25` - 25fps</li> <li>`30` - 30fps</li> </ul>
28
+ attr_accessor :size
29
+
30
+ # Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul> <li>`12` - 12fps</li> <li>`15` - 15fps</li> <li>`24` - 24fps</li> <li>`25` - 25fps</li> <li>`30` - 30fps</li> </ul>
29
31
  attr_accessor :fps
30
32
 
31
- # Override the resolution and scale the video to render at a different size. When using scaleTo the video should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the video at SD and the text will be scaled to the correct size. This is useful if you want to create multiple video sizes. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @25fps</li> <li>`hd` - 1280px x 720px @25fps</li> <li>`1080` - 1920px x 1080px @25fps</li> </ul>
33
+ # Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes. <ul> <li>`preview` - 512px x 288px @ 15fps</li> <li>`mobile` - 640px x 360px @ 25fps</li> <li>`sd` - 1024px x 576px @25fps</li> <li>`hd` - 1280px x 720px @25fps</li> <li>`1080` - 1920px x 1080px @25fps</li> </ul>
32
34
  attr_accessor :scale_to
33
35
 
36
+ # Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul> <li>`low` - slightly reduced quality, smaller file size</li> <li>`medium` - optimized quality, render speeds and file size</li> <li>`high` - slightly increased quality, larger file size</li> </ul>
37
+ attr_accessor :quality
38
+
39
+ # Loop settings for gif files. Set to `true` to loop, `false` to play only once.
40
+ attr_accessor :repeat
41
+
34
42
  attr_accessor :range
35
43
 
36
44
  attr_accessor :poster
37
45
 
38
46
  attr_accessor :thumbnail
39
47
 
48
+ # A destination is a location where output files can be sent to for serving or hosting. By default all rendered assets are automatically sent to the Shotstack hosting destination. [DestinationShotstack](/#tocs_shotstackdestination) is currently the only option with plans to add more in the future such as S3, YouTube, Vimeo and Mux. If you do not require hosting you can opt-out using the `exclude` property.
49
+ attr_accessor :destinations
50
+
40
51
  class EnumAttributeValidator
41
52
  attr_reader :datatype
42
53
  attr_reader :allowable_values
@@ -65,11 +76,15 @@ module Shotstack
65
76
  :'format' => :'format',
66
77
  :'resolution' => :'resolution',
67
78
  :'aspect_ratio' => :'aspectRatio',
79
+ :'size' => :'size',
68
80
  :'fps' => :'fps',
69
81
  :'scale_to' => :'scaleTo',
82
+ :'quality' => :'quality',
83
+ :'repeat' => :'repeat',
70
84
  :'range' => :'range',
71
85
  :'poster' => :'poster',
72
- :'thumbnail' => :'thumbnail'
86
+ :'thumbnail' => :'thumbnail',
87
+ :'destinations' => :'destinations'
73
88
  }
74
89
  end
75
90
 
@@ -84,11 +99,15 @@ module Shotstack
84
99
  :'format' => :'String',
85
100
  :'resolution' => :'String',
86
101
  :'aspect_ratio' => :'String',
102
+ :'size' => :'Size',
87
103
  :'fps' => :'Integer',
88
104
  :'scale_to' => :'String',
105
+ :'quality' => :'String',
106
+ :'repeat' => :'Boolean',
89
107
  :'range' => :'Range',
90
108
  :'poster' => :'Poster',
91
- :'thumbnail' => :'Thumbnail'
109
+ :'thumbnail' => :'Thumbnail',
110
+ :'destinations' => :'Array<Destinations>'
92
111
  }
93
112
  end
94
113
 
@@ -125,6 +144,10 @@ module Shotstack
125
144
  self.aspect_ratio = attributes[:'aspect_ratio']
126
145
  end
127
146
 
147
+ if attributes.key?(:'size')
148
+ self.size = attributes[:'size']
149
+ end
150
+
128
151
  if attributes.key?(:'fps')
129
152
  self.fps = attributes[:'fps']
130
153
  else
@@ -135,6 +158,18 @@ module Shotstack
135
158
  self.scale_to = attributes[:'scale_to']
136
159
  end
137
160
 
161
+ if attributes.key?(:'quality')
162
+ self.quality = attributes[:'quality']
163
+ else
164
+ self.quality = 'medium'
165
+ end
166
+
167
+ if attributes.key?(:'repeat')
168
+ self.repeat = attributes[:'repeat']
169
+ else
170
+ self.repeat = true
171
+ end
172
+
138
173
  if attributes.key?(:'range')
139
174
  self.range = attributes[:'range']
140
175
  end
@@ -146,6 +181,12 @@ module Shotstack
146
181
  if attributes.key?(:'thumbnail')
147
182
  self.thumbnail = attributes[:'thumbnail']
148
183
  end
184
+
185
+ if attributes.key?(:'destinations')
186
+ if (value = attributes[:'destinations']).is_a?(Array)
187
+ self.destinations = value
188
+ end
189
+ end
149
190
  end
150
191
 
151
192
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -156,10 +197,6 @@ module Shotstack
156
197
  invalid_properties.push('invalid value for "format", format cannot be nil.')
157
198
  end
158
199
 
159
- if @resolution.nil?
160
- invalid_properties.push('invalid value for "resolution", resolution cannot be nil.')
161
- end
162
-
163
200
  invalid_properties
164
201
  end
165
202
 
@@ -167,24 +204,25 @@ module Shotstack
167
204
  # @return true if the model is valid
168
205
  def valid?
169
206
  return false if @format.nil?
170
- format_validator = EnumAttributeValidator.new('String', ["mp4", "gif", "mp3"])
207
+ format_validator = EnumAttributeValidator.new('String', ["mp4", "gif", "mp3", "jpg", "png", "bmp"])
171
208
  return false unless format_validator.valid?(@format)
172
- return false if @resolution.nil?
173
209
  resolution_validator = EnumAttributeValidator.new('String', ["preview", "mobile", "sd", "hd", "1080"])
174
210
  return false unless resolution_validator.valid?(@resolution)
175
- aspect_ratio_validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5"])
211
+ aspect_ratio_validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5", "4:3"])
176
212
  return false unless aspect_ratio_validator.valid?(@aspect_ratio)
177
213
  fps_validator = EnumAttributeValidator.new('Integer', [12, 15, 24, 25, 30])
178
214
  return false unless fps_validator.valid?(@fps)
179
215
  scale_to_validator = EnumAttributeValidator.new('String', ["preview", "mobile", "sd", "hd", "1080"])
180
216
  return false unless scale_to_validator.valid?(@scale_to)
217
+ quality_validator = EnumAttributeValidator.new('String', ["low", "medium", "high"])
218
+ return false unless quality_validator.valid?(@quality)
181
219
  true
182
220
  end
183
221
 
184
222
  # Custom attribute writer method checking allowed values (enum).
185
223
  # @param [Object] format Object to be assigned
186
224
  def format=(format)
187
- validator = EnumAttributeValidator.new('String', ["mp4", "gif", "mp3"])
225
+ validator = EnumAttributeValidator.new('String', ["mp4", "gif", "mp3", "jpg", "png", "bmp"])
188
226
  unless validator.valid?(format)
189
227
  fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
190
228
  end
@@ -204,7 +242,7 @@ module Shotstack
204
242
  # Custom attribute writer method checking allowed values (enum).
205
243
  # @param [Object] aspect_ratio Object to be assigned
206
244
  def aspect_ratio=(aspect_ratio)
207
- validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5"])
245
+ validator = EnumAttributeValidator.new('String', ["16:9", "9:16", "1:1", "4:5", "4:3"])
208
246
  unless validator.valid?(aspect_ratio)
209
247
  fail ArgumentError, "invalid value for \"aspect_ratio\", must be one of #{validator.allowable_values}."
210
248
  end
@@ -231,6 +269,16 @@ module Shotstack
231
269
  @scale_to = scale_to
232
270
  end
233
271
 
272
+ # Custom attribute writer method checking allowed values (enum).
273
+ # @param [Object] quality Object to be assigned
274
+ def quality=(quality)
275
+ validator = EnumAttributeValidator.new('String', ["low", "medium", "high"])
276
+ unless validator.valid?(quality)
277
+ fail ArgumentError, "invalid value for \"quality\", must be one of #{validator.allowable_values}."
278
+ end
279
+ @quality = quality
280
+ end
281
+
234
282
  # Checks equality by comparing each attribute.
235
283
  # @param [Object] Object to be compared
236
284
  def ==(o)
@@ -239,11 +287,15 @@ module Shotstack
239
287
  format == o.format &&
240
288
  resolution == o.resolution &&
241
289
  aspect_ratio == o.aspect_ratio &&
290
+ size == o.size &&
242
291
  fps == o.fps &&
243
292
  scale_to == o.scale_to &&
293
+ quality == o.quality &&
294
+ repeat == o.repeat &&
244
295
  range == o.range &&
245
296
  poster == o.poster &&
246
- thumbnail == o.thumbnail
297
+ thumbnail == o.thumbnail &&
298
+ destinations == o.destinations
247
299
  end
248
300
 
249
301
  # @see the `==` method
@@ -255,7 +307,7 @@ module Shotstack
255
307
  # Calculates hash code according to all attributes.
256
308
  # @return [Integer] Hash code
257
309
  def hash
258
- [format, resolution, aspect_ratio, fps, scale_to, range, poster, thumbnail].hash
310
+ [format, resolution, aspect_ratio, size, fps, scale_to, quality, repeat, range, poster, thumbnail, destinations].hash
259
311
  end
260
312
 
261
313
  # Builds the object from hash
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #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
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