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
|
@@ -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
|
|
|
@@ -67,12 +67,17 @@ module Shotstack
|
|
|
67
67
|
# @return Array for valid properties with the reasons
|
|
68
68
|
def list_invalid_properties
|
|
69
69
|
invalid_properties = Array.new
|
|
70
|
+
if @data.nil?
|
|
71
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
72
|
+
end
|
|
73
|
+
|
|
70
74
|
invalid_properties
|
|
71
75
|
end
|
|
72
76
|
|
|
73
77
|
# Check to see if the all the properties in the model are valid
|
|
74
78
|
# @return true if the model is valid
|
|
75
79
|
def valid?
|
|
80
|
+
return false if @data.nil?
|
|
76
81
|
true
|
|
77
82
|
end
|
|
78
83
|
|
|
@@ -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
|
|
|
@@ -28,6 +28,9 @@ module Shotstack
|
|
|
28
28
|
# The original render id that created the asset in UUID format. Multiple assets can share the same render id.
|
|
29
29
|
attr_accessor :render_id
|
|
30
30
|
|
|
31
|
+
# The third party id of an asset transferred to an external provider, i.e. Mux, YouTube or S3. If the provider is Shotstack, the providerID is the same as the asset id.
|
|
32
|
+
attr_accessor :provider_id
|
|
33
|
+
|
|
31
34
|
# The asset file name.
|
|
32
35
|
attr_accessor :filename
|
|
33
36
|
|
|
@@ -72,6 +75,7 @@ module Shotstack
|
|
|
72
75
|
:'owner' => :'owner',
|
|
73
76
|
:'region' => :'region',
|
|
74
77
|
:'render_id' => :'renderId',
|
|
78
|
+
:'provider_id' => :'providerId',
|
|
75
79
|
:'filename' => :'filename',
|
|
76
80
|
:'url' => :'url',
|
|
77
81
|
:'status' => :'status',
|
|
@@ -92,6 +96,7 @@ module Shotstack
|
|
|
92
96
|
:'owner' => :'String',
|
|
93
97
|
:'region' => :'String',
|
|
94
98
|
:'render_id' => :'String',
|
|
99
|
+
:'provider_id' => :'String',
|
|
95
100
|
:'filename' => :'String',
|
|
96
101
|
:'url' => :'String',
|
|
97
102
|
:'status' => :'String',
|
|
@@ -137,6 +142,10 @@ module Shotstack
|
|
|
137
142
|
self.render_id = attributes[:'render_id']
|
|
138
143
|
end
|
|
139
144
|
|
|
145
|
+
if attributes.key?(:'provider_id')
|
|
146
|
+
self.provider_id = attributes[:'provider_id']
|
|
147
|
+
end
|
|
148
|
+
|
|
140
149
|
if attributes.key?(:'filename')
|
|
141
150
|
self.filename = attributes[:'filename']
|
|
142
151
|
end
|
|
@@ -162,12 +171,27 @@ module Shotstack
|
|
|
162
171
|
# @return Array for valid properties with the reasons
|
|
163
172
|
def list_invalid_properties
|
|
164
173
|
invalid_properties = Array.new
|
|
174
|
+
if @id.nil?
|
|
175
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if @owner.nil?
|
|
179
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if @status.nil?
|
|
183
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
184
|
+
end
|
|
185
|
+
|
|
165
186
|
invalid_properties
|
|
166
187
|
end
|
|
167
188
|
|
|
168
189
|
# Check to see if the all the properties in the model are valid
|
|
169
190
|
# @return true if the model is valid
|
|
170
191
|
def valid?
|
|
192
|
+
return false if @id.nil?
|
|
193
|
+
return false if @owner.nil?
|
|
194
|
+
return false if @status.nil?
|
|
171
195
|
status_validator = EnumAttributeValidator.new('String', ["importing", "ready", "failed", "deleted"])
|
|
172
196
|
return false unless status_validator.valid?(@status)
|
|
173
197
|
true
|
|
@@ -192,6 +216,7 @@ module Shotstack
|
|
|
192
216
|
owner == o.owner &&
|
|
193
217
|
region == o.region &&
|
|
194
218
|
render_id == o.render_id &&
|
|
219
|
+
provider_id == o.provider_id &&
|
|
195
220
|
filename == o.filename &&
|
|
196
221
|
url == o.url &&
|
|
197
222
|
status == o.status &&
|
|
@@ -208,7 +233,7 @@ module Shotstack
|
|
|
208
233
|
# Calculates hash code according to all attributes.
|
|
209
234
|
# @return [Integer] Hash code
|
|
210
235
|
def hash
|
|
211
|
-
[id, owner, region, render_id, filename, url, status, created, updated].hash
|
|
236
|
+
[id, owner, region, render_id, provider_id, filename, url, status, created, updated].hash
|
|
212
237
|
end
|
|
213
238
|
|
|
214
239
|
# Builds the object from hash
|
|
@@ -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
|
|
|
@@ -76,12 +76,22 @@ module Shotstack
|
|
|
76
76
|
# @return Array for valid properties with the reasons
|
|
77
77
|
def list_invalid_properties
|
|
78
78
|
invalid_properties = Array.new
|
|
79
|
+
if @type.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if @attributes.nil?
|
|
84
|
+
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
|
85
|
+
end
|
|
86
|
+
|
|
79
87
|
invalid_properties
|
|
80
88
|
end
|
|
81
89
|
|
|
82
90
|
# Check to see if the all the properties in the model are valid
|
|
83
91
|
# @return true if the model is valid
|
|
84
92
|
def valid?
|
|
93
|
+
return false if @type.nil?
|
|
94
|
+
return false if @attributes.nil?
|
|
85
95
|
true
|
|
86
96
|
end
|
|
87
97
|
|
|
@@ -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
|
|
|
@@ -117,8 +117,6 @@ module Shotstack
|
|
|
117
117
|
|
|
118
118
|
if attributes.key?(:'volume')
|
|
119
119
|
self.volume = attributes[:'volume']
|
|
120
|
-
else
|
|
121
|
-
self.volume = 1
|
|
122
120
|
end
|
|
123
121
|
|
|
124
122
|
if attributes.key?(:'effect')
|
|
@@ -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
|
|
|
@@ -24,7 +24,7 @@ module Shotstack
|
|
|
24
24
|
# The length, in seconds, the Clip should play for.
|
|
25
25
|
attr_accessor :length
|
|
26
26
|
|
|
27
|
-
# Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`
|
|
27
|
+
# Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`crop` <b>(default)</b> - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>
|
|
28
28
|
attr_accessor :fit
|
|
29
29
|
|
|
30
30
|
# Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks.
|
|
@@ -37,10 +37,10 @@ module Shotstack
|
|
|
37
37
|
|
|
38
38
|
attr_accessor :transition
|
|
39
39
|
|
|
40
|
-
# A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul>
|
|
40
|
+
# A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul> The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`.
|
|
41
41
|
attr_accessor :effect
|
|
42
42
|
|
|
43
|
-
# A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`
|
|
43
|
+
# A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`negative` - negative colors</li> </ul>
|
|
44
44
|
attr_accessor :filter
|
|
45
45
|
|
|
46
46
|
# Sets the opacity of the Clip where 1 is opaque and 0 is transparent.
|
|
@@ -146,8 +146,6 @@ module Shotstack
|
|
|
146
146
|
|
|
147
147
|
if attributes.key?(:'fit')
|
|
148
148
|
self.fit = attributes[:'fit']
|
|
149
|
-
else
|
|
150
|
-
self.fit = 'crop'
|
|
151
149
|
end
|
|
152
150
|
|
|
153
151
|
if attributes.key?(:'scale')
|
|
@@ -156,8 +154,6 @@ module Shotstack
|
|
|
156
154
|
|
|
157
155
|
if attributes.key?(:'position')
|
|
158
156
|
self.position = attributes[:'position']
|
|
159
|
-
else
|
|
160
|
-
self.position = 'center'
|
|
161
157
|
end
|
|
162
158
|
|
|
163
159
|
if attributes.key?(:'offset')
|
|
@@ -178,8 +174,6 @@ module Shotstack
|
|
|
178
174
|
|
|
179
175
|
if attributes.key?(:'opacity')
|
|
180
176
|
self.opacity = attributes[:'opacity']
|
|
181
|
-
else
|
|
182
|
-
self.opacity = 1
|
|
183
177
|
end
|
|
184
178
|
|
|
185
179
|
if attributes.key?(:'transform')
|
|
@@ -216,7 +210,7 @@ module Shotstack
|
|
|
216
210
|
return false unless fit_validator.valid?(@fit)
|
|
217
211
|
position_validator = EnumAttributeValidator.new('String', ["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"])
|
|
218
212
|
return false unless position_validator.valid?(@position)
|
|
219
|
-
effect_validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomOut", "slideLeft", "slideRight", "slideUp", "slideDown"])
|
|
213
|
+
effect_validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomInSlow", "zoomInFast", "zoomOut", "zoomOutSlow", "zoomOutFast", "slideLeft", "slideLeftSLow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast"])
|
|
220
214
|
return false unless effect_validator.valid?(@effect)
|
|
221
215
|
filter_validator = EnumAttributeValidator.new('String', ["boost", "contrast", "darken", "greyscale", "lighten", "muted", "negative"])
|
|
222
216
|
return false unless filter_validator.valid?(@filter)
|
|
@@ -246,7 +240,7 @@ module Shotstack
|
|
|
246
240
|
# Custom attribute writer method checking allowed values (enum).
|
|
247
241
|
# @param [Object] effect Object to be assigned
|
|
248
242
|
def effect=(effect)
|
|
249
|
-
validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomOut", "slideLeft", "slideRight", "slideUp", "slideDown"])
|
|
243
|
+
validator = EnumAttributeValidator.new('String', ["zoomIn", "zoomInSlow", "zoomInFast", "zoomOut", "zoomOutSlow", "zoomOutFast", "slideLeft", "slideLeftSLow", "slideLeftFast", "slideRight", "slideRightSlow", "slideRightFast", "slideUp", "slideUpSlow", "slideUpFast", "slideDown", "slideDownSlow", "slideDownFast"])
|
|
250
244
|
unless validator.valid?(effect)
|
|
251
245
|
fail ArgumentError, "invalid value for \"effect\", must be one of #{validator.allowable_values}."
|
|
252
246
|
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
|
|
|
@@ -14,12 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Shotstack
|
|
17
|
-
# 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](https://shotstack.io/docs/guide/serving-assets/hosting). You can add other destinations to send assets to. The following destinations are available:
|
|
17
|
+
# 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](https://shotstack.io/docs/guide/serving-assets/hosting). You can add other destinations to send assets to. The following destinations are available: <ul> <li><a href=\"#tocs_shotstackdestination\">ShotstackDestination</a></li> <li><a href=\"#tocs_muxdestination\">MuxDestination</a></li> <li><a href=\"#tocs_s3destination\">S3Destination</a></li> </ul>
|
|
18
18
|
class Destinations
|
|
19
|
-
# The destination to send rendered assets to - set to `
|
|
19
|
+
# The destination to send rendered assets to - set to `s3` for S3.
|
|
20
20
|
attr_accessor :provider
|
|
21
21
|
|
|
22
|
-
# Set to `true` to opt-out from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.
|
|
22
|
+
# Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.
|
|
23
23
|
attr_accessor :exclude
|
|
24
24
|
|
|
25
25
|
attr_accessor :options
|
|
@@ -43,7 +43,7 @@ module Shotstack
|
|
|
43
43
|
{
|
|
44
44
|
:'provider' => :'String',
|
|
45
45
|
:'exclude' => :'Boolean',
|
|
46
|
-
:'options' => :'
|
|
46
|
+
:'options' => :'S3DestinationOptions'
|
|
47
47
|
}
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -57,6 +57,7 @@ module Shotstack
|
|
|
57
57
|
def self.openapi_any_of
|
|
58
58
|
[
|
|
59
59
|
:'MuxDestination',
|
|
60
|
+
:'S3Destination',
|
|
60
61
|
:'ShotstackDestination'
|
|
61
62
|
]
|
|
62
63
|
end
|
|
@@ -84,13 +85,11 @@ module Shotstack
|
|
|
84
85
|
if attributes.key?(:'provider')
|
|
85
86
|
self.provider = attributes[:'provider']
|
|
86
87
|
else
|
|
87
|
-
self.provider = '
|
|
88
|
+
self.provider = 's3'
|
|
88
89
|
end
|
|
89
90
|
|
|
90
91
|
if attributes.key?(:'exclude')
|
|
91
92
|
self.exclude = attributes[:'exclude']
|
|
92
|
-
else
|
|
93
|
-
self.exclude = false
|
|
94
93
|
end
|
|
95
94
|
|
|
96
95
|
if attributes.key?(:'options')
|
|
@@ -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
|
|
|
@@ -26,7 +26,7 @@ module Shotstack
|
|
|
26
26
|
# An optional webhook callback URL used to receive status notifications when a render completes or fails. See [webhooks](https://shotstack.io/docs/guide/architecting-an-application/webhooks) for more details.
|
|
27
27
|
attr_accessor :callback
|
|
28
28
|
|
|
29
|
-
# The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types) for more details. <ul> <li>`local` - optimized for high speed rendering with up to 512MB storage</li> <li>`mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render</li> </ul>
|
|
29
|
+
# **Notice: This option is now deprecated and will be removed. Disk types are handled automatically. Setting a disk type has no effect.** The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.io/docs/guide/architecting-an-application/disk-types) for more details. <ul> <li>`local` - optimized for high speed rendering with up to 512MB storage</li> <li>`mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render</li> </ul>
|
|
30
30
|
attr_accessor :disk
|
|
31
31
|
|
|
32
32
|
class EnumAttributeValidator
|
|
@@ -119,8 +119,6 @@ module Shotstack
|
|
|
119
119
|
|
|
120
120
|
if attributes.key?(:'disk')
|
|
121
121
|
self.disk = attributes[:'disk']
|
|
122
|
-
else
|
|
123
|
-
self.disk = 'local'
|
|
124
122
|
end
|
|
125
123
|
end
|
|
126
124
|
|
|
@@ -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
|
|
|
@@ -66,14 +66,10 @@ module Shotstack
|
|
|
66
66
|
|
|
67
67
|
if attributes.key?(:'horizontal')
|
|
68
68
|
self.horizontal = attributes[:'horizontal']
|
|
69
|
-
else
|
|
70
|
-
self.horizontal = false
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
if attributes.key?(:'vertical')
|
|
74
72
|
self.vertical = attributes[:'vertical']
|
|
75
|
-
else
|
|
76
|
-
self.vertical = false
|
|
77
73
|
end
|
|
78
74
|
end
|
|
79
75
|
|
|
@@ -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
|
|
|
@@ -135,14 +135,10 @@ module Shotstack
|
|
|
135
135
|
|
|
136
136
|
if attributes.key?(:'background')
|
|
137
137
|
self.background = attributes[:'background']
|
|
138
|
-
else
|
|
139
|
-
self.background = 'transparent'
|
|
140
138
|
end
|
|
141
139
|
|
|
142
140
|
if attributes.key?(:'position')
|
|
143
141
|
self.position = attributes[:'position']
|
|
144
|
-
else
|
|
145
|
-
self.position = 'center'
|
|
146
142
|
end
|
|
147
143
|
end
|
|
148
144
|
|
|
@@ -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
|
|
|
@@ -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
|
-
# Send rendered videos to the [Mux](https://
|
|
17
|
+
# Send rendered videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
|
|
18
18
|
class MuxDestination
|
|
19
19
|
# The destination to send rendered assets to - set to `mux` for Mux.
|
|
20
20
|
attr_accessor :provider
|
|
@@ -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
|
|
|
@@ -16,10 +16,10 @@ require 'time'
|
|
|
16
16
|
module Shotstack
|
|
17
17
|
# Offsets the position of an asset horizontally or vertically by a relative distance.
|
|
18
18
|
class Offset
|
|
19
|
-
# Offset an asset on the horizontal axis (left or right), range varies from -
|
|
19
|
+
# Offset an asset on the horizontal axis (left or right), range varies from -10 to 10. Positive numbers move the asset right, negative left. For all assets except titles the distance moved is relative to the width of the viewport - i.e. an X offset of 0.5 will move the asset half the screen width to the right.
|
|
20
20
|
attr_accessor :x
|
|
21
21
|
|
|
22
|
-
# Offset an asset on the vertical axis (up or down), range varies from -
|
|
22
|
+
# Offset an asset on the vertical axis (up or down), range varies from -10 to 10. Positive numbers move the asset up, negative down. For all assets except titles the distance moved is relative to the height of the viewport - i.e. an Y offset of 0.5 will move the asset up half the screen height.
|
|
23
23
|
attr_accessor :y
|
|
24
24
|
|
|
25
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -66,14 +66,10 @@ module Shotstack
|
|
|
66
66
|
|
|
67
67
|
if attributes.key?(:'x')
|
|
68
68
|
self.x = attributes[:'x']
|
|
69
|
-
else
|
|
70
|
-
self.x = 0
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
if attributes.key?(:'y')
|
|
74
72
|
self.y = attributes[:'y']
|
|
75
|
-
else
|
|
76
|
-
self.y = 0
|
|
77
73
|
end
|
|
78
74
|
end
|
|
79
75
|
|
|
@@ -81,20 +77,20 @@ module Shotstack
|
|
|
81
77
|
# @return Array for valid properties with the reasons
|
|
82
78
|
def list_invalid_properties
|
|
83
79
|
invalid_properties = Array.new
|
|
84
|
-
if !@x.nil? && @x >
|
|
85
|
-
invalid_properties.push('invalid value for "x", must be smaller than or equal to
|
|
80
|
+
if !@x.nil? && @x > 10
|
|
81
|
+
invalid_properties.push('invalid value for "x", must be smaller than or equal to 10.')
|
|
86
82
|
end
|
|
87
83
|
|
|
88
|
-
if !@x.nil? && @x < -
|
|
89
|
-
invalid_properties.push('invalid value for "x", must be greater than or equal to -
|
|
84
|
+
if !@x.nil? && @x < -10
|
|
85
|
+
invalid_properties.push('invalid value for "x", must be greater than or equal to -10.')
|
|
90
86
|
end
|
|
91
87
|
|
|
92
|
-
if !@y.nil? && @y >
|
|
93
|
-
invalid_properties.push('invalid value for "y", must be smaller than or equal to
|
|
88
|
+
if !@y.nil? && @y > 10
|
|
89
|
+
invalid_properties.push('invalid value for "y", must be smaller than or equal to 10.')
|
|
94
90
|
end
|
|
95
91
|
|
|
96
|
-
if !@y.nil? && @y < -
|
|
97
|
-
invalid_properties.push('invalid value for "y", must be greater than or equal to -
|
|
92
|
+
if !@y.nil? && @y < -10
|
|
93
|
+
invalid_properties.push('invalid value for "y", must be greater than or equal to -10.')
|
|
98
94
|
end
|
|
99
95
|
|
|
100
96
|
invalid_properties
|
|
@@ -103,22 +99,22 @@ module Shotstack
|
|
|
103
99
|
# Check to see if the all the properties in the model are valid
|
|
104
100
|
# @return true if the model is valid
|
|
105
101
|
def valid?
|
|
106
|
-
return false if !@x.nil? && @x >
|
|
107
|
-
return false if !@x.nil? && @x < -
|
|
108
|
-
return false if !@y.nil? && @y >
|
|
109
|
-
return false if !@y.nil? && @y < -
|
|
102
|
+
return false if !@x.nil? && @x > 10
|
|
103
|
+
return false if !@x.nil? && @x < -10
|
|
104
|
+
return false if !@y.nil? && @y > 10
|
|
105
|
+
return false if !@y.nil? && @y < -10
|
|
110
106
|
true
|
|
111
107
|
end
|
|
112
108
|
|
|
113
109
|
# Custom attribute writer method with validation
|
|
114
110
|
# @param [Object] x Value to be assigned
|
|
115
111
|
def x=(x)
|
|
116
|
-
if !x.nil? && x >
|
|
117
|
-
fail ArgumentError, 'invalid value for "x", must be smaller than or equal to
|
|
112
|
+
if !x.nil? && x > 10
|
|
113
|
+
fail ArgumentError, 'invalid value for "x", must be smaller than or equal to 10.'
|
|
118
114
|
end
|
|
119
115
|
|
|
120
|
-
if !x.nil? && x < -
|
|
121
|
-
fail ArgumentError, 'invalid value for "x", must be greater than or equal to -
|
|
116
|
+
if !x.nil? && x < -10
|
|
117
|
+
fail ArgumentError, 'invalid value for "x", must be greater than or equal to -10.'
|
|
122
118
|
end
|
|
123
119
|
|
|
124
120
|
@x = x
|
|
@@ -127,12 +123,12 @@ module Shotstack
|
|
|
127
123
|
# Custom attribute writer method with validation
|
|
128
124
|
# @param [Object] y Value to be assigned
|
|
129
125
|
def y=(y)
|
|
130
|
-
if !y.nil? && y >
|
|
131
|
-
fail ArgumentError, 'invalid value for "y", must be smaller than or equal to
|
|
126
|
+
if !y.nil? && y > 10
|
|
127
|
+
fail ArgumentError, 'invalid value for "y", must be smaller than or equal to 10.'
|
|
132
128
|
end
|
|
133
129
|
|
|
134
|
-
if !y.nil? && y < -
|
|
135
|
-
fail ArgumentError, 'invalid value for "y", must be greater than or equal to -
|
|
130
|
+
if !y.nil? && y < -10
|
|
131
|
+
fail ArgumentError, 'invalid value for "y", must be greater than or equal to -10.'
|
|
136
132
|
end
|
|
137
133
|
|
|
138
134
|
@y = y
|