public class CallsEndpoint extends java.lang.Object
Note: This is an internal object. All functionality is provided publicly by the VoiceClient
class.
Constructor and Description |
---|
CallsEndpoint(HttpWrapper httpWrapper)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CallInfoPage |
get(CallsFilter filter)
List previous and ongoing calls which match the provided filter.
|
CallInfo |
get(java.lang.String uuid)
Get details of a single call, identified by uuid.
|
CallEvent |
post(Call callRequest)
Start a call configured by the provided
Call object. |
ModifyCallResponse |
put(java.lang.String uuid,
java.lang.String action)
Modify an ongoing call.
|
public CallsEndpoint(HttpWrapper httpWrapper)
httpWrapper
- (required) shared HTTP wrapper object used for making REST calls.public CallEvent post(Call callRequest) throws java.io.IOException, NexmoClientException
Call
object.
Requires a JWTAuthMethod
to be provided to the NexmoClient which constructs
callRequest
- A Call object configuring the call to be createdjava.io.IOException
- if an error occurs communicating with the Nexmo APINexmoClientException
- if an error occurs constructing the Nexmo API request or responsepublic CallInfoPage get(CallsFilter filter) throws java.io.IOException, NexmoClientException
filter
- A CallsFilter describing the calls to be searched, or null
for all calls.CallInfo
resultsjava.io.IOException
- if an error occurs communicating with the Nexmo APINexmoClientException
- if an error occurs constructing the Nexmo API request or responsepublic CallInfo get(java.lang.String uuid) throws java.io.IOException, NexmoClientException
uuid
- The uuid of the CallInfo object to be retrievedjava.io.IOException
- if an error occurs communicating with the Nexmo APINexmoClientException
- if an error occurs constructing the Nexmo API request or responsepublic ModifyCallResponse put(java.lang.String uuid, java.lang.String action) throws java.io.IOException, NexmoClientException
Currently this method only supports the "hangup" action.
uuid
- The uuid of the CallInfo object to be modifiedaction
- The word "hangup"java.io.IOException
- if an error occurs communicating with the Nexmo APINexmoClientException
- if an error occurs constructing the Nexmo API request or response