public class OnlineTrafficApi extends java.lang.Object implements TrafficApi
DEFAULT_ONLINE_TRAFFIC_API_VERSION, DEFAULT_ONLINE_TRAFFIC_ENDPOINT| Modifier and Type | Method and Description |
|---|---|
static TrafficApi |
create(android.content.Context context)
Creates new TrafficApi object which will use provided Traffic API key.
|
static TrafficApi |
create(android.content.Context context,
java.lang.String apiKey)
Creates new TrafficApi object which will use provided Traffic API key.
|
Single<FlowSegmentDataResponse> |
findFlowSegmentData(FlowSegmentDataQuery query)
Performs reactive search action based on provided
FlowSegmentDataQuery object and returns the result to Observers subscribed to returned Observable. |
void |
findFlowSegmentData(FlowSegmentDataQuery query,
FlowSegmentDataResultListener listener)
Performs search action based on provided
FlowSegmentDataQuery object and returns the result with usage of FlowSegmentDataResultListener implementation. |
Single<IncidentDetailsResponse> |
findIncidentDetails(IncidentDetailsQuery query)
Performs reactive search action based on provided
IncidentDetailsQuery object and returns the result to Observers subscribed to returned Observable. |
void |
findIncidentDetails(IncidentDetailsQuery query,
IncidentDetailsResultListener listener)
Performs search action based on provided
IncidentDetailsQuery object and returns the result with usage of IncidentDetailsResultListener implementation. |
Scheduler |
getResultScheduler() |
Scheduler |
getWorkingScheduler() |
public static TrafficApi create(@NonNull android.content.Context context)
context - Android's contextpublic static TrafficApi create(@NonNull android.content.Context context, java.lang.String apiKey)
context - Android's contextpublic Single<FlowSegmentDataResponse> findFlowSegmentData(FlowSegmentDataQuery query)
FlowSegmentDataApiFlowSegmentDataQuery object and returns the result to Observers subscribed to returned Observable.findFlowSegmentData in interface FlowSegmentDataApiquery - Object which contains data necessary to execute search actionFlowSegmentDataResponse's Observable object.public void findFlowSegmentData(FlowSegmentDataQuery query, FlowSegmentDataResultListener listener)
FlowSegmentDataApiFlowSegmentDataQuery object and returns the result with usage of FlowSegmentDataResultListener implementation.findFlowSegmentData in interface FlowSegmentDataApiquery - The object which contains data necessary to execute search action.listener - The listener which informs the subscriber when search result is available. It contains FlowSegmentDataResponse object.public Single<IncidentDetailsResponse> findIncidentDetails(IncidentDetailsQuery query)
IncidentDetailsApiIncidentDetailsQuery object and returns the result to Observers subscribed to returned Observable.findIncidentDetails in interface IncidentDetailsApiquery - Object which contains data necessary to execute search actionIncidentDetailsResponse's Observable object.public void findIncidentDetails(IncidentDetailsQuery query, IncidentDetailsResultListener listener)
IncidentDetailsApiIncidentDetailsQuery object and returns the result with usage of IncidentDetailsResultListener implementation.findIncidentDetails in interface IncidentDetailsApiquery - The object which contains data necessary to execute search action.listener - The listener which informs the subscriber when search result is available. It contains IncidentDetailsResponse object.@NonNull public Scheduler getWorkingScheduler()
getWorkingScheduler in interface com.tomtom.online.sdk.common.rx.RxContext@NonNull public Scheduler getResultScheduler()
getResultScheduler in interface com.tomtom.online.sdk.common.rx.RxContext