shotstack 0.1.7 → 0.1.10

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/README.md +1099 -11
  3. data/lib/shotstack/api/edit_api.rb +227 -0
  4. data/lib/shotstack/api/serve_api.rb +224 -0
  5. data/lib/shotstack/api_client.rb +4 -4
  6. data/lib/shotstack/api_error.rb +2 -2
  7. data/lib/shotstack/configuration.rb +24 -7
  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 +2 -2
  13. data/lib/shotstack/models/clip.rb +16 -7
  14. data/lib/shotstack/models/crop.rb +2 -2
  15. data/lib/shotstack/models/destinations.rb +17 -0
  16. data/lib/shotstack/models/edit.rb +17 -5
  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 +2 -2
  20. data/lib/shotstack/models/image_asset.rb +3 -3
  21. data/lib/shotstack/models/luma_asset.rb +5 -5
  22. data/lib/shotstack/models/merge_field.rb +236 -0
  23. data/lib/shotstack/models/offset.rb +2 -2
  24. data/lib/shotstack/models/output.rb +74 -22
  25. data/lib/shotstack/models/poster.rb +2 -2
  26. data/lib/shotstack/models/probe_response.rb +255 -0
  27. data/lib/shotstack/models/queued_response.rb +3 -2
  28. data/lib/shotstack/models/queued_response_data.rb +3 -2
  29. data/lib/shotstack/models/range.rb +4 -4
  30. data/lib/shotstack/models/render_response.rb +3 -2
  31. data/lib/shotstack/models/render_response_data.rb +7 -6
  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 +2 -2
  37. data/lib/shotstack/models/thumbnail.rb +3 -3
  38. data/lib/shotstack/models/timeline.rb +3 -3
  39. data/lib/shotstack/models/title_asset.rb +2 -2
  40. data/lib/shotstack/models/track.rb +2 -2
  41. data/lib/shotstack/models/transformation.rb +237 -0
  42. data/lib/shotstack/models/transition.rb +8 -8
  43. data/lib/shotstack/models/video_asset.rb +2 -2
  44. data/lib/shotstack/version.rb +3 -3
  45. data/lib/shotstack.rb +16 -2
  46. data/shotstack.gemspec +3 -3
  47. metadata +32 -15
@@ -0,0 +1,227 @@
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.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Shotstack
16
+ class EditApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get Render Status
23
+ # Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/{version}
24
+ # @param id [String] The id of the timeline render task in UUID format
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :data Include the data parameter in the response. The data parameter includes the original timeline, output and other settings sent to the API.&lt;br&gt;&lt;br&gt;&lt;b&gt;Note:&lt;/b&gt; the default is currently &#x60;true&#x60;, this is deprecated and the default will soon be &#x60;false&#x60;. If you rely on the data being returned in the response you should explicitly set the parameter to &#x60;true&#x60;.
27
+ # @option opts [Boolean] :merged Used when data is set to true, it will show the [merge fields](#tocs_mergefield) merged in to the data response.
28
+ # @return [RenderResponse]
29
+ def get_render(id, opts = {})
30
+ data, _status_code, _headers = get_render_with_http_info(id, opts)
31
+ data
32
+ end
33
+
34
+ # Get Render Status
35
+ # Get the rendering status, temporary asset url and details of a render by ID. **Base URL:** https://api.shotstack.io/{version}
36
+ # @param id [String] The id of the timeline render task in UUID format
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Boolean] :data Include the data parameter in the response. The data parameter includes the original timeline, output and other settings sent to the API.&lt;br&gt;&lt;br&gt;&lt;b&gt;Note:&lt;/b&gt; the default is currently &#x60;true&#x60;, this is deprecated and the default will soon be &#x60;false&#x60;. If you rely on the data being returned in the response you should explicitly set the parameter to &#x60;true&#x60;.
39
+ # @option opts [Boolean] :merged Used when data is set to true, it will show the [merge fields](#tocs_mergefield) merged in to the data response.
40
+ # @return [Array<(RenderResponse, Integer, Hash)>] RenderResponse data, response status code and response headers
41
+ def get_render_with_http_info(id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: EditApi.get_render ...'
44
+ end
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling EditApi.get_render"
48
+ end
49
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
50
+ if @api_client.config.client_side_validation && id !~ pattern
51
+ fail ArgumentError, "invalid value for 'id' when calling EditApi.get_render, must conform to the pattern #{pattern}."
52
+ end
53
+
54
+ # resource path
55
+ local_var_path = '/render/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
56
+
57
+ # query parameters
58
+ query_params = opts[:query_params] || {}
59
+ query_params[:'data'] = opts[:'data'] if !opts[:'data'].nil?
60
+ query_params[:'merged'] = opts[:'merged'] if !opts[:'merged'].nil?
61
+
62
+ # header parameters
63
+ header_params = opts[:header_params] || {}
64
+ # HTTP header 'Accept' (if needed)
65
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body]
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'RenderResponse'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"EditApi.get_render",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: EditApi#get_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Render Asset
97
+ # Queue and render the contents of a timeline as a video, image or audio file. **Base URL:** https://api.shotstack.io/{version}
98
+ # @param edit [Edit] The video, image or audio edit specified using JSON.
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [QueuedResponse]
101
+ def post_render(edit, opts = {})
102
+ data, _status_code, _headers = post_render_with_http_info(edit, opts)
103
+ data
104
+ end
105
+
106
+ # Render Asset
107
+ # Queue and render the contents of a timeline as a video, image or audio file. **Base URL:** https://api.shotstack.io/{version}
108
+ # @param edit [Edit] The video, image or audio edit specified using JSON.
109
+ # @param [Hash] opts the optional parameters
110
+ # @return [Array<(QueuedResponse, Integer, Hash)>] QueuedResponse data, response status code and response headers
111
+ def post_render_with_http_info(edit, opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug 'Calling API: EditApi.post_render ...'
114
+ end
115
+ # verify the required parameter 'edit' is set
116
+ if @api_client.config.client_side_validation && edit.nil?
117
+ fail ArgumentError, "Missing the required parameter 'edit' when calling EditApi.post_render"
118
+ end
119
+ # resource path
120
+ local_var_path = '/render'
121
+
122
+ # query parameters
123
+ query_params = opts[:query_params] || {}
124
+
125
+ # header parameters
126
+ header_params = opts[:header_params] || {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
129
+ # HTTP header 'Content-Type'
130
+ content_type = @api_client.select_header_content_type(['application/json'])
131
+ if !content_type.nil?
132
+ header_params['Content-Type'] = content_type
133
+ end
134
+
135
+ # form parameters
136
+ form_params = opts[:form_params] || {}
137
+
138
+ # http body (model)
139
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(edit)
140
+
141
+ # return_type
142
+ return_type = opts[:debug_return_type] || 'QueuedResponse'
143
+
144
+ # auth_names
145
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
146
+
147
+ new_options = opts.merge(
148
+ :operation => :"EditApi.post_render",
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => return_type
155
+ )
156
+
157
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug "API called: EditApi#post_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
160
+ end
161
+ return data, status_code, headers
162
+ end
163
+
164
+ # Inspect Media
165
+ # Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/{version}
166
+ # @param url [String] The URL of the media to inspect, must be **URL encoded**.
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [ProbeResponse]
169
+ def probe(url, opts = {})
170
+ data, _status_code, _headers = probe_with_http_info(url, opts)
171
+ data
172
+ end
173
+
174
+ # Inspect Media
175
+ # Inspects any media asset (image, video, audio) on the internet using a hosted version of [FFprobe](https://ffmpeg.org/ffprobe.html). The probe endpoint returns useful information about an asset such as width, height, duration, rotation, framerate, etc... **Base URL:** https://api.shotstack.io/{version}
176
+ # @param url [String] The URL of the media to inspect, must be **URL encoded**.
177
+ # @param [Hash] opts the optional parameters
178
+ # @return [Array<(ProbeResponse, Integer, Hash)>] ProbeResponse data, response status code and response headers
179
+ def probe_with_http_info(url, opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug 'Calling API: EditApi.probe ...'
182
+ end
183
+ # verify the required parameter 'url' is set
184
+ if @api_client.config.client_side_validation && url.nil?
185
+ fail ArgumentError, "Missing the required parameter 'url' when calling EditApi.probe"
186
+ end
187
+ # resource path
188
+ local_var_path = '/probe/{url}'.sub('{' + 'url' + '}', CGI.escape(url.to_s))
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+
193
+ # header parameters
194
+ header_params = opts[:header_params] || {}
195
+ # HTTP header 'Accept' (if needed)
196
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = opts[:form_params] || {}
200
+
201
+ # http body (model)
202
+ post_body = opts[:debug_body]
203
+
204
+ # return_type
205
+ return_type = opts[:debug_return_type] || 'ProbeResponse'
206
+
207
+ # auth_names
208
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
209
+
210
+ new_options = opts.merge(
211
+ :operation => :"EditApi.probe",
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => return_type
218
+ )
219
+
220
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: EditApi#probe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,224 @@
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.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Shotstack
16
+ class ServeApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete Asset
23
+ # Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version}
24
+ # @param id [String] The id of the asset in UUID format
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def delete_asset(id, opts = {})
28
+ delete_asset_with_http_info(id, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete Asset
33
+ # Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id. **Base URL:** https://api.shotstack.io/serve/{version}
34
+ # @param id [String] The id of the asset in UUID format
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def delete_asset_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ServeApi.delete_asset ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling ServeApi.delete_asset"
44
+ end
45
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
46
+ if @api_client.config.client_side_validation && id !~ pattern
47
+ fail ArgumentError, "invalid value for 'id' when calling ServeApi.delete_asset, must conform to the pattern #{pattern}."
48
+ end
49
+
50
+ # resource path
51
+ local_var_path = '/assets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type]
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"ServeApi.delete_asset",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: ServeApi#delete_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Get Asset
89
+ # The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version}
90
+ # @param id [String] The id of the asset in UUID format
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [AssetResponse]
93
+ def get_asset(id, opts = {})
94
+ data, _status_code, _headers = get_asset_with_http_info(id, opts)
95
+ data
96
+ end
97
+
98
+ # Get Asset
99
+ # The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id. **Base URL:** https://api.shotstack.io/serve/{version}
100
+ # @param id [String] The id of the asset in UUID format
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(AssetResponse, Integer, Hash)>] AssetResponse data, response status code and response headers
103
+ def get_asset_with_http_info(id, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: ServeApi.get_asset ...'
106
+ end
107
+ # verify the required parameter 'id' is set
108
+ if @api_client.config.client_side_validation && id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'id' when calling ServeApi.get_asset"
110
+ end
111
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
112
+ if @api_client.config.client_side_validation && id !~ pattern
113
+ fail ArgumentError, "invalid value for 'id' when calling ServeApi.get_asset, must conform to the pattern #{pattern}."
114
+ end
115
+
116
+ # resource path
117
+ local_var_path = '/assets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body]
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type] || 'AssetResponse'
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"ServeApi.get_asset",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: ServeApi#get_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Get Asset by Render ID
157
+ # A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version}
158
+ # @param id [String] The render id associated with the asset in UUID format
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [AssetRenderResponse]
161
+ def get_asset_by_render_id(id, opts = {})
162
+ data, _status_code, _headers = get_asset_by_render_id_with_http_info(id, opts)
163
+ data
164
+ end
165
+
166
+ # Get Asset by Render ID
167
+ # A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id. **Base URL:** https://api.shotstack.io/serve/{version}
168
+ # @param id [String] The render id associated with the asset in UUID format
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [Array<(AssetRenderResponse, Integer, Hash)>] AssetRenderResponse data, response status code and response headers
171
+ def get_asset_by_render_id_with_http_info(id, opts = {})
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug 'Calling API: ServeApi.get_asset_by_render_id ...'
174
+ end
175
+ # verify the required parameter 'id' is set
176
+ if @api_client.config.client_side_validation && id.nil?
177
+ fail ArgumentError, "Missing the required parameter 'id' when calling ServeApi.get_asset_by_render_id"
178
+ end
179
+ pattern = Regexp.new(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/)
180
+ if @api_client.config.client_side_validation && id !~ pattern
181
+ fail ArgumentError, "invalid value for 'id' when calling ServeApi.get_asset_by_render_id, must conform to the pattern #{pattern}."
182
+ end
183
+
184
+ # resource path
185
+ local_var_path = '/assets/render/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
186
+
187
+ # query parameters
188
+ query_params = opts[:query_params] || {}
189
+
190
+ # header parameters
191
+ header_params = opts[:header_params] || {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
194
+
195
+ # form parameters
196
+ form_params = opts[:form_params] || {}
197
+
198
+ # http body (model)
199
+ post_body = opts[:debug_body]
200
+
201
+ # return_type
202
+ return_type = opts[:debug_return_type] || 'AssetRenderResponse'
203
+
204
+ # auth_names
205
+ auth_names = opts[:debug_auth_names] || ['DeveloperKey']
206
+
207
+ new_options = opts.merge(
208
+ :operation => :"ServeApi.get_asset_by_render_id",
209
+ :header_params => header_params,
210
+ :query_params => query_params,
211
+ :form_params => form_params,
212
+ :body => post_body,
213
+ :auth_names => auth_names,
214
+ :return_type => return_type
215
+ )
216
+
217
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: ServeApi#get_asset_by_render_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+ end
224
+ end
@@ -1,12 +1,12 @@
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) 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.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
@@ -296,7 +296,7 @@ module Shotstack
296
296
  @config.base_url(opts[:operation]) + path
297
297
  end
298
298
 
299
- # Update hearder and query params based on authentication settings.
299
+ # Update header and query params based on authentication settings.
300
300
  #
301
301
  # @param [Hash] header_params Header parameters
302
302
  # @param [Hash] query_params Query parameters
@@ -308,7 +308,7 @@ module Shotstack
308
308
  case auth_setting[:in]
309
309
  when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
310
310
  when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
311
- else fail ArgumentError, 'Authentication token must be in `query` of `header`'
311
+ else fail ArgumentError, 'Authentication token must be in `query` or `header`'
312
312
  end
313
313
  end
314
314
  end
@@ -1,12 +1,12 @@
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) 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.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
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 visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) 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.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
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0
9
+ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
@@ -147,13 +147,13 @@ module Shotstack
147
147
  @server_operation_variables = {}
148
148
  @api_key = {}
149
149
  @api_key_prefix = {}
150
- @timeout = 0
151
150
  @client_side_validation = true
152
151
  @verify_ssl = true
153
152
  @verify_ssl_host = true
154
153
  @params_encoding = nil
155
154
  @cert_file = nil
156
155
  @key_file = nil
156
+ @timeout = 0
157
157
  @debugging = false
158
158
  @inject_format = false
159
159
  @force_ending_format = false
@@ -197,11 +197,13 @@ module Shotstack
197
197
 
198
198
  # Gets API key (with prefix if set).
199
199
  # @param [String] param_name the parameter name of API key auth
200
- def api_key_with_prefix(param_name)
200
+ def api_key_with_prefix(param_name, param_alias = nil)
201
+ key = @api_key[param_name]
202
+ key = @api_key.fetch(param_alias, key) unless param_alias.nil?
201
203
  if @api_key_prefix[param_name]
202
- "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
204
+ "#{@api_key_prefix[param_name]} #{key}"
203
205
  else
204
- @api_key[param_name]
206
+ key
205
207
  end
206
208
  end
207
209
 
@@ -231,7 +233,21 @@ module Shotstack
231
233
  description: "No description provided",
232
234
  variables: {
233
235
  version: {
234
- description: "No description provided",
236
+ description: "Set the stage to `v1` for production usage without watermarks. Set to `stage` to use the development sandbox.",
237
+ default_value: "v1",
238
+ enum_values: [
239
+ "v1",
240
+ "stage"
241
+ ]
242
+ }
243
+ }
244
+ },
245
+ {
246
+ url: "https://api.shotstack.io/serve/{version}",
247
+ description: "No description provided",
248
+ variables: {
249
+ version: {
250
+ description: "Set the stage to `v1` for production usage. Set to `stage` to use the development sandbox.",
235
251
  default_value: "v1",
236
252
  enum_values: [
237
253
  "v1",
@@ -281,5 +297,6 @@ module Shotstack
281
297
 
282
298
  url
283
299
  end
300
+
284
301
  end
285
302
  end