Class: Bandwidth::RecordingsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bandwidth-sdk/api/recordings_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RecordingsApi

Returns a new instance of RecordingsApi.



19
20
21
# File 'lib/bandwidth-sdk/api/recordings_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/bandwidth-sdk/api/recordings_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_call_transcription(account_id, call_id, recording_id, opts = {}) ⇒ nil

Delete Transcription Deletes the specified recording’s transcription. Note: After the deletion is requested and a ‘204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 29

def delete_call_transcription(, call_id, recording_id, opts = {})
  delete_call_transcription_with_http_info(, call_id, recording_id, opts)
  nil
end

#delete_call_transcription_with_http_info(account_id, call_id, recording_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Transcription Deletes the specified recording&#39;s transcription. Note: After the deletion is requested and a &#x60;204&#x60; is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 41

def delete_call_transcription_with_http_info(, call_id, recording_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_call_transcription ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_call_transcription"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_call_transcription"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_call_transcription"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.delete_call_transcription",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#delete_call_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_recording(account_id, call_id, recording_id, opts = {}) ⇒ nil

Delete Recording Delete the recording information, media and transcription. Note: After the deletion is requested and a ‘204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (nil)


104
105
106
107
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 104

def delete_recording(, call_id, recording_id, opts = {})
  delete_recording_with_http_info(, call_id, recording_id, opts)
  nil
end

#delete_recording_media(account_id, call_id, recording_id, opts = {}) ⇒ nil

Delete Recording Media Deletes the specified recording’s media.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (nil)


179
180
181
182
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 179

def delete_recording_media(, call_id, recording_id, opts = {})
  delete_recording_media_with_http_info(, call_id, recording_id, opts)
  nil
end

#delete_recording_media_with_http_info(account_id, call_id, recording_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Recording Media Deletes the specified recording&#39;s media.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 191

def delete_recording_media_with_http_info(, call_id, recording_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording_media ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording_media"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording_media"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording_media"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.delete_recording_media",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#delete_recording_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_recording_with_http_info(account_id, call_id, recording_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Recording Delete the recording information, media and transcription. Note: After the deletion is requested and a &#x60;204&#x60; is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 116

def delete_recording_with_http_info(, call_id, recording_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.delete_recording ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.delete_recording"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.delete_recording"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.delete_recording"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.delete_recording",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#delete_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#download_call_recording(account_id, call_id, recording_id, opts = {}) ⇒ File

Download Recording Downloads the specified recording.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (File)


254
255
256
257
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 254

def download_call_recording(, call_id, recording_id, opts = {})
  data, _status_code, _headers = download_call_recording_with_http_info(, call_id, recording_id, opts)
  data
end

#download_call_recording_with_http_info(account_id, call_id, recording_id, opts = {}) ⇒ Array<(File, Integer, Hash)>

Download Recording Downloads the specified recording.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>)

    File data, response status code and response headers



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
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
320
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 266

def download_call_recording_with_http_info(, call_id, recording_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.download_call_recording ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.download_call_recording"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.download_call_recording"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.download_call_recording"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['audio/vnd.wave', 'audio/mpeg', 'application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'File'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.download_call_recording",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#download_call_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_call_recording(account_id, call_id, recording_id, opts = {}) ⇒ CallRecordingMetadata

Get Call Recording Returns metadata for the specified recording.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:



329
330
331
332
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 329

def get_call_recording(, call_id, recording_id, opts = {})
  data, _status_code, _headers = get_call_recording_with_http_info(, call_id, recording_id, opts)
  data
end

#get_call_recording_with_http_info(account_id, call_id, recording_id, opts = {}) ⇒ Array<(CallRecordingMetadata, Integer, Hash)>

Get Call Recording Returns metadata for the specified recording.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (Array<(CallRecordingMetadata, Integer, Hash)>)

    CallRecordingMetadata data, response status code and response headers



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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 341

def get_call_recording_with_http_info(, call_id, recording_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.get_call_recording ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.get_call_recording"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.get_call_recording"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.get_call_recording"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CallRecordingMetadata'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.get_call_recording",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#get_call_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_call_transcription(account_id, call_id, recording_id, opts = {}) ⇒ TranscriptionList

Get Transcription Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [‘<PlayAudio>`](/docs/voice/bxml/playAudio) and [`<SpeakSentence>`](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [`<Transfer>`](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:



404
405
406
407
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 404

def get_call_transcription(, call_id, recording_id, opts = {})
  data, _status_code, _headers = get_call_transcription_with_http_info(, call_id, recording_id, opts)
  data
end

#get_call_transcription_with_http_info(account_id, call_id, recording_id, opts = {}) ⇒ Array<(TranscriptionList, Integer, Hash)>

Get Transcription Downloads the specified transcription. If the transcribed recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [&#x60;&lt;PlayAudio&gt;&#x60;](/docs/voice/bxml/playAudio) and [&#x60;&lt;SpeakSentence&gt;&#x60;](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [&#x60;&lt;Transfer&gt;&#x60;](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (Array<(TranscriptionList, Integer, Hash)>)

    TranscriptionList data, response status code and response headers



416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 416

def get_call_transcription_with_http_info(, call_id, recording_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.get_call_transcription ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.get_call_transcription"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.get_call_transcription"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.get_call_transcription"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TranscriptionList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.get_call_transcription",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#get_call_transcription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_account_call_recordings(account_id, opts = {}) ⇒ Array<CallRecordingMetadata>

Get Call Recordings Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

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

    the optional parameters

Options Hash (opts):

  • :to (String)

    Filter results by the &#x60;to&#x60; field.

  • :from (String)

    Filter results by the &#x60;from&#x60; field.

  • :min_start_time (String)

    Filter results to recordings which have a &#x60;startTime&#x60; after or including &#x60;minStartTime&#x60; (in ISO8601 format).

  • :max_start_time (String)

    Filter results to recordings which have a &#x60;startTime&#x60; before &#x60;maxStartTime&#x60; (in ISO8601 format).

Returns:



481
482
483
484
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 481

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

#list_account_call_recordings_with_http_info(account_id, opts = {}) ⇒ Array<(Array<CallRecordingMetadata>, Integer, Hash)>

Get Call Recordings Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

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

    the optional parameters

Options Hash (opts):

  • :to (String)

    Filter results by the &#x60;to&#x60; field.

  • :from (String)

    Filter results by the &#x60;from&#x60; field.

  • :min_start_time (String)

    Filter results to recordings which have a &#x60;startTime&#x60; after or including &#x60;minStartTime&#x60; (in ISO8601 format).

  • :max_start_time (String)

    Filter results to recordings which have a &#x60;startTime&#x60; before &#x60;maxStartTime&#x60; (in ISO8601 format).

Returns:

  • (Array<(Array<CallRecordingMetadata>, Integer, Hash)>)

    Array<CallRecordingMetadata> data, response status code and response headers



495
496
497
498
499
500
501
502
503
504
505
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
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 495

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.list_account_call_recordings ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.list_account_call_recordings"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/recordings'.sub('{' + 'accountId' + '}', CGI.escape(.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'minStartTime'] = opts[:'min_start_time'] if !opts[:'min_start_time'].nil?
  query_params[:'maxStartTime'] = opts[:'max_start_time'] if !opts[:'max_start_time'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<CallRecordingMetadata>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.list_account_call_recordings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#list_account_call_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_call_recordings(account_id, call_id, opts = {}) ⇒ Array<CallRecordingMetadata>

List Call Recordings Returns a (potentially empty) list of metadata for the recordings that took place during the specified call.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

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

    the optional parameters

Returns:



553
554
555
556
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 553

def list_call_recordings(, call_id, opts = {})
  data, _status_code, _headers = list_call_recordings_with_http_info(, call_id, opts)
  data
end

#list_call_recordings_with_http_info(account_id, call_id, opts = {}) ⇒ Array<(Array<CallRecordingMetadata>, Integer, Hash)>

List Call Recordings Returns a (potentially empty) list of metadata for the recordings that took place during the specified call.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

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

    the optional parameters

Returns:

  • (Array<(Array<CallRecordingMetadata>, Integer, Hash)>)

    Array<CallRecordingMetadata> data, response status code and response headers



564
565
566
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
610
611
612
613
614
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 564

def list_call_recordings_with_http_info(, call_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.list_call_recordings ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.list_call_recordings"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.list_call_recordings"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<CallRecordingMetadata>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.list_call_recordings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#list_call_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#transcribe_call_recording(account_id, call_id, recording_id, transcribe_recording, opts = {}) ⇒ nil

Create Transcription Request Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

  • (nil)


624
625
626
627
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 624

def transcribe_call_recording(, call_id, recording_id, transcribe_recording, opts = {})
  transcribe_call_recording_with_http_info(, call_id, recording_id, transcribe_recording, opts)
  nil
end

#transcribe_call_recording_with_http_info(account_id, call_id, recording_id, transcribe_recording, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create Transcription Request Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

  • recording_id (String)

    Programmable Voice API Recording ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 637

def transcribe_call_recording_with_http_info(, call_id, recording_id, transcribe_recording, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.transcribe_call_recording ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.transcribe_call_recording"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.transcribe_call_recording"
  end
  # verify the required parameter 'recording_id' is set
  if @api_client.config.client_side_validation && recording_id.nil?
    fail ArgumentError, "Missing the required parameter 'recording_id' when calling RecordingsApi.transcribe_call_recording"
  end
  # verify the required parameter 'transcribe_recording' is set
  if @api_client.config.client_side_validation && transcribe_recording.nil?
    fail ArgumentError, "Missing the required parameter 'transcribe_recording' when calling RecordingsApi.transcribe_call_recording"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s)).sub('{' + 'recordingId' + '}', CGI.escape(recording_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(transcribe_recording)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.transcribe_call_recording",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#transcribe_call_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_call_recording_state(account_id, call_id, update_call_recording, opts = {}) ⇒ nil

Update Recording Pause or resume a recording on an active phone call.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

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

    the optional parameters

Returns:

  • (nil)


709
710
711
712
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 709

def update_call_recording_state(, call_id, update_call_recording, opts = {})
  update_call_recording_state_with_http_info(, call_id, update_call_recording, opts)
  nil
end

#update_call_recording_state_with_http_info(account_id, call_id, update_call_recording, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Recording Pause or resume a recording on an active phone call.

Parameters:

  • account_id (String)

    Your Bandwidth Account ID.

  • call_id (String)

    Programmable Voice API Call ID.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
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
775
776
777
778
779
780
# File 'lib/bandwidth-sdk/api/recordings_api.rb', line 721

def update_call_recording_state_with_http_info(, call_id, update_call_recording, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RecordingsApi.update_call_recording_state ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling RecordingsApi.update_call_recording_state"
  end
  # verify the required parameter 'call_id' is set
  if @api_client.config.client_side_validation && call_id.nil?
    fail ArgumentError, "Missing the required parameter 'call_id' when calling RecordingsApi.update_call_recording_state"
  end
  # verify the required parameter 'update_call_recording' is set
  if @api_client.config.client_side_validation && update_call_recording.nil?
    fail ArgumentError, "Missing the required parameter 'update_call_recording' when calling RecordingsApi.update_call_recording_state"
  end
  # resource path
  local_var_path = '/accounts/{accountId}/calls/{callId}/recording'.sub('{' + 'accountId' + '}', CGI.escape(.to_s)).sub('{' + 'callId' + '}', CGI.escape(call_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_call_recording)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic']

  new_options = opts.merge(
    :operation => :"RecordingsApi.update_call_recording_state",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RecordingsApi#update_call_recording_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end