shotstack 0.1.7 → 0.1.8
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/lib/shotstack.rb +9 -1
- data/lib/shotstack/api/edit_api.rb +155 -0
- data/lib/shotstack/api/serve_api.rb +224 -0
- data/lib/shotstack/api_client.rb +1 -1
- data/lib/shotstack/api_error.rb +1 -1
- data/lib/shotstack/configuration.rb +16 -2
- data/lib/shotstack/models/asset_render_response.rb +222 -0
- data/lib/shotstack/models/asset_response.rb +219 -0
- data/lib/shotstack/models/asset_response_attributes.rb +334 -0
- data/lib/shotstack/models/asset_response_data.rb +229 -0
- data/lib/shotstack/models/audio_asset.rb +1 -1
- data/lib/shotstack/models/clip.rb +1 -1
- data/lib/shotstack/models/crop.rb +1 -1
- data/lib/shotstack/models/destinations.rb +17 -0
- data/lib/shotstack/models/edit.rb +3 -3
- data/lib/shotstack/models/font.rb +1 -1
- data/lib/shotstack/models/html_asset.rb +1 -1
- data/lib/shotstack/models/image_asset.rb +1 -1
- data/lib/shotstack/models/luma_asset.rb +4 -4
- data/lib/shotstack/models/offset.rb +1 -1
- data/lib/shotstack/models/output.rb +56 -16
- data/lib/shotstack/models/poster.rb +1 -1
- data/lib/shotstack/models/queued_response.rb +2 -1
- data/lib/shotstack/models/queued_response_data.rb +2 -1
- data/lib/shotstack/models/range.rb +3 -3
- data/lib/shotstack/models/render_response.rb +2 -1
- data/lib/shotstack/models/render_response_data.rb +6 -5
- data/lib/shotstack/models/shotstack_destination.rb +240 -0
- data/lib/shotstack/models/size.rb +278 -0
- data/lib/shotstack/models/soundtrack.rb +1 -1
- data/lib/shotstack/models/thumbnail.rb +2 -2
- data/lib/shotstack/models/timeline.rb +2 -2
- data/lib/shotstack/models/title_asset.rb +1 -1
- data/lib/shotstack/models/track.rb +1 -1
- data/lib/shotstack/models/transition.rb +7 -7
- data/lib/shotstack/models/video_asset.rb +1 -1
- data/lib/shotstack/version.rb +2 -2
- data/shotstack.gemspec +2 -2
- metadata +19 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7c94abe15d3d41fbe28336a49e9d96162eb4d11e468c0480b2b36a578693352
|
4
|
+
data.tar.gz: 4d69d505df7d5c858d031e037bb214b6cd25953c810fe8e0402397f76ee55fb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baa6c561d71202b59b83651f0ed888c2f537b3c90272d490612bcff6c9d5983bde535e8c94f15099b6e217b0b0a620fe5e98078bf78952651880f2bd97f6c6a3
|
7
|
+
data.tar.gz: ab5221098876e6b6c89b7e23ab5c51b2b1c10fb93f9f545793655a86cfd301daeba7018e487e1ac99b8931a1b618ec2a8ff038eccd87763088644f25394cf03e
|
data/lib/shotstack.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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
|
|
@@ -17,6 +17,10 @@ require 'shotstack/version'
|
|
17
17
|
require 'shotstack/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'shotstack/models/asset_render_response'
|
21
|
+
require 'shotstack/models/asset_response'
|
22
|
+
require 'shotstack/models/asset_response_attributes'
|
23
|
+
require 'shotstack/models/asset_response_data'
|
20
24
|
require 'shotstack/models/audio_asset'
|
21
25
|
require 'shotstack/models/clip'
|
22
26
|
require 'shotstack/models/crop'
|
@@ -33,6 +37,8 @@ require 'shotstack/models/queued_response_data'
|
|
33
37
|
require 'shotstack/models/range'
|
34
38
|
require 'shotstack/models/render_response'
|
35
39
|
require 'shotstack/models/render_response_data'
|
40
|
+
require 'shotstack/models/shotstack_destination'
|
41
|
+
require 'shotstack/models/size'
|
36
42
|
require 'shotstack/models/soundtrack'
|
37
43
|
require 'shotstack/models/thumbnail'
|
38
44
|
require 'shotstack/models/timeline'
|
@@ -42,7 +48,9 @@ require 'shotstack/models/transition'
|
|
42
48
|
require 'shotstack/models/video_asset'
|
43
49
|
|
44
50
|
# APIs
|
51
|
+
require 'shotstack/api/edit_api'
|
45
52
|
require 'shotstack/api/endpoints_api'
|
53
|
+
require 'shotstack/api/serve_api'
|
46
54
|
|
47
55
|
module Shotstack
|
48
56
|
class << self
|
@@ -0,0 +1,155 @@
|
|
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 '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
|
+
# @return [RenderResponse]
|
27
|
+
def get_render(id, opts = {})
|
28
|
+
data, _status_code, _headers = get_render_with_http_info(id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get Render Status
|
33
|
+
# Get the rendering status, temporary asset url and details of a render by ID. **base URL:** https://api.shotstack.io/{version}
|
34
|
+
# @param id [String] The id of the timeline render task in UUID format
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(RenderResponse, Integer, Hash)>] RenderResponse data, response status code and response headers
|
37
|
+
def get_render_with_http_info(id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: EditApi.get_render ...'
|
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 EditApi.get_render"
|
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 EditApi.get_render, must conform to the pattern #{pattern}."
|
48
|
+
end
|
49
|
+
|
50
|
+
# resource path
|
51
|
+
local_var_path = '/render/{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
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body]
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'RenderResponse'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"EditApi.get_render",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: EditApi#get_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Render Asset
|
91
|
+
# Queue and render the contents of a timeline as a video, image or audio file.
|
92
|
+
# @param edit [Edit] The video, image or audio edit specified using JSON. **base URL:** https://api.shotstack.io/{version}
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [QueuedResponse]
|
95
|
+
def post_render(edit, opts = {})
|
96
|
+
data, _status_code, _headers = post_render_with_http_info(edit, opts)
|
97
|
+
data
|
98
|
+
end
|
99
|
+
|
100
|
+
# Render Asset
|
101
|
+
# Queue and render the contents of a timeline as a video, image or audio file.
|
102
|
+
# @param edit [Edit] The video, image or audio edit specified using JSON. **base URL:** https://api.shotstack.io/{version}
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(QueuedResponse, Integer, Hash)>] QueuedResponse data, response status code and response headers
|
105
|
+
def post_render_with_http_info(edit, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: EditApi.post_render ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'edit' is set
|
110
|
+
if @api_client.config.client_side_validation && edit.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'edit' when calling EditApi.post_render"
|
112
|
+
end
|
113
|
+
# resource path
|
114
|
+
local_var_path = '/render'
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = opts[:query_params] || {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = opts[:header_params] || {}
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
|
+
# HTTP header 'Content-Type'
|
124
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
125
|
+
|
126
|
+
# form parameters
|
127
|
+
form_params = opts[:form_params] || {}
|
128
|
+
|
129
|
+
# http body (model)
|
130
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(edit)
|
131
|
+
|
132
|
+
# return_type
|
133
|
+
return_type = opts[:debug_return_type] || 'QueuedResponse'
|
134
|
+
|
135
|
+
# auth_names
|
136
|
+
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
|
137
|
+
|
138
|
+
new_options = opts.merge(
|
139
|
+
:operation => :"EditApi.post_render",
|
140
|
+
:header_params => header_params,
|
141
|
+
:query_params => query_params,
|
142
|
+
:form_params => form_params,
|
143
|
+
:body => post_body,
|
144
|
+
:auth_names => auth_names,
|
145
|
+
:return_type => return_type
|
146
|
+
)
|
147
|
+
|
148
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "API called: EditApi#post_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
151
|
+
end
|
152
|
+
return data, status_code, headers
|
153
|
+
end
|
154
|
+
end
|
155
|
+
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.0.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
|
data/lib/shotstack/api_client.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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
|
|
data/lib/shotstack/api_error.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Shotstack
|
3
3
|
|
4
|
-
#
|
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
|
|