shotstack 0.1.10 → 0.2.1
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/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 +42 -11
- data/lib/shotstack/models/asset_render_response.rb +1 -1
- data/lib/shotstack/models/asset_response.rb +1 -1
- data/lib/shotstack/models/asset_response_attributes.rb +12 -2
- data/lib/shotstack/models/asset_response_data.rb +1 -1
- data/lib/shotstack/models/audio_asset.rb +2 -3
- data/lib/shotstack/models/clip.rb +1 -2
- data/lib/shotstack/models/crop.rb +1 -1
- data/lib/shotstack/models/destinations.rb +256 -0
- data/lib/shotstack/models/edit.rb +3 -3
- data/lib/shotstack/models/flip_transformation.rb +1 -1
- data/lib/shotstack/models/font.rb +1 -1
- data/lib/shotstack/models/html_asset.rb +4 -5
- data/lib/shotstack/models/image_asset.rb +2 -3
- data/lib/shotstack/models/luma_asset.rb +2 -3
- data/lib/shotstack/models/merge_field.rb +2 -2
- data/lib/shotstack/models/mux_destination.rb +236 -0
- data/lib/shotstack/models/mux_destination_options.rb +244 -0
- data/lib/shotstack/models/offset.rb +1 -1
- data/lib/shotstack/models/output.rb +1 -4
- 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 +1 -1
- data/lib/shotstack/models/rotate_transformation.rb +1 -1
- data/lib/shotstack/models/shotstack_destination.rb +2 -3
- data/lib/shotstack/models/size.rb +1 -1
- data/lib/shotstack/models/skew_transformation.rb +1 -1
- data/lib/shotstack/models/soundtrack.rb +1 -1
- 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 +270 -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 +270 -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 +2 -2
- data/lib/shotstack/models/title_asset.rb +2 -3
- 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 +2 -3
- data/lib/shotstack/version.rb +2 -2
- data/lib/shotstack.rb +14 -2
- data/shotstack.gemspec +1 -1
- metadata +17 -7
- data/lib/shotstack/api/endpoints_api.rb +0 -158
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Shotstack
|
|
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.
|
|
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 EndpointsApi
|
|
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, video url and details of a timeline by ID.
|
|
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, video url and details of a timeline by ID.
|
|
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: EndpointsApi.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 EndpointsApi.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 EndpointsApi.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 => :"EndpointsApi.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: EndpointsApi#get_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
-
end
|
|
87
|
-
return data, status_code, headers
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
# Render Video
|
|
91
|
-
# Queue and render the contents of a timeline as a video file.
|
|
92
|
-
# @param edit [Edit] The video edit specified using JSON.
|
|
93
|
-
# @param [Hash] opts the optional parameters
|
|
94
|
-
# @option opts [String] :x_api_queue_id The id of a dedicated queue (enterprise customers only).
|
|
95
|
-
# @return [QueuedResponse]
|
|
96
|
-
def post_render(edit, opts = {})
|
|
97
|
-
data, _status_code, _headers = post_render_with_http_info(edit, opts)
|
|
98
|
-
data
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Render Video
|
|
102
|
-
# Queue and render the contents of a timeline as a video file.
|
|
103
|
-
# @param edit [Edit] The video edit specified using JSON.
|
|
104
|
-
# @param [Hash] opts the optional parameters
|
|
105
|
-
# @option opts [String] :x_api_queue_id The id of a dedicated queue (enterprise customers only).
|
|
106
|
-
# @return [Array<(QueuedResponse, Integer, Hash)>] QueuedResponse data, response status code and response headers
|
|
107
|
-
def post_render_with_http_info(edit, opts = {})
|
|
108
|
-
if @api_client.config.debugging
|
|
109
|
-
@api_client.config.logger.debug 'Calling API: EndpointsApi.post_render ...'
|
|
110
|
-
end
|
|
111
|
-
# verify the required parameter 'edit' is set
|
|
112
|
-
if @api_client.config.client_side_validation && edit.nil?
|
|
113
|
-
fail ArgumentError, "Missing the required parameter 'edit' when calling EndpointsApi.post_render"
|
|
114
|
-
end
|
|
115
|
-
# resource path
|
|
116
|
-
local_var_path = '/render'
|
|
117
|
-
|
|
118
|
-
# query parameters
|
|
119
|
-
query_params = opts[:query_params] || {}
|
|
120
|
-
|
|
121
|
-
# header parameters
|
|
122
|
-
header_params = opts[:header_params] || {}
|
|
123
|
-
# HTTP header 'Accept' (if needed)
|
|
124
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
125
|
-
# HTTP header 'Content-Type'
|
|
126
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
127
|
-
header_params[:'x-api-queue-id'] = opts[:'x_api_queue_id'] if !opts[:'x_api_queue_id'].nil?
|
|
128
|
-
|
|
129
|
-
# form parameters
|
|
130
|
-
form_params = opts[:form_params] || {}
|
|
131
|
-
|
|
132
|
-
# http body (model)
|
|
133
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(edit)
|
|
134
|
-
|
|
135
|
-
# return_type
|
|
136
|
-
return_type = opts[:debug_return_type] || 'QueuedResponse'
|
|
137
|
-
|
|
138
|
-
# auth_names
|
|
139
|
-
auth_names = opts[:debug_auth_names] || ['DeveloperKey']
|
|
140
|
-
|
|
141
|
-
new_options = opts.merge(
|
|
142
|
-
:operation => :"EndpointsApi.post_render",
|
|
143
|
-
:header_params => header_params,
|
|
144
|
-
:query_params => query_params,
|
|
145
|
-
:form_params => form_params,
|
|
146
|
-
:body => post_body,
|
|
147
|
-
:auth_names => auth_names,
|
|
148
|
-
:return_type => return_type
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
-
if @api_client.config.debugging
|
|
153
|
-
@api_client.config.logger.debug "API called: EndpointsApi#post_render\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
-
end
|
|
155
|
-
return data, status_code, headers
|
|
156
|
-
end
|
|
157
|
-
end
|
|
158
|
-
end
|