public abstract class NbmapDirections extends com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>
Requesting a route at a bare minimal must include, a Nbmap access token, destination, and an origin.
| Modifier and Type | Class and Description |
|---|---|
static class |
NbmapDirections.Builder
This builder is used to create a new request to the Nbmap Directions API.
|
| Modifier | Constructor and Description |
|---|---|
protected |
NbmapDirections() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
baseUrl() |
static NbmapDirections.Builder |
builder()
Build a new
NbmapDirections object with the initial values set for
baseUrl(), profile(), user(), and geometries(). |
void |
enqueueCall(retrofit2.Callback<com.nbmap.api.directions.v5.models.DirectionsResponse> callback)
Wrapper method for Retrofits
Call.enqueue(Callback) call returning a response specific
to the Directions API. |
retrofit2.Response<com.nbmap.api.directions.v5.models.DirectionsResponse> |
executeCall()
Wrapper method for Retrofits
Call.execute() call returning a response specific to the
Directions API. |
protected com.google.gson.GsonBuilder |
getGsonBuilder() |
protected okhttp3.OkHttpClient |
getOkHttpClient() |
protected retrofit2.Call<com.nbmap.api.directions.v5.models.DirectionsResponse> |
initializeCall() |
abstract NbmapDirections.Builder |
toBuilder()
Returns the builder which created this instance of
NbmapDirections and allows for
modification and building a new directions request with new information. |
protected retrofit2.Call<com.nbmap.api.directions.v5.models.DirectionsResponse> initializeCall()
initializeCall in class com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>protected com.google.gson.GsonBuilder getGsonBuilder()
getGsonBuilder in class com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>public retrofit2.Response<com.nbmap.api.directions.v5.models.DirectionsResponse> executeCall()
throws java.io.IOException
Call.execute() call returning a response specific to the
Directions API.executeCall in class com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>java.io.IOException - Signals that an I/O exception of some sort has occurredpublic void enqueueCall(retrofit2.Callback<com.nbmap.api.directions.v5.models.DirectionsResponse> callback)
Call.enqueue(Callback) call returning a response specific
to the Directions API. Use this method to make a directions request on the Main Thread.enqueueCall in class com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>callback - a Callback which is used once the DirectionsResponse is
created.protected okhttp3.OkHttpClient getOkHttpClient()
getOkHttpClient in class com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>@NonNull protected abstract java.lang.String baseUrl()
baseUrl in class com.nbmap.core.NbmapService<com.nbmap.api.directions.v5.models.DirectionsResponse,DirectionsService>public static NbmapDirections.Builder builder()
NbmapDirections object with the initial values set for
baseUrl(), profile(), user(), and geometries().NbmapDirections.Builder object for creating this objectpublic abstract NbmapDirections.Builder toBuilder()
NbmapDirections and allows for
modification and building a new directions request with new information.NbmapDirections.Builder with the same variables set as this directions object