Package com.bandwidth.voice.controllers
Class APIController
java.lang.Object
com.bandwidth.controllers.BaseController
com.bandwidth.voice.controllers.APIController
public final class APIController extends BaseController
-
Nested Class Summary
Nested classes/interfaces inherited from class com.bandwidth.controllers.BaseController
BaseController.RequestExecutor, BaseController.RequestSupplier, BaseController.ResponseHandler<T>
-
Field Summary
Fields inherited from class com.bandwidth.controllers.BaseController
authManagers, config, userAgent
-
Constructor Summary
Constructors Constructor Description APIController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers)
-
Method Summary
Modifier and Type Method Description ApiResponse<ApiCallResponse>
createCall(java.lang.String accountId, ApiCreateCallRequest body)
Creates an outbound calljava.util.concurrent.CompletableFuture<ApiResponse<ApiCallResponse>>
createCallAsync(java.lang.String accountId, ApiCreateCallRequest body)
Creates an outbound callApiResponse<java.lang.Void>
createTranscribeRecording(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId, ApiTranscribeRecordingRequest body)
Requests that the specified recording be transcribedjava.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
createTranscribeRecordingAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId, ApiTranscribeRecordingRequest body)
Requests that the specified recording be transcribedApiResponse<java.lang.Void>
deleteRecording(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Deletes the specified recordingjava.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
deleteRecordingAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Deletes the specified recordingApiResponse<java.lang.Void>
deleteRecordingMedia(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Deletes the specified recording's mediajava.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
deleteRecordingMediaAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Deletes the specified recording's mediaApiResponse<java.lang.Void>
deleteRecordingTranscription(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Deletes the specified recording's transcriptionjava.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
deleteRecordingTranscriptionAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Deletes the specified recording's transcriptionApiResponse<ApiCallStateResponse>
getCallState(java.lang.String accountId, java.lang.String callId)
Returns near-realtime metadata about the specified calljava.util.concurrent.CompletableFuture<ApiResponse<ApiCallStateResponse>>
getCallStateAsync(java.lang.String accountId, java.lang.String callId)
Returns near-realtime metadata about the specified callApiResponse<RecordingMetadataResponse>
getMetadataForRecording(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Returns metadata for the specified recordingjava.util.concurrent.CompletableFuture<ApiResponse<RecordingMetadataResponse>>
getMetadataForRecordingAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Returns metadata for the specified recordingApiResponse<java.util.List<RecordingMetadataResponse>>
getQueryMetadataForAccount(java.lang.String accountId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime)
Returns a list of metadata for the recordings associated with the specified account.ApiResponse<java.util.List<RecordingMetadataResponse>>
getQueryMetadataForAccountAndCall(java.lang.String accountId, java.lang.String callId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime)
Returns a (potentially empty) list of metadata for the recordings that took place during the specified calljava.util.concurrent.CompletableFuture<ApiResponse<java.util.List<RecordingMetadataResponse>>>
getQueryMetadataForAccountAndCallAsync(java.lang.String accountId, java.lang.String callId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime)
Returns a (potentially empty) list of metadata for the recordings that took place during the specified calljava.util.concurrent.CompletableFuture<ApiResponse<java.util.List<RecordingMetadataResponse>>>
getQueryMetadataForAccountAsync(java.lang.String accountId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime)
Returns a list of metadata for the recordings associated with the specified account.ApiResponse<TranscriptionResponse>
getRecordingTranscription(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Downloads the specified transcriptionjava.util.concurrent.CompletableFuture<ApiResponse<TranscriptionResponse>>
getRecordingTranscriptionAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Downloads the specified transcriptionApiResponse<java.io.InputStream>
getStreamRecordingMedia(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Downloads the specified recordingjava.util.concurrent.CompletableFuture<ApiResponse<java.io.InputStream>>
getStreamRecordingMediaAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)
Downloads the specified recordingApiResponse<java.lang.Void>
modifyCall(java.lang.String accountId, java.lang.String callId, ApiModifyCallRequest body)
Interrupts and replaces an active call's BXML documentjava.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
modifyCallAsync(java.lang.String accountId, java.lang.String callId, ApiModifyCallRequest body)
Interrupts and replaces an active call's BXML documentApiResponse<java.lang.Void>
modifyCallRecordingState(java.lang.String accountId, java.lang.String callId, ModifyCallRecordingState body)
Pauses or resumes a recordingjava.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>>
modifyCallRecordingStateAsync(java.lang.String accountId, java.lang.String callId, ModifyCallRecordingState body)
Pauses or resumes a recordingMethods inherited from class com.bandwidth.controllers.BaseController
getClientInstance, makeHttpCallAsync, validateResponse
-
Constructor Details
-
APIController
public APIController(Configuration config, HttpClient httpClient, java.util.Map<java.lang.String,AuthManager> authManagers)
-
-
Method Details
-
createCall
public ApiResponse<ApiCallResponse> createCall(java.lang.String accountId, ApiCreateCallRequest body) throws ApiException, java.io.IOExceptionCreates an outbound call- Parameters:
accountId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
createCallAsync
public java.util.concurrent.CompletableFuture<ApiResponse<ApiCallResponse>> createCallAsync(java.lang.String accountId, ApiCreateCallRequest body)Creates an outbound call- Parameters:
accountId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
getCallState
public ApiResponse<ApiCallStateResponse> getCallState(java.lang.String accountId, java.lang.String callId) throws ApiException, java.io.IOExceptionReturns near-realtime metadata about the specified call- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
getCallStateAsync
public java.util.concurrent.CompletableFuture<ApiResponse<ApiCallStateResponse>> getCallStateAsync(java.lang.String accountId, java.lang.String callId)Returns near-realtime metadata about the specified call- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
modifyCall
public ApiResponse<java.lang.Void> modifyCall(java.lang.String accountId, java.lang.String callId, ApiModifyCallRequest body) throws ApiException, java.io.IOExceptionInterrupts and replaces an active call's BXML document- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
modifyCallAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> modifyCallAsync(java.lang.String accountId, java.lang.String callId, ApiModifyCallRequest body)Interrupts and replaces an active call's BXML document- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
modifyCallRecordingState
public ApiResponse<java.lang.Void> modifyCallRecordingState(java.lang.String accountId, java.lang.String callId, ModifyCallRecordingState body) throws ApiException, java.io.IOExceptionPauses or resumes a recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
modifyCallRecordingStateAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> modifyCallRecordingStateAsync(java.lang.String accountId, java.lang.String callId, ModifyCallRecordingState body)Pauses or resumes a recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
getQueryMetadataForAccountAndCall
public ApiResponse<java.util.List<RecordingMetadataResponse>> getQueryMetadataForAccountAndCall(java.lang.String accountId, java.lang.String callId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime) throws ApiException, java.io.IOExceptionReturns a (potentially empty) list of metadata for the recordings that took place during the specified call- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:from
- Optional parameter: Example:to
- Optional parameter: Example:minStartTime
- Optional parameter: Example:maxStartTime
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
- > response from the API call
- Throws:
ApiException
java.io.IOException
-
getQueryMetadataForAccountAndCallAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.util.List<RecordingMetadataResponse>>> getQueryMetadataForAccountAndCallAsync(java.lang.String accountId, java.lang.String callId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime)Returns a (potentially empty) list of metadata for the recordings that took place during the specified call- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:from
- Optional parameter: Example:to
- Optional parameter: Example:minStartTime
- Optional parameter: Example:maxStartTime
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
- > response from the API call
-
getMetadataForRecording
public ApiResponse<RecordingMetadataResponse> getMetadataForRecording(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId) throws ApiException, java.io.IOExceptionReturns metadata for the specified recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
getMetadataForRecordingAsync
public java.util.concurrent.CompletableFuture<ApiResponse<RecordingMetadataResponse>> getMetadataForRecordingAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)Returns metadata for the specified recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
deleteRecording
public ApiResponse<java.lang.Void> deleteRecording(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId) throws ApiException, java.io.IOExceptionDeletes the specified recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
deleteRecordingAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> deleteRecordingAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)Deletes the specified recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
getStreamRecordingMedia
public ApiResponse<java.io.InputStream> getStreamRecordingMedia(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId) throws ApiException, java.io.IOExceptionDownloads the specified recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
getStreamRecordingMediaAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.io.InputStream>> getStreamRecordingMediaAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)Downloads the specified recording- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
deleteRecordingMedia
public ApiResponse<java.lang.Void> deleteRecordingMedia(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId) throws ApiException, java.io.IOExceptionDeletes the specified recording's media- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
deleteRecordingMediaAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> deleteRecordingMediaAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)Deletes the specified recording's media- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
getRecordingTranscription
public ApiResponse<TranscriptionResponse> getRecordingTranscription(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId) throws ApiException, java.io.IOExceptionDownloads the specified transcription- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
getRecordingTranscriptionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<TranscriptionResponse>> getRecordingTranscriptionAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)Downloads the specified transcription- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
createTranscribeRecording
public ApiResponse<java.lang.Void> createTranscribeRecording(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId, ApiTranscribeRecordingRequest body) throws ApiException, java.io.IOExceptionRequests that the specified recording be transcribed- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
createTranscribeRecordingAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> createTranscribeRecordingAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId, ApiTranscribeRecordingRequest body)Requests that the specified recording be transcribed- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:body
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
deleteRecordingTranscription
public ApiResponse<java.lang.Void> deleteRecordingTranscription(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId) throws ApiException, java.io.IOExceptionDeletes the specified recording's transcription- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call - Throws:
ApiException
java.io.IOException
-
deleteRecordingTranscriptionAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.lang.Void>> deleteRecordingTranscriptionAsync(java.lang.String accountId, java.lang.String callId, java.lang.String recordingId)Deletes the specified recording's transcription- Parameters:
accountId
- Required parameter: Example:callId
- Required parameter: Example:recordingId
- Required parameter: Example:- Returns:
- Returns the ApiResponse
response from the API call
-
getQueryMetadataForAccount
public ApiResponse<java.util.List<RecordingMetadataResponse>> getQueryMetadataForAccount(java.lang.String accountId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime) throws ApiException, java.io.IOExceptionReturns 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:
accountId
- Required parameter: Example:from
- Optional parameter: Example:to
- Optional parameter: Example:minStartTime
- Optional parameter: Example:maxStartTime
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
- > response from the API call
- Throws:
ApiException
java.io.IOException
-
getQueryMetadataForAccountAsync
public java.util.concurrent.CompletableFuture<ApiResponse<java.util.List<RecordingMetadataResponse>>> getQueryMetadataForAccountAsync(java.lang.String accountId, java.lang.String from, java.lang.String to, java.lang.String minStartTime, java.lang.String maxStartTime)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:
accountId
- Required parameter: Example:from
- Optional parameter: Example:to
- Optional parameter: Example:minStartTime
- Optional parameter: Example:maxStartTime
- Optional parameter: Example:- Returns:
- Returns the ApiResponse
- > response from the API call
-