telestream_cloud_qc 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +58 -0
- data/Rakefile +8 -0
- data/docs/Alert.md +13 -0
- data/docs/AudioStream.md +13 -0
- data/docs/Container.md +9 -0
- data/docs/Data.md +10 -0
- data/docs/Data1.md +9 -0
- data/docs/ExtraFile.md +10 -0
- data/docs/Job.md +12 -0
- data/docs/JobData.md +9 -0
- data/docs/JobDetails.md +9 -0
- data/docs/JobDetailsResult.md +8 -0
- data/docs/JobsCollection.md +12 -0
- data/docs/Media.md +10 -0
- data/docs/Options.md +7 -0
- data/docs/Project.md +12 -0
- data/docs/Proxy.md +12 -0
- data/docs/QcApi.md +719 -0
- data/docs/UploadSession.md +13 -0
- data/docs/VideoStream.md +13 -0
- data/docs/VideoUploadBody.md +12 -0
- data/git_push.sh +55 -0
- data/lib/telestream_cloud_qc/api/qc_api.rb +781 -0
- data/lib/telestream_cloud_qc/api_client.rb +389 -0
- data/lib/telestream_cloud_qc/api_error.rb +38 -0
- data/lib/telestream_cloud_qc/configuration.rb +209 -0
- data/lib/telestream_cloud_qc/models/alert.rb +236 -0
- data/lib/telestream_cloud_qc/models/audio_stream.rb +238 -0
- data/lib/telestream_cloud_qc/models/container.rb +198 -0
- data/lib/telestream_cloud_qc/models/data.rb +208 -0
- data/lib/telestream_cloud_qc/models/data_1.rb +197 -0
- data/lib/telestream_cloud_qc/models/extra_file.rb +221 -0
- data/lib/telestream_cloud_qc/models/job.rb +269 -0
- data/lib/telestream_cloud_qc/models/job_data.rb +197 -0
- data/lib/telestream_cloud_qc/models/job_details.rb +199 -0
- data/lib/telestream_cloud_qc/models/job_details_result.rb +190 -0
- data/lib/telestream_cloud_qc/models/jobs_collection.rb +230 -0
- data/lib/telestream_cloud_qc/models/media.rb +210 -0
- data/lib/telestream_cloud_qc/models/options.rb +179 -0
- data/lib/telestream_cloud_qc/models/project.rb +262 -0
- data/lib/telestream_cloud_qc/models/proxy.rb +224 -0
- data/lib/telestream_cloud_qc/models/upload_session.rb +249 -0
- data/lib/telestream_cloud_qc/models/video_stream.rb +235 -0
- data/lib/telestream_cloud_qc/models/video_upload_body.rb +242 -0
- data/lib/telestream_cloud_qc/uploader.rb +244 -0
- data/lib/telestream_cloud_qc/version.rb +18 -0
- data/lib/telestream_cloud_qc.rb +64 -0
- data/spec/api/qc_api_spec.rb +202 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/alert_spec.rb +72 -0
- data/spec/models/audio_stream_spec.rb +72 -0
- data/spec/models/container_spec.rb +48 -0
- data/spec/models/data_1_spec.rb +48 -0
- data/spec/models/data_spec.rb +54 -0
- data/spec/models/extra_file_spec.rb +54 -0
- data/spec/models/job_data_spec.rb +48 -0
- data/spec/models/job_details_result_spec.rb +42 -0
- data/spec/models/job_details_spec.rb +48 -0
- data/spec/models/job_spec.rb +74 -0
- data/spec/models/jobs_collection_spec.rb +66 -0
- data/spec/models/media_spec.rb +54 -0
- data/spec/models/options_spec.rb +36 -0
- data/spec/models/project_spec.rb +70 -0
- data/spec/models/proxy_spec.rb +66 -0
- data/spec/models/upload_session_spec.rb +72 -0
- data/spec/models/video_stream_spec.rb +72 -0
- data/spec/models/video_upload_body_spec.rb +66 -0
- data/spec/spec_helper.rb +111 -0
- data/telestream_cloud_qc.gemspec +47 -0
- metadata +336 -0
@@ -0,0 +1,781 @@
|
|
1
|
+
=begin
|
2
|
+
#Qc API
|
3
|
+
|
4
|
+
#QC API
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: cloudsupport@telestream.net
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module TelestreamCloud::Qc
|
16
|
+
class QcApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
#
|
25
|
+
# @param project_id A unique identifier of a Project.
|
26
|
+
# @param job_id A unique identifier of a Job.
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [nil]
|
29
|
+
def cancel_job(project_id, job_id, opts = {})
|
30
|
+
cancel_job_with_http_info(project_id, job_id, opts)
|
31
|
+
return nil
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
#
|
36
|
+
# @param project_id A unique identifier of a Project.
|
37
|
+
# @param job_id A unique identifier of a Job.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
40
|
+
def cancel_job_with_http_info(project_id, job_id, opts = {})
|
41
|
+
if @api_client.config.debugging
|
42
|
+
@api_client.config.logger.debug "Calling API: QcApi.cancel_job ..."
|
43
|
+
end
|
44
|
+
# verify the required parameter 'project_id' is set
|
45
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.cancel_job"
|
47
|
+
end
|
48
|
+
# verify the required parameter 'job_id' is set
|
49
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling QcApi.cancel_job"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = "/projects/{project_id}/jobs/{job_id}/cancel.json".sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = nil
|
70
|
+
auth_names = ['apiKey']
|
71
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: QcApi#cancel_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Create a new job
|
84
|
+
#
|
85
|
+
# @param project_id A unique identifier of a Project.
|
86
|
+
# @param data
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [Job]
|
89
|
+
def create_job(project_id, data, opts = {})
|
90
|
+
data, _status_code, _headers = create_job_with_http_info(project_id, data, opts)
|
91
|
+
return data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create a new job
|
95
|
+
#
|
96
|
+
# @param project_id A unique identifier of a Project.
|
97
|
+
# @param data
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
|
100
|
+
def create_job_with_http_info(project_id, data, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug "Calling API: QcApi.create_job ..."
|
103
|
+
end
|
104
|
+
# verify the required parameter 'project_id' is set
|
105
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.create_job"
|
107
|
+
end
|
108
|
+
# verify the required parameter 'data' is set
|
109
|
+
if @api_client.config.client_side_validation && data.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling QcApi.create_job"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = "/projects/{project_id}/jobs.json".sub('{' + 'project_id' + '}', project_id.to_s)
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
+
# HTTP header 'Content-Type'
|
123
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
124
|
+
|
125
|
+
# form parameters
|
126
|
+
form_params = {}
|
127
|
+
|
128
|
+
# http body (model)
|
129
|
+
post_body = @api_client.object_to_http_body(data)
|
130
|
+
auth_names = ['apiKey']
|
131
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
132
|
+
:header_params => header_params,
|
133
|
+
:query_params => query_params,
|
134
|
+
:form_params => form_params,
|
135
|
+
:body => post_body,
|
136
|
+
:auth_names => auth_names,
|
137
|
+
:return_type => 'Job')
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: QcApi#create_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
144
|
+
# Create a new project
|
145
|
+
#
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @option opts [Data] :data
|
148
|
+
# @return [Project]
|
149
|
+
def create_project(opts = {})
|
150
|
+
data, _status_code, _headers = create_project_with_http_info(opts)
|
151
|
+
return data
|
152
|
+
end
|
153
|
+
|
154
|
+
# Create a new project
|
155
|
+
#
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @option opts [Data] :data
|
158
|
+
# @return [Array<(Project, Fixnum, Hash)>] Project data, response status code and response headers
|
159
|
+
def create_project_with_http_info(opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug "Calling API: QcApi.create_project ..."
|
162
|
+
end
|
163
|
+
# resource path
|
164
|
+
local_var_path = "/projects.json"
|
165
|
+
|
166
|
+
# query parameters
|
167
|
+
query_params = {}
|
168
|
+
|
169
|
+
# header parameters
|
170
|
+
header_params = {}
|
171
|
+
# HTTP header 'Accept' (if needed)
|
172
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
173
|
+
# HTTP header 'Content-Type'
|
174
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
175
|
+
|
176
|
+
# form parameters
|
177
|
+
form_params = {}
|
178
|
+
|
179
|
+
# http body (model)
|
180
|
+
post_body = @api_client.object_to_http_body(opts[:'data'])
|
181
|
+
auth_names = ['apiKey']
|
182
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
183
|
+
:header_params => header_params,
|
184
|
+
:query_params => query_params,
|
185
|
+
:form_params => form_params,
|
186
|
+
:body => post_body,
|
187
|
+
:auth_names => auth_names,
|
188
|
+
:return_type => 'Project')
|
189
|
+
if @api_client.config.debugging
|
190
|
+
@api_client.config.logger.debug "API called: QcApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
191
|
+
end
|
192
|
+
return data, status_code, headers
|
193
|
+
end
|
194
|
+
|
195
|
+
# Get QC job
|
196
|
+
#
|
197
|
+
# @param project_id A unique identifier of a Project.
|
198
|
+
# @param job_id A unique identifier of a Job.
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @return [Job]
|
201
|
+
def get_job(project_id, job_id, opts = {})
|
202
|
+
data, _status_code, _headers = get_job_with_http_info(project_id, job_id, opts)
|
203
|
+
return data
|
204
|
+
end
|
205
|
+
|
206
|
+
# Get QC job
|
207
|
+
#
|
208
|
+
# @param project_id A unique identifier of a Project.
|
209
|
+
# @param job_id A unique identifier of a Job.
|
210
|
+
# @param [Hash] opts the optional parameters
|
211
|
+
# @return [Array<(Job, Fixnum, Hash)>] Job data, response status code and response headers
|
212
|
+
def get_job_with_http_info(project_id, job_id, opts = {})
|
213
|
+
if @api_client.config.debugging
|
214
|
+
@api_client.config.logger.debug "Calling API: QcApi.get_job ..."
|
215
|
+
end
|
216
|
+
# verify the required parameter 'project_id' is set
|
217
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
218
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.get_job"
|
219
|
+
end
|
220
|
+
# verify the required parameter 'job_id' is set
|
221
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
222
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling QcApi.get_job"
|
223
|
+
end
|
224
|
+
# resource path
|
225
|
+
local_var_path = "/projects/{project_id}/jobs/{job_id}.json".sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)
|
226
|
+
|
227
|
+
# query parameters
|
228
|
+
query_params = {}
|
229
|
+
|
230
|
+
# header parameters
|
231
|
+
header_params = {}
|
232
|
+
# HTTP header 'Accept' (if needed)
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
234
|
+
# HTTP header 'Content-Type'
|
235
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
236
|
+
|
237
|
+
# form parameters
|
238
|
+
form_params = {}
|
239
|
+
|
240
|
+
# http body (model)
|
241
|
+
post_body = nil
|
242
|
+
auth_names = ['apiKey']
|
243
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
244
|
+
:header_params => header_params,
|
245
|
+
:query_params => query_params,
|
246
|
+
:form_params => form_params,
|
247
|
+
:body => post_body,
|
248
|
+
:auth_names => auth_names,
|
249
|
+
:return_type => 'Job')
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug "API called: QcApi#get_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
252
|
+
end
|
253
|
+
return data, status_code, headers
|
254
|
+
end
|
255
|
+
|
256
|
+
# Get project by Id
|
257
|
+
#
|
258
|
+
# @param project_id A unique identifier of a Project.
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [Project]
|
261
|
+
def get_project(project_id, opts = {})
|
262
|
+
data, _status_code, _headers = get_project_with_http_info(project_id, opts)
|
263
|
+
return data
|
264
|
+
end
|
265
|
+
|
266
|
+
# Get project by Id
|
267
|
+
#
|
268
|
+
# @param project_id A unique identifier of a Project.
|
269
|
+
# @param [Hash] opts the optional parameters
|
270
|
+
# @return [Array<(Project, Fixnum, Hash)>] Project data, response status code and response headers
|
271
|
+
def get_project_with_http_info(project_id, opts = {})
|
272
|
+
if @api_client.config.debugging
|
273
|
+
@api_client.config.logger.debug "Calling API: QcApi.get_project ..."
|
274
|
+
end
|
275
|
+
# verify the required parameter 'project_id' is set
|
276
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
277
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.get_project"
|
278
|
+
end
|
279
|
+
# resource path
|
280
|
+
local_var_path = "/projects/{project_id}.json".sub('{' + 'project_id' + '}', project_id.to_s)
|
281
|
+
|
282
|
+
# query parameters
|
283
|
+
query_params = {}
|
284
|
+
|
285
|
+
# header parameters
|
286
|
+
header_params = {}
|
287
|
+
# HTTP header 'Accept' (if needed)
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
289
|
+
# HTTP header 'Content-Type'
|
290
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
291
|
+
|
292
|
+
# form parameters
|
293
|
+
form_params = {}
|
294
|
+
|
295
|
+
# http body (model)
|
296
|
+
post_body = nil
|
297
|
+
auth_names = ['apiKey']
|
298
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
299
|
+
:header_params => header_params,
|
300
|
+
:query_params => query_params,
|
301
|
+
:form_params => form_params,
|
302
|
+
:body => post_body,
|
303
|
+
:auth_names => auth_names,
|
304
|
+
:return_type => 'Project')
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug "API called: QcApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
307
|
+
end
|
308
|
+
return data, status_code, headers
|
309
|
+
end
|
310
|
+
|
311
|
+
# Get jobs form projects
|
312
|
+
#
|
313
|
+
# @param project_id A unique identifier of a Project.
|
314
|
+
# @param [Hash] opts the optional parameters
|
315
|
+
# @option opts [BOOLEAN] :expand Expand details of job
|
316
|
+
# @option opts [String] :status Filter jobs by status
|
317
|
+
# @option opts [Integer] :per_page Limit number of listed jobs (default to 30)
|
318
|
+
# @option opts [Integer] :page Index of jobs page to be listed
|
319
|
+
# @return [JobsCollection]
|
320
|
+
def list_jobs(project_id, opts = {})
|
321
|
+
data, _status_code, _headers = list_jobs_with_http_info(project_id, opts)
|
322
|
+
return data
|
323
|
+
end
|
324
|
+
|
325
|
+
# Get jobs form projects
|
326
|
+
#
|
327
|
+
# @param project_id A unique identifier of a Project.
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @option opts [BOOLEAN] :expand Expand details of job
|
330
|
+
# @option opts [String] :status Filter jobs by status
|
331
|
+
# @option opts [Integer] :per_page Limit number of listed jobs
|
332
|
+
# @option opts [Integer] :page Index of jobs page to be listed
|
333
|
+
# @return [Array<(JobsCollection, Fixnum, Hash)>] JobsCollection data, response status code and response headers
|
334
|
+
def list_jobs_with_http_info(project_id, opts = {})
|
335
|
+
if @api_client.config.debugging
|
336
|
+
@api_client.config.logger.debug "Calling API: QcApi.list_jobs ..."
|
337
|
+
end
|
338
|
+
# verify the required parameter 'project_id' is set
|
339
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
340
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.list_jobs"
|
341
|
+
end
|
342
|
+
# resource path
|
343
|
+
local_var_path = "/projects/{project_id}/jobs.json".sub('{' + 'project_id' + '}', project_id.to_s)
|
344
|
+
|
345
|
+
# query parameters
|
346
|
+
query_params = {}
|
347
|
+
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
348
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
349
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
350
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
351
|
+
|
352
|
+
# header parameters
|
353
|
+
header_params = {}
|
354
|
+
# HTTP header 'Accept' (if needed)
|
355
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
356
|
+
# HTTP header 'Content-Type'
|
357
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
358
|
+
|
359
|
+
# form parameters
|
360
|
+
form_params = {}
|
361
|
+
|
362
|
+
# http body (model)
|
363
|
+
post_body = nil
|
364
|
+
auth_names = ['apiKey']
|
365
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
366
|
+
:header_params => header_params,
|
367
|
+
:query_params => query_params,
|
368
|
+
:form_params => form_params,
|
369
|
+
:body => post_body,
|
370
|
+
:auth_names => auth_names,
|
371
|
+
:return_type => 'JobsCollection')
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "API called: QcApi#list_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
|
+
end
|
375
|
+
return data, status_code, headers
|
376
|
+
end
|
377
|
+
|
378
|
+
# List all projects for an account
|
379
|
+
#
|
380
|
+
# @param [Hash] opts the optional parameters
|
381
|
+
# @return [Array<Project>]
|
382
|
+
def list_projects(opts = {})
|
383
|
+
data, _status_code, _headers = list_projects_with_http_info(opts)
|
384
|
+
return data
|
385
|
+
end
|
386
|
+
|
387
|
+
# List all projects for an account
|
388
|
+
#
|
389
|
+
# @param [Hash] opts the optional parameters
|
390
|
+
# @return [Array<(Array<Project>, Fixnum, Hash)>] Array<Project> data, response status code and response headers
|
391
|
+
def list_projects_with_http_info(opts = {})
|
392
|
+
if @api_client.config.debugging
|
393
|
+
@api_client.config.logger.debug "Calling API: QcApi.list_projects ..."
|
394
|
+
end
|
395
|
+
# resource path
|
396
|
+
local_var_path = "/projects.json"
|
397
|
+
|
398
|
+
# query parameters
|
399
|
+
query_params = {}
|
400
|
+
|
401
|
+
# header parameters
|
402
|
+
header_params = {}
|
403
|
+
# HTTP header 'Accept' (if needed)
|
404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
405
|
+
# HTTP header 'Content-Type'
|
406
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
407
|
+
|
408
|
+
# form parameters
|
409
|
+
form_params = {}
|
410
|
+
|
411
|
+
# http body (model)
|
412
|
+
post_body = nil
|
413
|
+
auth_names = ['apiKey']
|
414
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
415
|
+
:header_params => header_params,
|
416
|
+
:query_params => query_params,
|
417
|
+
:form_params => form_params,
|
418
|
+
:body => post_body,
|
419
|
+
:auth_names => auth_names,
|
420
|
+
:return_type => 'Array<Project>')
|
421
|
+
if @api_client.config.debugging
|
422
|
+
@api_client.config.logger.debug "API called: QcApi#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
423
|
+
end
|
424
|
+
return data, status_code, headers
|
425
|
+
end
|
426
|
+
|
427
|
+
# Modify project
|
428
|
+
#
|
429
|
+
# @param project_id
|
430
|
+
# @param [Hash] opts the optional parameters
|
431
|
+
# @option opts [Data1] :data
|
432
|
+
# @return [Project]
|
433
|
+
def modify_project(project_id, opts = {})
|
434
|
+
data, _status_code, _headers = modify_project_with_http_info(project_id, opts)
|
435
|
+
return data
|
436
|
+
end
|
437
|
+
|
438
|
+
# Modify project
|
439
|
+
#
|
440
|
+
# @param project_id
|
441
|
+
# @param [Hash] opts the optional parameters
|
442
|
+
# @option opts [Data1] :data
|
443
|
+
# @return [Array<(Project, Fixnum, Hash)>] Project data, response status code and response headers
|
444
|
+
def modify_project_with_http_info(project_id, opts = {})
|
445
|
+
if @api_client.config.debugging
|
446
|
+
@api_client.config.logger.debug "Calling API: QcApi.modify_project ..."
|
447
|
+
end
|
448
|
+
# verify the required parameter 'project_id' is set
|
449
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
450
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.modify_project"
|
451
|
+
end
|
452
|
+
# resource path
|
453
|
+
local_var_path = "/projects/{project_id}.json".sub('{' + 'project_id' + '}', project_id.to_s)
|
454
|
+
|
455
|
+
# query parameters
|
456
|
+
query_params = {}
|
457
|
+
|
458
|
+
# header parameters
|
459
|
+
header_params = {}
|
460
|
+
# HTTP header 'Accept' (if needed)
|
461
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
462
|
+
# HTTP header 'Content-Type'
|
463
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
464
|
+
|
465
|
+
# form parameters
|
466
|
+
form_params = {}
|
467
|
+
|
468
|
+
# http body (model)
|
469
|
+
post_body = @api_client.object_to_http_body(opts[:'data'])
|
470
|
+
auth_names = ['apiKey']
|
471
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
472
|
+
:header_params => header_params,
|
473
|
+
:query_params => query_params,
|
474
|
+
:form_params => form_params,
|
475
|
+
:body => post_body,
|
476
|
+
:auth_names => auth_names,
|
477
|
+
:return_type => 'Project')
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug "API called: QcApi#modify_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
480
|
+
end
|
481
|
+
return data, status_code, headers
|
482
|
+
end
|
483
|
+
|
484
|
+
#
|
485
|
+
#
|
486
|
+
# @param project_id A unique identifier of a Project.
|
487
|
+
# @param job_id A unique identifier of a Job.
|
488
|
+
# @param [Hash] opts the optional parameters
|
489
|
+
# @return [Proxy]
|
490
|
+
def proxy(project_id, job_id, opts = {})
|
491
|
+
data, _status_code, _headers = proxy_with_http_info(project_id, job_id, opts)
|
492
|
+
return data
|
493
|
+
end
|
494
|
+
|
495
|
+
#
|
496
|
+
#
|
497
|
+
# @param project_id A unique identifier of a Project.
|
498
|
+
# @param job_id A unique identifier of a Job.
|
499
|
+
# @param [Hash] opts the optional parameters
|
500
|
+
# @return [Array<(Proxy, Fixnum, Hash)>] Proxy data, response status code and response headers
|
501
|
+
def proxy_with_http_info(project_id, job_id, opts = {})
|
502
|
+
if @api_client.config.debugging
|
503
|
+
@api_client.config.logger.debug "Calling API: QcApi.proxy ..."
|
504
|
+
end
|
505
|
+
# verify the required parameter 'project_id' is set
|
506
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
507
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.proxy"
|
508
|
+
end
|
509
|
+
# verify the required parameter 'job_id' is set
|
510
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
511
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling QcApi.proxy"
|
512
|
+
end
|
513
|
+
# resource path
|
514
|
+
local_var_path = "/projects/{project_id}/jobs/{job_id}/proxy.json".sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)
|
515
|
+
|
516
|
+
# query parameters
|
517
|
+
query_params = {}
|
518
|
+
|
519
|
+
# header parameters
|
520
|
+
header_params = {}
|
521
|
+
# HTTP header 'Accept' (if needed)
|
522
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
523
|
+
# HTTP header 'Content-Type'
|
524
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
525
|
+
|
526
|
+
# form parameters
|
527
|
+
form_params = {}
|
528
|
+
|
529
|
+
# http body (model)
|
530
|
+
post_body = nil
|
531
|
+
auth_names = ['apiKey']
|
532
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
533
|
+
:header_params => header_params,
|
534
|
+
:query_params => query_params,
|
535
|
+
:form_params => form_params,
|
536
|
+
:body => post_body,
|
537
|
+
:auth_names => auth_names,
|
538
|
+
:return_type => 'Proxy')
|
539
|
+
if @api_client.config.debugging
|
540
|
+
@api_client.config.logger.debug "API called: QcApi#proxy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
541
|
+
end
|
542
|
+
return data, status_code, headers
|
543
|
+
end
|
544
|
+
|
545
|
+
#
|
546
|
+
#
|
547
|
+
# @param project_id A unique identifier of a Project.
|
548
|
+
# @param job_id A unique identifier of a Job.
|
549
|
+
# @param [Hash] opts the optional parameters
|
550
|
+
# @return [nil]
|
551
|
+
def remove_job(project_id, job_id, opts = {})
|
552
|
+
remove_job_with_http_info(project_id, job_id, opts)
|
553
|
+
return nil
|
554
|
+
end
|
555
|
+
|
556
|
+
#
|
557
|
+
#
|
558
|
+
# @param project_id A unique identifier of a Project.
|
559
|
+
# @param job_id A unique identifier of a Job.
|
560
|
+
# @param [Hash] opts the optional parameters
|
561
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
562
|
+
def remove_job_with_http_info(project_id, job_id, opts = {})
|
563
|
+
if @api_client.config.debugging
|
564
|
+
@api_client.config.logger.debug "Calling API: QcApi.remove_job ..."
|
565
|
+
end
|
566
|
+
# verify the required parameter 'project_id' is set
|
567
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
568
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.remove_job"
|
569
|
+
end
|
570
|
+
# verify the required parameter 'job_id' is set
|
571
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
572
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling QcApi.remove_job"
|
573
|
+
end
|
574
|
+
# resource path
|
575
|
+
local_var_path = "/projects/{project_id}/jobs/{job_id}.json".sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)
|
576
|
+
|
577
|
+
# query parameters
|
578
|
+
query_params = {}
|
579
|
+
|
580
|
+
# header parameters
|
581
|
+
header_params = {}
|
582
|
+
# HTTP header 'Accept' (if needed)
|
583
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
584
|
+
# HTTP header 'Content-Type'
|
585
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
586
|
+
|
587
|
+
# form parameters
|
588
|
+
form_params = {}
|
589
|
+
|
590
|
+
# http body (model)
|
591
|
+
post_body = nil
|
592
|
+
auth_names = ['apiKey']
|
593
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
594
|
+
:header_params => header_params,
|
595
|
+
:query_params => query_params,
|
596
|
+
:form_params => form_params,
|
597
|
+
:body => post_body,
|
598
|
+
:auth_names => auth_names)
|
599
|
+
if @api_client.config.debugging
|
600
|
+
@api_client.config.logger.debug "API called: QcApi#remove_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
601
|
+
end
|
602
|
+
return data, status_code, headers
|
603
|
+
end
|
604
|
+
|
605
|
+
#
|
606
|
+
#
|
607
|
+
# @param project_id
|
608
|
+
# @param [Hash] opts the optional parameters
|
609
|
+
# @return [nil]
|
610
|
+
def remove_project(project_id, opts = {})
|
611
|
+
remove_project_with_http_info(project_id, opts)
|
612
|
+
return nil
|
613
|
+
end
|
614
|
+
|
615
|
+
#
|
616
|
+
#
|
617
|
+
# @param project_id
|
618
|
+
# @param [Hash] opts the optional parameters
|
619
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
620
|
+
def remove_project_with_http_info(project_id, opts = {})
|
621
|
+
if @api_client.config.debugging
|
622
|
+
@api_client.config.logger.debug "Calling API: QcApi.remove_project ..."
|
623
|
+
end
|
624
|
+
# verify the required parameter 'project_id' is set
|
625
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
626
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.remove_project"
|
627
|
+
end
|
628
|
+
# resource path
|
629
|
+
local_var_path = "/projects/{project_id}.json".sub('{' + 'project_id' + '}', project_id.to_s)
|
630
|
+
|
631
|
+
# query parameters
|
632
|
+
query_params = {}
|
633
|
+
|
634
|
+
# header parameters
|
635
|
+
header_params = {}
|
636
|
+
# HTTP header 'Accept' (if needed)
|
637
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
638
|
+
# HTTP header 'Content-Type'
|
639
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
640
|
+
|
641
|
+
# form parameters
|
642
|
+
form_params = {}
|
643
|
+
|
644
|
+
# http body (model)
|
645
|
+
post_body = nil
|
646
|
+
auth_names = ['apiKey']
|
647
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
648
|
+
:header_params => header_params,
|
649
|
+
:query_params => query_params,
|
650
|
+
:form_params => form_params,
|
651
|
+
:body => post_body,
|
652
|
+
:auth_names => auth_names)
|
653
|
+
if @api_client.config.debugging
|
654
|
+
@api_client.config.logger.debug "API called: QcApi#remove_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
655
|
+
end
|
656
|
+
return data, status_code, headers
|
657
|
+
end
|
658
|
+
|
659
|
+
#
|
660
|
+
#
|
661
|
+
# @param project_id A unique identifier of a Project.
|
662
|
+
# @param job_id A unique identifier of a Job.
|
663
|
+
# @param [Hash] opts the optional parameters
|
664
|
+
# @return [Hash<String, String>]
|
665
|
+
def signed_urls(project_id, job_id, opts = {})
|
666
|
+
data, _status_code, _headers = signed_urls_with_http_info(project_id, job_id, opts)
|
667
|
+
return data
|
668
|
+
end
|
669
|
+
|
670
|
+
#
|
671
|
+
#
|
672
|
+
# @param project_id A unique identifier of a Project.
|
673
|
+
# @param job_id A unique identifier of a Job.
|
674
|
+
# @param [Hash] opts the optional parameters
|
675
|
+
# @return [Array<(Hash<String, String>, Fixnum, Hash)>] Hash<String, String> data, response status code and response headers
|
676
|
+
def signed_urls_with_http_info(project_id, job_id, opts = {})
|
677
|
+
if @api_client.config.debugging
|
678
|
+
@api_client.config.logger.debug "Calling API: QcApi.signed_urls ..."
|
679
|
+
end
|
680
|
+
# verify the required parameter 'project_id' is set
|
681
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
682
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.signed_urls"
|
683
|
+
end
|
684
|
+
# verify the required parameter 'job_id' is set
|
685
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
686
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling QcApi.signed_urls"
|
687
|
+
end
|
688
|
+
# resource path
|
689
|
+
local_var_path = "/projects/{project_id}/jobs/{job_id}/signed-urls.json".sub('{' + 'project_id' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)
|
690
|
+
|
691
|
+
# query parameters
|
692
|
+
query_params = {}
|
693
|
+
|
694
|
+
# header parameters
|
695
|
+
header_params = {}
|
696
|
+
# HTTP header 'Accept' (if needed)
|
697
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
698
|
+
# HTTP header 'Content-Type'
|
699
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
700
|
+
|
701
|
+
# form parameters
|
702
|
+
form_params = {}
|
703
|
+
|
704
|
+
# http body (model)
|
705
|
+
post_body = nil
|
706
|
+
auth_names = ['apiKey']
|
707
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
708
|
+
:header_params => header_params,
|
709
|
+
:query_params => query_params,
|
710
|
+
:form_params => form_params,
|
711
|
+
:body => post_body,
|
712
|
+
:auth_names => auth_names,
|
713
|
+
:return_type => 'Hash<String, String>')
|
714
|
+
if @api_client.config.debugging
|
715
|
+
@api_client.config.logger.debug "API called: QcApi#signed_urls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
716
|
+
end
|
717
|
+
return data, status_code, headers
|
718
|
+
end
|
719
|
+
|
720
|
+
# Creates an upload session
|
721
|
+
#
|
722
|
+
# @param project_id A unique identifier of a Project.
|
723
|
+
# @param video_upload_body
|
724
|
+
# @param [Hash] opts the optional parameters
|
725
|
+
# @return [UploadSession]
|
726
|
+
def upload_video(project_id, video_upload_body, opts = {})
|
727
|
+
data, _status_code, _headers = upload_video_with_http_info(project_id, video_upload_body, opts)
|
728
|
+
return data
|
729
|
+
end
|
730
|
+
|
731
|
+
# Creates an upload session
|
732
|
+
#
|
733
|
+
# @param project_id A unique identifier of a Project.
|
734
|
+
# @param video_upload_body
|
735
|
+
# @param [Hash] opts the optional parameters
|
736
|
+
# @return [Array<(UploadSession, Fixnum, Hash)>] UploadSession data, response status code and response headers
|
737
|
+
def upload_video_with_http_info(project_id, video_upload_body, opts = {})
|
738
|
+
if @api_client.config.debugging
|
739
|
+
@api_client.config.logger.debug "Calling API: QcApi.upload_video ..."
|
740
|
+
end
|
741
|
+
# verify the required parameter 'project_id' is set
|
742
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
743
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling QcApi.upload_video"
|
744
|
+
end
|
745
|
+
# verify the required parameter 'video_upload_body' is set
|
746
|
+
if @api_client.config.client_side_validation && video_upload_body.nil?
|
747
|
+
fail ArgumentError, "Missing the required parameter 'video_upload_body' when calling QcApi.upload_video"
|
748
|
+
end
|
749
|
+
# resource path
|
750
|
+
local_var_path = "/projects/{project_id}/upload.json".sub('{' + 'project_id' + '}', project_id.to_s)
|
751
|
+
|
752
|
+
# query parameters
|
753
|
+
query_params = {}
|
754
|
+
|
755
|
+
# header parameters
|
756
|
+
header_params = {}
|
757
|
+
# HTTP header 'Accept' (if needed)
|
758
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
759
|
+
# HTTP header 'Content-Type'
|
760
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
761
|
+
|
762
|
+
# form parameters
|
763
|
+
form_params = {}
|
764
|
+
|
765
|
+
# http body (model)
|
766
|
+
post_body = @api_client.object_to_http_body(video_upload_body)
|
767
|
+
auth_names = ['apiKey']
|
768
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
769
|
+
:header_params => header_params,
|
770
|
+
:query_params => query_params,
|
771
|
+
:form_params => form_params,
|
772
|
+
:body => post_body,
|
773
|
+
:auth_names => auth_names,
|
774
|
+
:return_type => 'UploadSession')
|
775
|
+
if @api_client.config.debugging
|
776
|
+
@api_client.config.logger.debug "API called: QcApi#upload_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
777
|
+
end
|
778
|
+
return data, status_code, headers
|
779
|
+
end
|
780
|
+
end
|
781
|
+
end
|