@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call getSolutionValidateBeforeCall(String key, String jobId, 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 getSolution(Async)"); } // verify the required parameter 'jobId' is set if (jobId == null) { throw new ApiException("Missing the required parameter 'jobId' when calling getSolution(Async)"); } com.squareup.okhttp.Call call = getSolutionCall(key, jobId, progressListener, progressRequestListener); return call; }
/** * 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); }
/** * 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(); }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * 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. * * @throws ApiException * if the Api call fails */ @Test public void getSolutionTest() throws ApiException { String key = null; String jobId = null; Response response = api.getSolution(key, jobId); // TODO: test validations }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * 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. * * @throws ApiException * if the Api call fails */ @Test public void getSolutionTest() throws ApiException { String key = null; String jobId = null; Response response = api.getSolution(key, jobId); // TODO: test validations }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * 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); }
/** * 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(); }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call getSolutionValidateBeforeCall(String key, String jobId, 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 getSolution(Async)"); } // verify the required parameter 'jobId' is set if (jobId == null) { throw new ApiException("Missing the required parameter 'jobId' when calling getSolution(Async)"); } com.squareup.okhttp.Call call = getSolutionCall(key, jobId, progressListener, progressRequestListener); return call; }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
/** * 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); }
/** * 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(); }
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call getSolutionValidateBeforeCall(String key, String jobId, 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 getSolution(Async)"); } // verify the required parameter 'jobId' is set if (jobId == null) { throw new ApiException("Missing the required parameter 'jobId' when calling getSolution(Async)"); } com.squareup.okhttp.Call call = getSolutionCall(key, jobId, progressListener, progressRequestListener); return call; }
private void start() throws Exception { Request request = createRequest(); VrpApi vrpApi = new VrpApi(); // enable debugging for sending and receiving requests // ApiClient client = new ApiClient().setDebugging(true); // vrpApi.setApiClient(client); String key = System.getProperty("graphhopper.key", ""); JobId jobId = vrpApi.postVrp(key, request); System.out.println(getClass() + ", jobId: " + jobId.getJobId()); SolutionApi solApi = new SolutionApi(); Response rsp; while (true) { rsp = solApi.getSolution(key, jobId.getJobId()); // System.out.println(rsp); // if(rsp.getStatus() == null) continue; if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { break; } Thread.sleep(200); } System.out.println(rsp); }
com.squareup.okhttp.Call call = getSolutionValidateBeforeCall(key, jobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Response>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);
com.squareup.okhttp.Call call = getSolutionValidateBeforeCall(key, jobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Response>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);
com.squareup.okhttp.Call call = getSolutionValidateBeforeCall(key, jobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<Response>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback);