public class NexmoClient extends java.lang.Object
Construct an instance of this object with one or more AuthMethods (providing all the authentication methods
for the APIs you wish to use), and then call getVoiceClient() to obtain a client for the Nexmo Voice API.
Currently this object only constructs and provides access to VoiceClient. In the future it will manage
clients for all of the Nexmo APIs.
| Constructor and Description |
|---|
NexmoClient(AuthMethod... authMethods) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateJwt()
Generate a JWT for the application the client has been configured with.
|
AccountClient |
getAccountClient() |
ApplicationClient |
getApplicationClient() |
InsightClient |
getInsightClient() |
NumbersClient |
getNumbersClient() |
SmsClient |
getSmsClient() |
SnsClient |
getSnsClient() |
VerifyClient |
getVerifyClient() |
VoiceClient |
getVoiceClient() |
void |
setHttpClient(org.apache.http.client.HttpClient client)
Provide an HttpClient that will be used to make requests to the Nexmo API.
|
public NexmoClient(AuthMethod... authMethods)
public void setHttpClient(org.apache.http.client.HttpClient client)
This can be useful, for example, if you must use an HTTP proxy to make requests.
client - A custom-configured HttpClient instance.public AccountClient getAccountClient()
public ApplicationClient getApplicationClient()
public InsightClient getInsightClient()
public NumbersClient getNumbersClient()
public SmsClient getSmsClient()
public SnsClient getSnsClient()
public VerifyClient getVerifyClient()
public VoiceClient getVoiceClient()
public java.lang.String generateJwt() throws NexmoUnacceptableAuthException
NexmoUnacceptableAuthException - if no JWTAuthMethod is available