Package zendesk.core
Interface RestServiceProvider
-
public interface RestServiceProviderA Provider which is used to create RestApis for sub-SDKs. This is used internally by the Zendesk SDKs and should not be used directly by integrators.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description <E> EcreateRestService(java.lang.Class<E> clazz, java.lang.String sdkVersion, java.lang.String sdkVariant)Create a RestApi from the provided class.<E> EcreateRestService(java.lang.Class<E> clazz, java.lang.String sdkVersion, java.lang.String sdkVariant, CustomNetworkConfig customNetworkConfig)Create a RestApi from the provided class, with a configuration class for custom network needs.OkHttpClientgetCoreOkHttpClient()Gets anOkHttpClientthat's not doing zendesk auth and is not caching responses.OkHttpClientgetMediaOkHttpClient()Gets anOkHttpClientthat's doing zendesk auth and is heavily caching responses.
-
-
-
Method Detail
-
createRestService
<E> E createRestService(java.lang.Class<E> clazz, java.lang.String sdkVersion, java.lang.String sdkVariant)Create a RestApi from the provided class.
Uses the internalretrofit2.Retrofitinstance to create requested API.
This should not be used directly by integrators of the Zendesk SDKs.- Type Parameters:
E- type of the returned api- Parameters:
clazz- the Retrofit service interface to create an implementation of
-
createRestService
<E> E createRestService(java.lang.Class<E> clazz, java.lang.String sdkVersion, java.lang.String sdkVariant, CustomNetworkConfig customNetworkConfig)Create a RestApi from the provided class, with a configuration class for custom network needs.
Uses the internal linkretrofit2.Retrofitinstance to create the requested API.
This should not be used directly by integrators of the Zendesdk SDKs.- Type Parameters:
E- type of the returned API- Parameters:
clazz- the Retrofit service interface to create an implementation ofcustomNetworkConfig- a function object which can be used to add custom configuration to the OkHttpClient and Retrofit instances used for the returned API.- Returns:
- an instance of a Retrofit service, with the provided customisation applied to its underlying OkHttpClient and Retrofit instances.
-
getMediaOkHttpClient
OkHttpClient getMediaOkHttpClient()
Gets anOkHttpClientthat's doing zendesk auth and is heavily caching responses.
-
getCoreOkHttpClient
OkHttpClient getCoreOkHttpClient()
Gets anOkHttpClientthat's not doing zendesk auth and is not caching responses.
-
-