Class: TelestreamCloud::Tts::TtsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/telestream_cloud_tts/api/tts_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TtsApi

Returns a new instance of TtsApi.



19
20
21
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#corpora(project_id, opts = {}) ⇒ CorporaCollection

Returns a collection of Corpora Returns a collection of Corpora

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 28

def corpora(project_id, opts = {})
  data, _status_code, _headers = corpora_with_http_info(project_id, opts)
  return data
end

#corpora_with_http_info(project_id, opts = {}) ⇒ Array<(CorporaCollection, Fixnum, Hash)>

Returns a collection of Corpora Returns a collection of Corpora

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CorporaCollection, Fixnum, Hash)>)

    CorporaCollection data, response status code and response headers



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 38

def corpora_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.corpora ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.corpora"
  end
  # resource path
  local_var_path = "/projects/{projectID}/corpora".sub('{' + 'projectID' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CorporaCollection')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#corpora\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#corpus(project_id, name, opts = {}) ⇒ Corpus

Returns the Corpus Returns the Corpus

Parameters:

  • project_id

    ID of the Project

  • name

    Corpus name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



84
85
86
87
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 84

def corpus(project_id, name, opts = {})
  data, _status_code, _headers = corpus_with_http_info(project_id, name, opts)
  return data
end

#corpus_with_http_info(project_id, name, opts = {}) ⇒ Array<(Corpus, Fixnum, Hash)>

Returns the Corpus Returns the Corpus

Parameters:

  • project_id

    ID of the Project

  • name

    Corpus name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Corpus, Fixnum, Hash)>)

    Corpus data, response status code and response headers



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 95

def corpus_with_http_info(project_id, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.corpus ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.corpus"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling TtsApi.corpus"
  end
  # resource path
  local_var_path = "/projects/{projectID}/corpora/{name}".sub('{' + 'projectID' + '}', project_id.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Corpus')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#corpus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_corpus(project_id, name, body, opts = {}) ⇒ nil

Creates a new Corpus Creates a new Corpus

Parameters:

  • project_id

    ID of the Project

  • name

    Corpus name

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


146
147
148
149
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 146

def create_corpus(project_id, name, body, opts = {})
  create_corpus_with_http_info(project_id, name, body, opts)
  return nil
end

#create_corpus_with_http_info(project_id, name, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Creates a new Corpus Creates a new Corpus

Parameters:

  • project_id

    ID of the Project

  • name

    Corpus name

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 158

def create_corpus_with_http_info(project_id, name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.create_corpus ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.create_corpus"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling TtsApi.create_corpus"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TtsApi.create_corpus"
  end
  # resource path
  local_var_path = "/projects/{projectID}/corpora/{name}".sub('{' + 'projectID' + '}', project_id.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#create_corpus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_job(project_id, job, opts = {}) ⇒ Job

Creates a new Job Creates a new Job

Parameters:

  • project_id

    ID of the Project

  • job
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



211
212
213
214
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 211

def create_job(project_id, job, opts = {})
  data, _status_code, _headers = create_job_with_http_info(project_id, job, opts)
  return data
end

#create_job_with_http_info(project_id, job, opts = {}) ⇒ Array<(Job, Fixnum, Hash)>

Creates a new Job Creates a new Job

Parameters:

  • project_id

    ID of the Project

  • job
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Job, Fixnum, Hash)>)

    Job data, response status code and response headers



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 222

def create_job_with_http_info(project_id, job, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.create_job ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.create_job"
  end
  # verify the required parameter 'job' is set
  if @api_client.config.client_side_validation && job.nil?
    fail ArgumentError, "Missing the required parameter 'job' when calling TtsApi.create_job"
  end
  # resource path
  local_var_path = "/projects/{projectID}/jobs".sub('{' + 'projectID' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(job)
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Job')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#create_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project(project, opts = {}) ⇒ Project

Creates a new Project Creates a new Project

Parameters:

  • project
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



271
272
273
274
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 271

def create_project(project, opts = {})
  data, _status_code, _headers = create_project_with_http_info(project, opts)
  return data
end

#create_project_with_http_info(project, opts = {}) ⇒ Array<(Project, Fixnum, Hash)>

Creates a new Project Creates a new Project

Parameters:

  • project
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Project, Fixnum, Hash)>)

    Project data, response status code and response headers



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 281

def create_project_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.create_project ..."
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling TtsApi.create_project"
  end
  # resource path
  local_var_path = "/projects"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(project)
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Project')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_corpus(project_id, name, opts = {}) ⇒ nil

Creates a new Corpus Creates a new Corpus

Parameters:

  • project_id

    ID of the Project

  • name

    Corpus name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


327
328
329
330
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 327

def delete_corpus(project_id, name, opts = {})
  delete_corpus_with_http_info(project_id, name, opts)
  return nil
end

#delete_corpus_with_http_info(project_id, name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Creates a new Corpus Creates a new Corpus

Parameters:

  • project_id

    ID of the Project

  • name

    Corpus name

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 338

def delete_corpus_with_http_info(project_id, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.delete_corpus ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.delete_corpus"
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling TtsApi.delete_corpus"
  end
  # resource path
  local_var_path = "/projects/{projectID}/corpora/{name}".sub('{' + 'projectID' + '}', project_id.to_s).sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#delete_corpus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_job(project_id, job_id, opts = {}) ⇒ nil

Deletes the Job Deletes the Job

Parameters:

  • project_id

    ID of the Project

  • job_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


387
388
389
390
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 387

def delete_job(project_id, job_id, opts = {})
  delete_job_with_http_info(project_id, job_id, opts)
  return nil
end

#delete_job_with_http_info(project_id, job_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Deletes the Job Deletes the Job

Parameters:

  • project_id

    ID of the Project

  • job_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 398

def delete_job_with_http_info(project_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.delete_job ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.delete_job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TtsApi.delete_job"
  end
  # resource path
  local_var_path = "/projects/{projectID}/jobs/{id}".sub('{' + 'projectID' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#delete_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_project(opts = {}) ⇒ nil

Deletes the Project Deletes the Project

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


445
446
447
448
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 445

def delete_project(opts = {})
  delete_project_with_http_info(opts)
  return nil
end

#delete_project_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Deletes the Project Deletes the Project

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 454

def delete_project_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.delete_project ..."
  end
  # resource path
  local_var_path = "/projects/{projectID}"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#job(project_id, job_id, opts = {}) ⇒ Job

Returns the Job Returns the Job

Parameters:

  • project_id

    ID of the Project

  • job_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



495
496
497
498
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 495

def job(project_id, job_id, opts = {})
  data, _status_code, _headers = job_with_http_info(project_id, job_id, opts)
  return data
end

#job_result(project_id, job_id, opts = {}) ⇒ JobResult

Returns the Job Result Returns the Job Result

Parameters:

  • project_id

    ID of the Project

  • job_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



556
557
558
559
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 556

def job_result(project_id, job_id, opts = {})
  data, _status_code, _headers = job_result_with_http_info(project_id, job_id, opts)
  return data
end

#job_result_with_http_info(project_id, job_id, opts = {}) ⇒ Array<(JobResult, Fixnum, Hash)>

Returns the Job Result Returns the Job Result

Parameters:

  • project_id

    ID of the Project

  • job_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(JobResult, Fixnum, Hash)>)

    JobResult data, response status code and response headers



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 567

def job_result_with_http_info(project_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.job_result ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.job_result"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TtsApi.job_result"
  end
  # resource path
  local_var_path = "/projects/{projectID}/jobs/{id}/result".sub('{' + 'projectID' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'JobResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#job_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#job_with_http_info(project_id, job_id, opts = {}) ⇒ Array<(Job, Fixnum, Hash)>

Returns the Job Returns the Job

Parameters:

  • project_id

    ID of the Project

  • job_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Job, Fixnum, Hash)>)

    Job data, response status code and response headers



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 506

def job_with_http_info(project_id, job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.job ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.job"
  end
  # verify the required parameter 'job_id' is set
  if @api_client.config.client_side_validation && job_id.nil?
    fail ArgumentError, "Missing the required parameter 'job_id' when calling TtsApi.job"
  end
  # resource path
  local_var_path = "/projects/{projectID}/jobs/{id}".sub('{' + 'projectID' + '}', project_id.to_s).sub('{' + 'job_id' + '}', job_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Job')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#jobs(project_id, opts = {}) ⇒ JobsCollection

Returns a collection of Jobs Returns a collection of Jobs

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    page number

  • :per_page (Integer)

    number of records per page

Returns:



618
619
620
621
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 618

def jobs(project_id, opts = {})
  data, _status_code, _headers = jobs_with_http_info(project_id, opts)
  return data
end

#jobs_with_http_info(project_id, opts = {}) ⇒ Array<(JobsCollection, Fixnum, Hash)>

Returns a collection of Jobs Returns a collection of Jobs

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    page number

  • :per_page (Integer)

    number of records per page

Returns:

  • (Array<(JobsCollection, Fixnum, Hash)>)

    JobsCollection data, response status code and response headers



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 630

def jobs_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.jobs ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.jobs"
  end
  # resource path
  local_var_path = "/projects/{projectID}/jobs".sub('{' + 'projectID' + '}', project_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'JobsCollection')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#project(project_id, opts = {}) ⇒ Project

Returns the Project Returns the Project

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



677
678
679
680
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 677

def project(project_id, opts = {})
  data, _status_code, _headers = project_with_http_info(project_id, opts)
  return data
end

#project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Fixnum, Hash)>

Returns the Project Returns the Project

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Project, Fixnum, Hash)>)

    Project data, response status code and response headers



687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 687

def project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.project ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.project"
  end
  # resource path
  local_var_path = "/projects/{projectID}".sub('{' + 'projectID' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Project')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#projects(opts = {}) ⇒ ProjectsCollection

Returns a collection of Projects Returns a collection of Projects

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



731
732
733
734
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 731

def projects(opts = {})
  data, _status_code, _headers = projects_with_http_info(opts)
  return data
end

#projects_with_http_info(opts = {}) ⇒ Array<(ProjectsCollection, Fixnum, Hash)>

Returns a collection of Projects Returns a collection of Projects

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ProjectsCollection, Fixnum, Hash)>)

    ProjectsCollection data, response status code and response headers



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 740

def projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.projects ..."
  end
  # resource path
  local_var_path = "/projects"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectsCollection')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#train_project(project_id, opts = {}) ⇒ nil

Queues training Queues training

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


781
782
783
784
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 781

def train_project(project_id, opts = {})
  train_project_with_http_info(project_id, opts)
  return nil
end

#train_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Queues training Queues training

Parameters:

  • project_id

    ID of the Project

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 791

def train_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.train_project ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.train_project"
  end
  # resource path
  local_var_path = "/projects/{projectID}/train".sub('{' + 'projectID' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#train_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_project(project, opts = {}) ⇒ Project

Updates an existing Project Updates an existing Project

Parameters:

  • project
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



835
836
837
838
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 835

def update_project(project, opts = {})
  data, _status_code, _headers = update_project_with_http_info(project, opts)
  return data
end

#update_project_with_http_info(project, opts = {}) ⇒ Array<(Project, Fixnum, Hash)>

Updates an existing Project Updates an existing Project

Parameters:

  • project
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Project, Fixnum, Hash)>)

    Project data, response status code and response headers



845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 845

def update_project_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.update_project ..."
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling TtsApi.update_project"
  end
  # resource path
  local_var_path = "/projects/{projectID}"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(project)
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Project')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_video(project_id, video_upload_body, opts = {}) ⇒ UploadSession

Creates an upload session

Parameters:

  • project_id

    ID of the Project

  • video_upload_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



891
892
893
894
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 891

def upload_video(project_id, video_upload_body, opts = {})
  data, _status_code, _headers = upload_video_with_http_info(project_id, video_upload_body, opts)
  return data
end

#upload_video_with_http_info(project_id, video_upload_body, opts = {}) ⇒ Array<(UploadSession, Fixnum, Hash)>

Creates an upload session

Parameters:

  • project_id

    ID of the Project

  • video_upload_body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UploadSession, Fixnum, Hash)>)

    UploadSession data, response status code and response headers



902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
# File 'lib/telestream_cloud_tts/api/tts_api.rb', line 902

def upload_video_with_http_info(project_id, video_upload_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TtsApi.upload_video ..."
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TtsApi.upload_video"
  end
  # verify the required parameter 'video_upload_body' is set
  if @api_client.config.client_side_validation && video_upload_body.nil?
    fail ArgumentError, "Missing the required parameter 'video_upload_body' when calling TtsApi.upload_video"
  end
  # resource path
  local_var_path = "/projects/{projectID}/jobs/upload".sub('{' + 'projectID' + '}', project_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(video_upload_body)
  auth_names = ['apiKey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UploadSession')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TtsApi#upload_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end