
enterprises.orbital.eve.esi.client.api.ContractsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client Show documentation
Show all versions of client Show documentation
Auto-gen build of Java ESI Swagger client using swagger-cli
The newest version!
/*
* EVE Swagger Interface
* An OpenAPI for EVE Online
*
* OpenAPI spec version: 1.2.3
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package enterprises.orbital.eve.esi.client.api;
import enterprises.orbital.eve.esi.client.invoker.ApiCallback;
import enterprises.orbital.eve.esi.client.invoker.ApiClient;
import enterprises.orbital.eve.esi.client.invoker.ApiException;
import enterprises.orbital.eve.esi.client.invoker.ApiResponse;
import enterprises.orbital.eve.esi.client.invoker.Configuration;
import enterprises.orbital.eve.esi.client.invoker.Pair;
import enterprises.orbital.eve.esi.client.invoker.ProgressRequestBody;
import enterprises.orbital.eve.esi.client.invoker.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import enterprises.orbital.eve.esi.client.model.BadRequest;
import enterprises.orbital.eve.esi.client.model.ErrorLimited;
import enterprises.orbital.eve.esi.client.model.Forbidden;
import enterprises.orbital.eve.esi.client.model.GatewayTimeout;
import enterprises.orbital.eve.esi.client.model.GetCharactersCharacterIdContracts200Ok;
import enterprises.orbital.eve.esi.client.model.GetCharactersCharacterIdContractsContractIdBids200Ok;
import enterprises.orbital.eve.esi.client.model.GetCharactersCharacterIdContractsContractIdBidsNotFound;
import enterprises.orbital.eve.esi.client.model.GetCharactersCharacterIdContractsContractIdItems200Ok;
import enterprises.orbital.eve.esi.client.model.GetCharactersCharacterIdContractsContractIdItemsNotFound;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicBidsContractId200Ok;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicBidsContractIdForbidden;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicBidsContractIdNotFound;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicItemsContractId200Ok;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicItemsContractIdForbidden;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicItemsContractIdNotFound;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicRegionId200Ok;
import enterprises.orbital.eve.esi.client.model.GetContractsPublicRegionIdNotFound;
import enterprises.orbital.eve.esi.client.model.GetCorporationsCorporationIdContracts200Ok;
import enterprises.orbital.eve.esi.client.model.GetCorporationsCorporationIdContractsContractIdBids200Ok;
import enterprises.orbital.eve.esi.client.model.GetCorporationsCorporationIdContractsContractIdBidsNotFound;
import enterprises.orbital.eve.esi.client.model.GetCorporationsCorporationIdContractsContractIdItems200Ok;
import enterprises.orbital.eve.esi.client.model.GetCorporationsCorporationIdContractsContractIdItemsError520;
import enterprises.orbital.eve.esi.client.model.GetCorporationsCorporationIdContractsContractIdItemsNotFound;
import enterprises.orbital.eve.esi.client.model.InternalServerError;
import enterprises.orbital.eve.esi.client.model.ServiceUnavailable;
import enterprises.orbital.eve.esi.client.model.Unauthorized;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ContractsApi {
private ApiClient apiClient;
public ContractsApi() {
this(Configuration.getDefaultApiClient());
}
public ContractsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/* Build call for getCharactersCharacterIdContracts */
private com.squareup.okhttp.Call getCharactersCharacterIdContractsCall(Integer characterId, String datasource, String ifNoneMatch, Integer page, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/characters/{character_id}/contracts/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "character_id" + "\\}", apiClient.escapeString(characterId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (page != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
if (token != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "evesso" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getCharactersCharacterIdContractsValidateBeforeCall(Integer characterId, String datasource, String ifNoneMatch, Integer page, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'characterId' is set
if (characterId == null) {
throw new ApiException("Missing the required parameter 'characterId' when calling getCharactersCharacterIdContracts(Async)");
}
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsCall(characterId, datasource, ifNoneMatch, page, token, progressListener, progressRequestListener);
return call;
}
/**
* Get contracts
* Returns contracts available to a character, only if the character is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\". --- This route is cached for up to 300 seconds
* @param characterId An EVE character ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @return List<GetCharactersCharacterIdContracts200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getCharactersCharacterIdContracts(Integer characterId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException {
ApiResponse> resp = getCharactersCharacterIdContractsWithHttpInfo(characterId, datasource, ifNoneMatch, page, token);
return resp.getData();
}
/**
* Get contracts
* Returns contracts available to a character, only if the character is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\". --- This route is cached for up to 300 seconds
* @param characterId An EVE character ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @return ApiResponse<List<GetCharactersCharacterIdContracts200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getCharactersCharacterIdContractsWithHttpInfo(Integer characterId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException {
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsValidateBeforeCall(characterId, datasource, ifNoneMatch, page, token, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get contracts (asynchronously)
* Returns contracts available to a character, only if the character is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\". --- This route is cached for up to 300 seconds
* @param characterId An EVE character ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getCharactersCharacterIdContractsAsync(Integer characterId, String datasource, String ifNoneMatch, Integer page, String token, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsValidateBeforeCall(characterId, datasource, ifNoneMatch, page, token, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getCharactersCharacterIdContractsContractIdBids */
private com.squareup.okhttp.Call getCharactersCharacterIdContractsContractIdBidsCall(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/characters/{character_id}/contracts/{contract_id}/bids/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "character_id" + "\\}", apiClient.escapeString(characterId.toString()))
.replaceAll("\\{" + "contract_id" + "\\}", apiClient.escapeString(contractId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (token != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "evesso" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getCharactersCharacterIdContractsContractIdBidsValidateBeforeCall(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'characterId' is set
if (characterId == null) {
throw new ApiException("Missing the required parameter 'characterId' when calling getCharactersCharacterIdContractsContractIdBids(Async)");
}
// verify the required parameter 'contractId' is set
if (contractId == null) {
throw new ApiException("Missing the required parameter 'contractId' when calling getCharactersCharacterIdContractsContractIdBids(Async)");
}
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsContractIdBidsCall(characterId, contractId, datasource, ifNoneMatch, token, progressListener, progressRequestListener);
return call;
}
/**
* Get contract bids
* Lists bids on a particular auction contract --- This route is cached for up to 300 seconds
* @param characterId An EVE character ID (required)
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @return List<GetCharactersCharacterIdContractsContractIdBids200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getCharactersCharacterIdContractsContractIdBids(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token) throws ApiException {
ApiResponse> resp = getCharactersCharacterIdContractsContractIdBidsWithHttpInfo(characterId, contractId, datasource, ifNoneMatch, token);
return resp.getData();
}
/**
* Get contract bids
* Lists bids on a particular auction contract --- This route is cached for up to 300 seconds
* @param characterId An EVE character ID (required)
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @return ApiResponse<List<GetCharactersCharacterIdContractsContractIdBids200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getCharactersCharacterIdContractsContractIdBidsWithHttpInfo(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token) throws ApiException {
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsContractIdBidsValidateBeforeCall(characterId, contractId, datasource, ifNoneMatch, token, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get contract bids (asynchronously)
* Lists bids on a particular auction contract --- This route is cached for up to 300 seconds
* @param characterId An EVE character ID (required)
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getCharactersCharacterIdContractsContractIdBidsAsync(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsContractIdBidsValidateBeforeCall(characterId, contractId, datasource, ifNoneMatch, token, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getCharactersCharacterIdContractsContractIdItems */
private com.squareup.okhttp.Call getCharactersCharacterIdContractsContractIdItemsCall(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/characters/{character_id}/contracts/{contract_id}/items/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "character_id" + "\\}", apiClient.escapeString(characterId.toString()))
.replaceAll("\\{" + "contract_id" + "\\}", apiClient.escapeString(contractId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (token != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "evesso" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getCharactersCharacterIdContractsContractIdItemsValidateBeforeCall(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'characterId' is set
if (characterId == null) {
throw new ApiException("Missing the required parameter 'characterId' when calling getCharactersCharacterIdContractsContractIdItems(Async)");
}
// verify the required parameter 'contractId' is set
if (contractId == null) {
throw new ApiException("Missing the required parameter 'contractId' when calling getCharactersCharacterIdContractsContractIdItems(Async)");
}
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsContractIdItemsCall(characterId, contractId, datasource, ifNoneMatch, token, progressListener, progressRequestListener);
return call;
}
/**
* Get contract items
* Lists items of a particular contract --- This route is cached for up to 3600 seconds
* @param characterId An EVE character ID (required)
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @return List<GetCharactersCharacterIdContractsContractIdItems200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getCharactersCharacterIdContractsContractIdItems(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token) throws ApiException {
ApiResponse> resp = getCharactersCharacterIdContractsContractIdItemsWithHttpInfo(characterId, contractId, datasource, ifNoneMatch, token);
return resp.getData();
}
/**
* Get contract items
* Lists items of a particular contract --- This route is cached for up to 3600 seconds
* @param characterId An EVE character ID (required)
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @return ApiResponse<List<GetCharactersCharacterIdContractsContractIdItems200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getCharactersCharacterIdContractsContractIdItemsWithHttpInfo(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token) throws ApiException {
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsContractIdItemsValidateBeforeCall(characterId, contractId, datasource, ifNoneMatch, token, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get contract items (asynchronously)
* Lists items of a particular contract --- This route is cached for up to 3600 seconds
* @param characterId An EVE character ID (required)
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getCharactersCharacterIdContractsContractIdItemsAsync(Integer characterId, Integer contractId, String datasource, String ifNoneMatch, String token, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getCharactersCharacterIdContractsContractIdItemsValidateBeforeCall(characterId, contractId, datasource, ifNoneMatch, token, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getContractsPublicBidsContractId */
private com.squareup.okhttp.Call getContractsPublicBidsContractIdCall(Integer contractId, String datasource, String ifNoneMatch, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/contracts/public/bids/{contract_id}/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "contract_id" + "\\}", apiClient.escapeString(contractId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (page != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getContractsPublicBidsContractIdValidateBeforeCall(Integer contractId, String datasource, String ifNoneMatch, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'contractId' is set
if (contractId == null) {
throw new ApiException("Missing the required parameter 'contractId' when calling getContractsPublicBidsContractId(Async)");
}
com.squareup.okhttp.Call call = getContractsPublicBidsContractIdCall(contractId, datasource, ifNoneMatch, page, progressListener, progressRequestListener);
return call;
}
/**
* Get public contract bids
* Lists bids on a public auction contract --- This route is cached for up to 300 seconds
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @return List<GetContractsPublicBidsContractId200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getContractsPublicBidsContractId(Integer contractId, String datasource, String ifNoneMatch, Integer page) throws ApiException {
ApiResponse> resp = getContractsPublicBidsContractIdWithHttpInfo(contractId, datasource, ifNoneMatch, page);
return resp.getData();
}
/**
* Get public contract bids
* Lists bids on a public auction contract --- This route is cached for up to 300 seconds
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @return ApiResponse<List<GetContractsPublicBidsContractId200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getContractsPublicBidsContractIdWithHttpInfo(Integer contractId, String datasource, String ifNoneMatch, Integer page) throws ApiException {
com.squareup.okhttp.Call call = getContractsPublicBidsContractIdValidateBeforeCall(contractId, datasource, ifNoneMatch, page, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get public contract bids (asynchronously)
* Lists bids on a public auction contract --- This route is cached for up to 300 seconds
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getContractsPublicBidsContractIdAsync(Integer contractId, String datasource, String ifNoneMatch, Integer page, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getContractsPublicBidsContractIdValidateBeforeCall(contractId, datasource, ifNoneMatch, page, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getContractsPublicItemsContractId */
private com.squareup.okhttp.Call getContractsPublicItemsContractIdCall(Integer contractId, String datasource, String ifNoneMatch, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/contracts/public/items/{contract_id}/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "contract_id" + "\\}", apiClient.escapeString(contractId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (page != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getContractsPublicItemsContractIdValidateBeforeCall(Integer contractId, String datasource, String ifNoneMatch, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'contractId' is set
if (contractId == null) {
throw new ApiException("Missing the required parameter 'contractId' when calling getContractsPublicItemsContractId(Async)");
}
com.squareup.okhttp.Call call = getContractsPublicItemsContractIdCall(contractId, datasource, ifNoneMatch, page, progressListener, progressRequestListener);
return call;
}
/**
* Get public contract items
* Lists items of a public contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @return List<GetContractsPublicItemsContractId200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getContractsPublicItemsContractId(Integer contractId, String datasource, String ifNoneMatch, Integer page) throws ApiException {
ApiResponse> resp = getContractsPublicItemsContractIdWithHttpInfo(contractId, datasource, ifNoneMatch, page);
return resp.getData();
}
/**
* Get public contract items
* Lists items of a public contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @return ApiResponse<List<GetContractsPublicItemsContractId200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getContractsPublicItemsContractIdWithHttpInfo(Integer contractId, String datasource, String ifNoneMatch, Integer page) throws ApiException {
com.squareup.okhttp.Call call = getContractsPublicItemsContractIdValidateBeforeCall(contractId, datasource, ifNoneMatch, page, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get public contract items (asynchronously)
* Lists items of a public contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getContractsPublicItemsContractIdAsync(Integer contractId, String datasource, String ifNoneMatch, Integer page, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getContractsPublicItemsContractIdValidateBeforeCall(contractId, datasource, ifNoneMatch, page, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getContractsPublicRegionId */
private com.squareup.okhttp.Call getContractsPublicRegionIdCall(Integer regionId, String datasource, String ifNoneMatch, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/contracts/public/{region_id}/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "region_id" + "\\}", apiClient.escapeString(regionId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (page != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getContractsPublicRegionIdValidateBeforeCall(Integer regionId, String datasource, String ifNoneMatch, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'regionId' is set
if (regionId == null) {
throw new ApiException("Missing the required parameter 'regionId' when calling getContractsPublicRegionId(Async)");
}
com.squareup.okhttp.Call call = getContractsPublicRegionIdCall(regionId, datasource, ifNoneMatch, page, progressListener, progressRequestListener);
return call;
}
/**
* Get public contracts
* Returns a paginated list of all public contracts in the given region --- This route is cached for up to 1800 seconds
* @param regionId An EVE region id (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @return List<GetContractsPublicRegionId200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getContractsPublicRegionId(Integer regionId, String datasource, String ifNoneMatch, Integer page) throws ApiException {
ApiResponse> resp = getContractsPublicRegionIdWithHttpInfo(regionId, datasource, ifNoneMatch, page);
return resp.getData();
}
/**
* Get public contracts
* Returns a paginated list of all public contracts in the given region --- This route is cached for up to 1800 seconds
* @param regionId An EVE region id (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @return ApiResponse<List<GetContractsPublicRegionId200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getContractsPublicRegionIdWithHttpInfo(Integer regionId, String datasource, String ifNoneMatch, Integer page) throws ApiException {
com.squareup.okhttp.Call call = getContractsPublicRegionIdValidateBeforeCall(regionId, datasource, ifNoneMatch, page, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get public contracts (asynchronously)
* Returns a paginated list of all public contracts in the given region --- This route is cached for up to 1800 seconds
* @param regionId An EVE region id (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getContractsPublicRegionIdAsync(Integer regionId, String datasource, String ifNoneMatch, Integer page, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getContractsPublicRegionIdValidateBeforeCall(regionId, datasource, ifNoneMatch, page, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getCorporationsCorporationIdContracts */
private com.squareup.okhttp.Call getCorporationsCorporationIdContractsCall(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/corporations/{corporation_id}/contracts/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "corporation_id" + "\\}", apiClient.escapeString(corporationId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (page != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
if (token != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "evesso" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getCorporationsCorporationIdContractsValidateBeforeCall(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'corporationId' is set
if (corporationId == null) {
throw new ApiException("Missing the required parameter 'corporationId' when calling getCorporationsCorporationIdContracts(Async)");
}
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsCall(corporationId, datasource, ifNoneMatch, page, token, progressListener, progressRequestListener);
return call;
}
/**
* Get corporation contracts
* Returns contracts available to a corporation, only if the corporation is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\". --- This route is cached for up to 300 seconds
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @return List<GetCorporationsCorporationIdContracts200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getCorporationsCorporationIdContracts(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException {
ApiResponse> resp = getCorporationsCorporationIdContractsWithHttpInfo(corporationId, datasource, ifNoneMatch, page, token);
return resp.getData();
}
/**
* Get corporation contracts
* Returns contracts available to a corporation, only if the corporation is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\". --- This route is cached for up to 300 seconds
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @return ApiResponse<List<GetCorporationsCorporationIdContracts200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getCorporationsCorporationIdContractsWithHttpInfo(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException {
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsValidateBeforeCall(corporationId, datasource, ifNoneMatch, page, token, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get corporation contracts (asynchronously)
* Returns contracts available to a corporation, only if the corporation is issuer, acceptor or assignee. Only returns contracts no older than 30 days, or if the status is \"in_progress\". --- This route is cached for up to 300 seconds
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getCorporationsCorporationIdContractsAsync(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsValidateBeforeCall(corporationId, datasource, ifNoneMatch, page, token, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getCorporationsCorporationIdContractsContractIdBids */
private com.squareup.okhttp.Call getCorporationsCorporationIdContractsContractIdBidsCall(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/corporations/{corporation_id}/contracts/{contract_id}/bids/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "contract_id" + "\\}", apiClient.escapeString(contractId.toString()))
.replaceAll("\\{" + "corporation_id" + "\\}", apiClient.escapeString(corporationId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (page != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page));
if (token != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "evesso" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getCorporationsCorporationIdContractsContractIdBidsValidateBeforeCall(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'contractId' is set
if (contractId == null) {
throw new ApiException("Missing the required parameter 'contractId' when calling getCorporationsCorporationIdContractsContractIdBids(Async)");
}
// verify the required parameter 'corporationId' is set
if (corporationId == null) {
throw new ApiException("Missing the required parameter 'corporationId' when calling getCorporationsCorporationIdContractsContractIdBids(Async)");
}
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsContractIdBidsCall(contractId, corporationId, datasource, ifNoneMatch, page, token, progressListener, progressRequestListener);
return call;
}
/**
* Get corporation contract bids
* Lists bids on a particular auction contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @return List<GetCorporationsCorporationIdContractsContractIdBids200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getCorporationsCorporationIdContractsContractIdBids(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException {
ApiResponse> resp = getCorporationsCorporationIdContractsContractIdBidsWithHttpInfo(contractId, corporationId, datasource, ifNoneMatch, page, token);
return resp.getData();
}
/**
* Get corporation contract bids
* Lists bids on a particular auction contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @return ApiResponse<List<GetCorporationsCorporationIdContractsContractIdBids200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getCorporationsCorporationIdContractsContractIdBidsWithHttpInfo(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException {
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsContractIdBidsValidateBeforeCall(contractId, corporationId, datasource, ifNoneMatch, page, token, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get corporation contract bids (asynchronously)
* Lists bids on a particular auction contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param page Which page of results to return (optional, default to 1)
* @param token Access token to use if unable to set a header (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getCorporationsCorporationIdContractsContractIdBidsAsync(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsContractIdBidsValidateBeforeCall(contractId, corporationId, datasource, ifNoneMatch, page, token, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getCorporationsCorporationIdContractsContractIdItems */
private com.squareup.okhttp.Call getCorporationsCorporationIdContractsContractIdItemsCall(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/corporations/{corporation_id}/contracts/{contract_id}/items/".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "contract_id" + "\\}", apiClient.escapeString(contractId.toString()))
.replaceAll("\\{" + "corporation_id" + "\\}", apiClient.escapeString(corporationId.toString()));
List localVarQueryParams = new ArrayList();
if (datasource != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "datasource", datasource));
if (token != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "token", token));
Map localVarHeaderParams = new HashMap();
if (ifNoneMatch != null)
localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch));
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "evesso" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call getCorporationsCorporationIdContractsContractIdItemsValidateBeforeCall(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, String token, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'contractId' is set
if (contractId == null) {
throw new ApiException("Missing the required parameter 'contractId' when calling getCorporationsCorporationIdContractsContractIdItems(Async)");
}
// verify the required parameter 'corporationId' is set
if (corporationId == null) {
throw new ApiException("Missing the required parameter 'corporationId' when calling getCorporationsCorporationIdContractsContractIdItems(Async)");
}
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsContractIdItemsCall(contractId, corporationId, datasource, ifNoneMatch, token, progressListener, progressRequestListener);
return call;
}
/**
* Get corporation contract items
* Lists items of a particular contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @return List<GetCorporationsCorporationIdContractsContractIdItems200Ok>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List getCorporationsCorporationIdContractsContractIdItems(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, String token) throws ApiException {
ApiResponse> resp = getCorporationsCorporationIdContractsContractIdItemsWithHttpInfo(contractId, corporationId, datasource, ifNoneMatch, token);
return resp.getData();
}
/**
* Get corporation contract items
* Lists items of a particular contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @return ApiResponse<List<GetCorporationsCorporationIdContractsContractIdItems200Ok>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getCorporationsCorporationIdContractsContractIdItemsWithHttpInfo(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, String token) throws ApiException {
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsContractIdItemsValidateBeforeCall(contractId, corporationId, datasource, ifNoneMatch, token, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Get corporation contract items (asynchronously)
* Lists items of a particular contract --- This route is cached for up to 3600 seconds
* @param contractId ID of a contract (required)
* @param corporationId An EVE corporation ID (required)
* @param datasource The server name you would like data from (optional, default to tranquility)
* @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional)
* @param token Access token to use if unable to set a header (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getCorporationsCorporationIdContractsContractIdItemsAsync(Integer contractId, Integer corporationId, String datasource, String ifNoneMatch, String token, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getCorporationsCorporationIdContractsContractIdItemsValidateBeforeCall(contractId, corporationId, datasource, ifNoneMatch, token, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy