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.
|
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 Single<FlowSegmentDataResponse> findFlowSegmentData(FlowSegmentDataQuery query)
FlowSegmentDataApi
FlowSegmentDataQuery
object and returns the result to Observers subscribed to returned Observable.findFlowSegmentData
in interface FlowSegmentDataApi
query
- Object which contains data necessary to execute search actionFlowSegmentDataResponse
's Observable object.public void findFlowSegmentData(FlowSegmentDataQuery query, FlowSegmentDataResultListener listener)
FlowSegmentDataApi
FlowSegmentDataQuery
object and returns the result with usage of FlowSegmentDataResultListener
implementation.findFlowSegmentData
in interface FlowSegmentDataApi
query
- 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)
IncidentDetailsApi
IncidentDetailsQuery
object and returns the result to Observers subscribed to returned Observable.findIncidentDetails
in interface IncidentDetailsApi
query
- Object which contains data necessary to execute search actionIncidentDetailsResponse
's Observable object.public void findIncidentDetails(IncidentDetailsQuery query, IncidentDetailsResultListener listener)
IncidentDetailsApi
IncidentDetailsQuery
object and returns the result with usage of IncidentDetailsResultListener
implementation.findIncidentDetails
in interface IncidentDetailsApi
query
- 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