Package com.targomo.client.api.request
Class TimeRequest
java.lang.Object
com.targomo.client.api.request.TimeRequest
Calculates travel times from each source point to each target.
Only accepts
HttpMethod POST.-
Constructor Summary
ConstructorsConstructorDescriptionTimeRequest(TravelOptions travelOptions) Use default client implementation with specified options and method Default client usesClientBuilder.TimeRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions) Use a custom client implementation with specified options and methodTimeRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions, javax.ws.rs.core.MultivaluedMap<String, Object> headers) Use a custom client implementation with specified options and method -
Method Summary
-
Constructor Details
-
TimeRequest
Use default client implementation with specified options and method Default client usesClientBuilder.- Parameters:
travelOptions- Options to be used
-
TimeRequest
Use a custom client implementation with specified options and method- Parameters:
client- Client implementation to be usedtravelOptions- Options to be used
-
TimeRequest
public TimeRequest(javax.ws.rs.client.Client client, TravelOptions travelOptions, javax.ws.rs.core.MultivaluedMap<String, Object> headers) Use a custom client implementation with specified options and method- Parameters:
client- Client implementation to be usedtravelOptions- Options to be usedheaders- if required, headers can be attached to this request
-
-
Method Details
-
get
public TimeResponse get() throws TargomoClientException, javax.ws.rs.ProcessingException, ResponseErrorExceptionExecute request- Returns:
- Time response
- Throws:
TargomoClientException- In case of error other than Gateway Timeoutjavax.ws.rs.ProcessingExceptionResponseErrorException
-
toCurl
For debugging.- Returns:
- the request as curl String
- Throws:
TargomoClientException- when error occurred during parsing of the travel options
-