/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return ApiResponse<JobId> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<JobId> postVrpWithHttpInfo(String key, Request body) throws ApiException { com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Return the solution associated to the jobId * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * @param key your API key (required) * @param jobId Request solution with jobId (required) * @return ApiResponse<Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Response> getSolutionWithHttpInfo(String key, String jobId) throws ApiException { com.squareup.okhttp.Call call = getSolutionValidateBeforeCall(key, jobId, null, null); Type localVarReturnType = new TypeToken<Response>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Matrix API Post * The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request. * @param key Get your key at graphhopper.com (required) * @param body (optional) * @return ApiResponse<MatrixResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<MatrixResponse> matrixPostWithHttpInfo(String key, MatrixRequest body) throws ApiException { com.squareup.okhttp.Call call = matrixPostValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<MatrixResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Execute a Geocoding request * This endpoint provides forward and reverse geocoding. For more details, review the official documentation at: https://graphhopper.com/api/1/docs/geocoding/ * @param key Get your key at graphhopper.com (required) * @param q If you do forward geocoding, then this would be a textual description of the address you are looking for (optional) * @param locale Display the search results for the specified locale. Currently French (fr), English (en), German (de) and Italian (it) are supported. If the locale wasn't found the default (en) is used. (optional) * @param limit Specify the maximum number of returned results (optional) * @param reverse Set to true to do a reverse Geocoding request, see point parameter (optional) * @param point The location bias in the format 'latitude,longitude' e.g. point=45.93272,11.58803 (optional) * @param provider Can be either, default, nominatim, opencagedata (optional) * @return ApiResponse<GeocodingResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<GeocodingResponse> geocodeGetWithHttpInfo(String key, String q, String locale, Integer limit, Boolean reverse, String point, String provider) throws ApiException { com.squareup.okhttp.Call call = geocodeGetValidateBeforeCall(key, q, locale, limit, reverse, point, provider, null, null); Type localVarReturnType = new TypeToken<GeocodingResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Matrix API * The Matrix API is part of the GraphHopper Directions API and with this API you can calculate many-to-many distances, times or routes a lot more efficient than calling the Routing API multiple times. In the Routing API we support multiple points, so called 'via points', which results in one route being calculated. The Matrix API results in NxM routes or more precise NxM weights, distances or times being calculated but is a lot faster compared to NxM single requests. The most simple example is a tourist trying to decide which pizza is close to him instead of using beeline distance she can calculate a 1x4 matrix. Or a delivery service in the need of often big NxN matrices to solve vehicle routing problems. E.g. the GraphHopper Route Optimization API uses the Matrix API under the hood to achieve this. * @param key Get your key at graphhopper.com (required) * @param point Specifiy multiple points for which the weight-, route-, time- or distance-matrix should be calculated. In this case the starts are identical to the destinations. If there are N points, then NxN entries will be calculated. The order of the point parameter is important. Specify at least three points. Cannot be used together with from_point or to_point. Is a string with the format latitude,longitude. (optional) * @param fromPoint The starting points for the routes. E.g. if you want to calculate the three routes A-&gt;1, A-&gt;2, A-&gt;3 then you have one from_point parameter and three to_point parameters. Is a string with the format latitude,longitude. (optional) * @param toPoint The destination points for the routes. Is a string with the format latitude,longitude. (optional) * @param outArray Specifies which arrays should be included in the response. Specify one or more of the following options 'weights', 'times', 'distances'. To specify more than one array use e.g. out_array=times&out_array=distances. The units of the entries of distances are meters, of times are seconds and of weights is arbitrary and it can differ for different vehicles or versions of this API. (optional) * @param vehicle The vehicle for which the route should be calculated. Other vehicles are foot, bike, mtb, racingbike, motorcycle, small_truck, bus and truck. See here for the details. (optional, default to car) * @return ApiResponse<MatrixResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<MatrixResponse> matrixGetWithHttpInfo(String key, List<String> point, String fromPoint, String toPoint, List<String> outArray, String vehicle) throws ApiException { com.squareup.okhttp.Call call = matrixGetValidateBeforeCall(key, point, fromPoint, toPoint, outArray, vehicle, null, null); Type localVarReturnType = new TypeToken<MatrixResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Return the solution associated to the jobId * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * @param key your API key (required) * @param jobId Request solution with jobId (required) * @return Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Response getSolution(String key, String jobId) throws ApiException { ApiResponse<Response> resp = getSolutionWithHttpInfo(key, jobId); return resp.getData(); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return JobId * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public JobId postVrp(String key, Request body) throws ApiException { ApiResponse<JobId> resp = postVrpWithHttpInfo(key, body); return resp.getData(); }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call matrixGetValidateBeforeCall(String key, List<String> point, List<String> fromPoint, List<String> toPoint, List<String> pointHint, List<String> fromPointHint, List<String> toPointHint, List<String> outArray, String vehicle, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling matrixGet(Async)"); } com.squareup.okhttp.Call call = matrixGetCall(key, point, fromPoint, toPoint, pointHint, fromPointHint, toPointHint, outArray, vehicle, progressListener, progressRequestListener); return call; }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call geocodeGetValidateBeforeCall(String key, String q, String locale, Integer limit, Boolean reverse, String point, String provider, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling geocodeGet(Async)"); } com.squareup.okhttp.Call call = geocodeGetCall(key, q, locale, limit, reverse, point, provider, progressListener, progressRequestListener); return call; }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call matrixPostValidateBeforeCall(String key, MatrixRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling matrixPost(Async)"); } com.squareup.okhttp.Call call = matrixPostCall(key, body, progressListener, progressRequestListener); return call; }
/** * Matrix API Post * The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request. * @param key Get your key at graphhopper.com (required) * @param body (optional) * @return MatrixResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public MatrixResponse matrixPost(String key, MatrixRequest body) throws ApiException { ApiResponse<MatrixResponse> resp = matrixPostWithHttpInfo(key, body); return resp.getData(); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return ApiResponse<JobId> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<JobId> postVrpWithHttpInfo(String key, Request body) throws ApiException { com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Return the solution associated to the jobId * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * @param key your API key (required) * @param jobId Request solution with jobId (required) * @return ApiResponse<Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Response> getSolutionWithHttpInfo(String key, String jobId) throws ApiException { com.squareup.okhttp.Call call = getSolutionValidateBeforeCall(key, jobId, null, null); Type localVarReturnType = new TypeToken<Response>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Matrix API Post * The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request. * @param key Get your key at graphhopper.com (required) * @param body (optional) * @return ApiResponse<MatrixResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<MatrixResponse> matrixPostWithHttpInfo(String key, MatrixRequest body) throws ApiException { com.squareup.okhttp.Call call = matrixPostValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<MatrixResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Return the solution associated to the jobId * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * @param key your API key (required) * @param jobId Request solution with jobId (required) * @return Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Response getSolution(String key, String jobId) throws ApiException { ApiResponse<Response> resp = getSolutionWithHttpInfo(key, jobId); return resp.getData(); }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return JobId * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public JobId postVrp(String key, Request body) throws ApiException { ApiResponse<JobId> resp = postVrpWithHttpInfo(key, body); return resp.getData(); }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call matrixGetValidateBeforeCall(String key, List<String> point, String fromPoint, String toPoint, List<String> outArray, String vehicle, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'key' is set if (key == null) { throw new ApiException("Missing the required parameter 'key' when calling matrixGet(Async)"); } com.squareup.okhttp.Call call = matrixGetCall(key, point, fromPoint, toPoint, outArray, vehicle, progressListener, progressRequestListener); return call; }
/** * Solves vehicle routing problems * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. * @param key your API key (required) * @param body Request object that contains the problem to be solved (required) * @return ApiResponse<JobId> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<JobId> postVrpWithHttpInfo(String key, Request body) throws ApiException { com.squareup.okhttp.Call call = postVrpValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<JobId>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Return the solution associated to the jobId * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. * @param key your API key (required) * @param jobId Request solution with jobId (required) * @return ApiResponse<Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<Response> getSolutionWithHttpInfo(String key, String jobId) throws ApiException { com.squareup.okhttp.Call call = getSolutionValidateBeforeCall(key, jobId, null, null); Type localVarReturnType = new TypeToken<Response>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
/** * Matrix API Post * The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request. * @param key Get your key at graphhopper.com (required) * @param body (optional) * @return ApiResponse<MatrixResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<MatrixResponse> matrixPostWithHttpInfo(String key, MatrixRequest body) throws ApiException { com.squareup.okhttp.Call call = matrixPostValidateBeforeCall(key, body, null, null); Type localVarReturnType = new TypeToken<MatrixResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }