Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.nem.symbol.sdk.openapi.jersey2.api;
import io.nem.symbol.sdk.openapi.jersey2.invoker.ApiException;
import io.nem.symbol.sdk.openapi.jersey2.invoker.ApiClient;
import io.nem.symbol.sdk.openapi.jersey2.invoker.ApiResponse;
import io.nem.symbol.sdk.openapi.jersey2.invoker.Configuration;
import io.nem.symbol.sdk.openapi.jersey2.invoker.Pair;
import javax.ws.rs.core.GenericType;
import io.nem.symbol.sdk.openapi.jersey2.model.MerkleStateInfoDTO;
import io.nem.symbol.sdk.openapi.jersey2.model.ModelError;
import io.nem.symbol.sdk.openapi.jersey2.model.MosaicIds;
import io.nem.symbol.sdk.openapi.jersey2.model.MosaicInfoDTO;
import io.nem.symbol.sdk.openapi.jersey2.model.MosaicPage;
import io.nem.symbol.sdk.openapi.jersey2.model.Order;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-02-02T19:39:53.661Z[UTC]")
public class MosaicRoutesApi {
private ApiClient apiClient;
public MosaicRoutesApi() {
this(Configuration.getDefaultApiClient());
}
public MosaicRoutesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get mosaic information
* Gets the mosaic definition for a given mosaic identifier.
* @param mosaicId Mosaic identifier. (required)
* @return MosaicInfoDTO
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public MosaicInfoDTO getMosaic(String mosaicId) throws ApiException {
return getMosaicWithHttpInfo(mosaicId).getData();
}
/**
* Get mosaic information
* Gets the mosaic definition for a given mosaic identifier.
* @param mosaicId Mosaic identifier. (required)
* @return ApiResponse<MosaicInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public ApiResponse getMosaicWithHttpInfo(String mosaicId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'mosaicId' is set
if (mosaicId == null) {
throw new ApiException(400, "Missing the required parameter 'mosaicId' when calling getMosaic");
}
// create path and map variables
String localVarPath = "/mosaics/{mosaicId}"
.replaceAll("\\{" + "mosaicId" + "\\}", apiClient.escapeString(mosaicId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("MosaicRoutesApi.getMosaic", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get mosaic merkle information
* Gets the mosaic definition merkle for a given mosaic identifier.
* @param mosaicId Mosaic identifier. (required)
* @return MerkleStateInfoDTO
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public MerkleStateInfoDTO getMosaicMerkle(String mosaicId) throws ApiException {
return getMosaicMerkleWithHttpInfo(mosaicId).getData();
}
/**
* Get mosaic merkle information
* Gets the mosaic definition merkle for a given mosaic identifier.
* @param mosaicId Mosaic identifier. (required)
* @return ApiResponse<MerkleStateInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public ApiResponse getMosaicMerkleWithHttpInfo(String mosaicId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'mosaicId' is set
if (mosaicId == null) {
throw new ApiException(400, "Missing the required parameter 'mosaicId' when calling getMosaicMerkle");
}
// create path and map variables
String localVarPath = "/mosaics/{mosaicId}/merkle"
.replaceAll("\\{" + "mosaicId" + "\\}", apiClient.escapeString(mosaicId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("MosaicRoutesApi.getMosaicMerkle", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get mosaics information for an array of mosaics
* Gets an array of mosaic definition.
* @param mosaicIds (required)
* @return List<MosaicInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
400
InvalidContent
-
409
InvalidArgument
-
*/
public List getMosaics(MosaicIds mosaicIds) throws ApiException {
return getMosaicsWithHttpInfo(mosaicIds).getData();
}
/**
* Get mosaics information for an array of mosaics
* Gets an array of mosaic definition.
* @param mosaicIds (required)
* @return ApiResponse<List<MosaicInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
400
InvalidContent
-
409
InvalidArgument
-
*/
public ApiResponse> getMosaicsWithHttpInfo(MosaicIds mosaicIds) throws ApiException {
Object localVarPostBody = mosaicIds;
// verify the required parameter 'mosaicIds' is set
if (mosaicIds == null) {
throw new ApiException(400, "Missing the required parameter 'mosaicIds' when calling getMosaics");
}
// create path and map variables
String localVarPath = "/mosaics";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType> localVarReturnType = new GenericType>() {};
return apiClient.invokeAPI("MosaicRoutesApi.getMosaics", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Search mosaics
* Gets an array of mosaics.
* @param ownerAddress Filter by owner address. (optional)
* @param pageSize Select the number of entries to return. (optional, default to 10)
* @param pageNumber Filter by page number. (optional, default to 1)
* @param offset Entry id at which to start pagination. If the ordering parameter is set to -id, the elements returned precede the identifier. Otherwise, newer elements with respect to the id are returned. (optional)
* @param order Sort responses in ascending or descending order based on the collection property set on the param ``orderBy``. If the request does not specify ``orderBy``, REST returns the collection ordered by id. (optional, default to desc)
* @return MosaicPage
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public MosaicPage searchMosaics(String ownerAddress, Integer pageSize, Integer pageNumber, String offset, Order order) throws ApiException {
return searchMosaicsWithHttpInfo(ownerAddress, pageSize, pageNumber, offset, order).getData();
}
/**
* Search mosaics
* Gets an array of mosaics.
* @param ownerAddress Filter by owner address. (optional)
* @param pageSize Select the number of entries to return. (optional, default to 10)
* @param pageNumber Filter by page number. (optional, default to 1)
* @param offset Entry id at which to start pagination. If the ordering parameter is set to -id, the elements returned precede the identifier. Otherwise, newer elements with respect to the id are returned. (optional)
* @param order Sort responses in ascending or descending order based on the collection property set on the param ``orderBy``. If the request does not specify ``orderBy``, REST returns the collection ordered by id. (optional, default to desc)
* @return ApiResponse<MosaicPage>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public ApiResponse searchMosaicsWithHttpInfo(String ownerAddress, Integer pageSize, Integer pageNumber, String offset, Order order) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/mosaics";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ownerAddress", ownerAddress));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageNumber", pageNumber));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("MosaicRoutesApi.searchMosaics", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}