public class PlivoClient extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BASE_URL |
protected static java.lang.String |
CALLINSIGHTS_BASE_URL |
protected static java.lang.String |
LOOKUP_BASE_URL |
protected static java.lang.String |
VOICE_BASE_URL |
protected static java.lang.String |
VOICE_FALLBACK1_URL |
protected static java.lang.String |
VOICE_FALLBACK2_URL |
| Constructor and Description |
|---|
PlivoClient(java.lang.String authId,
java.lang.String authToken)
Constructs a new PlivoClient instance.
|
PlivoClient(java.lang.String authId,
java.lang.String authToken,
LogLevel logLevel)
Constructs a new PlivoClient instance.
|
PlivoClient(java.lang.String authId,
java.lang.String authToken,
okhttp3.OkHttpClient.Builder httpClientBuilder)
Constructs a new PlivoClient instance.
|
PlivoClient(java.lang.String authId,
java.lang.String authToken,
okhttp3.OkHttpClient.Builder httpClientBuilder,
LogLevel logLevel)
Constructs a new PlivoClient instance.
|
PlivoClient(java.lang.String authId,
java.lang.String authToken,
okhttp3.OkHttpClient.Builder httpClientBuilder,
java.lang.String baseUrl,
com.fasterxml.jackson.databind.module.SimpleModule simpleModule,
LogLevel logLevel)
Constructs a new PlivoClient instance.
|
| Modifier and Type | Method and Description |
|---|---|
PlivoAPIService |
getApiService() |
java.lang.String |
getAuthId() |
java.lang.String |
getAuthToken() |
CallInsightsAPIService |
getCallInsightsAPIService() |
LookupAPIService |
getLookupAPIService() |
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
PlivoAPIService |
getVoiceApiService() |
PlivoAPIService |
getVoiceFallback1Service() |
PlivoAPIService |
getVoiceFallback2Service() |
boolean |
isTesting() |
void |
setTesting(boolean testing) |
protected static java.lang.String BASE_URL
protected static java.lang.String VOICE_BASE_URL
protected static java.lang.String VOICE_FALLBACK1_URL
protected static java.lang.String VOICE_FALLBACK2_URL
protected static java.lang.String CALLINSIGHTS_BASE_URL
protected static java.lang.String LOOKUP_BASE_URL
public PlivoClient(java.lang.String authId, java.lang.String authToken, okhttp3.OkHttpClient.Builder httpClientBuilder, java.lang.String baseUrl, com.fasterxml.jackson.databind.module.SimpleModule simpleModule, LogLevel logLevel)
new OkHttpClient.Builder()
.proxy(proxy)
.connectTimeout(1, TimeUnit.MINUTES);
authId - authToken - httpClientBuilder - baseUrl - simpleModule - logLevel - public PlivoClient(java.lang.String authId, java.lang.String authToken)
new OkHttpClient.Builder()
.proxy(proxy)
.connectTimeout(1, TimeUnit.MINUTES);
authId - authToken - public PlivoClient(java.lang.String authId, java.lang.String authToken, okhttp3.OkHttpClient.Builder httpClientBuilder)
new OkHttpClient.Builder()
.proxy(proxy)
.connectTimeout(1, TimeUnit.MINUTES);
authId - authToken - httpClientBuilder - public PlivoClient(java.lang.String authId, java.lang.String authToken, LogLevel logLevel)
new OkHttpClient.Builder()
.proxy(proxy)
.connectTimeout(1, TimeUnit.MINUTES);
To set Log level you can pass LogLevel enum.It can be set to following values:
NONE - No logs
BASIC - Log request and response line
HEADER - Log request and response line along with their headers
BODY - Log request and response line along with their headers and bodiesauthId - authToken - logLevel - public PlivoClient(java.lang.String authId, java.lang.String authToken, okhttp3.OkHttpClient.Builder httpClientBuilder, LogLevel logLevel)
new OkHttpClient.Builder()
.proxy(proxy)
.connectTimeout(1, TimeUnit.MINUTES);
To set Log level you can pass LogLevel enum.It can be set to following values:
NONE - No logs
BASIC - Log request and response line
HEADER - Log request and response line along with their headers
BODY - Log request and response line along with their headers and bodiesauthId - authToken - httpClientBuilder - logLevel - public void setTesting(boolean testing)
public boolean isTesting()
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public PlivoAPIService getApiService()
public PlivoAPIService getVoiceApiService()
public PlivoAPIService getVoiceFallback1Service()
public PlivoAPIService getVoiceFallback2Service()
public CallInsightsAPIService getCallInsightsAPIService()
public LookupAPIService getLookupAPIService()
public java.lang.String getAuthId()
public java.lang.String getAuthToken()