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.sdk.openapi.jersey2.api;
import io.nem.sdk.openapi.jersey2.invoker.ApiException;
import io.nem.sdk.openapi.jersey2.invoker.ApiClient;
import io.nem.sdk.openapi.jersey2.invoker.ApiResponse;
import io.nem.sdk.openapi.jersey2.invoker.Configuration;
import io.nem.sdk.openapi.jersey2.invoker.Pair;
import javax.ws.rs.core.GenericType;
import io.nem.sdk.openapi.jersey2.model.AccountIds;
import io.nem.sdk.openapi.jersey2.model.ModelError;
import io.nem.sdk.openapi.jersey2.model.MosaicIds;
import io.nem.sdk.openapi.jersey2.model.MosaicInfoDTO;
import io.nem.sdk.openapi.jersey2.model.MosaicsInfoDTO;
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 = "2020-02-07T22:44:38.001Z[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 = new Object();
// 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 = "/mosaic/{mosaicId}"
.replaceAll("\\{" + "mosaicId" + "\\}", apiClient.escapeString(mosaicId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = 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(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, 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 = "/mosaic";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = 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(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get mosaics created by an account
* Gets an array of mosaics created for a given account address.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @return MosaicsInfoDTO
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public MosaicsInfoDTO getMosaicsFromAccount(String accountId) throws ApiException {
return getMosaicsFromAccountWithHttpInfo(accountId).getData();
}
/**
* Get mosaics created by an account
* Gets an array of mosaics created for a given account address.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @return ApiResponse<MosaicsInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public ApiResponse getMosaicsFromAccountWithHttpInfo(String accountId) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getMosaicsFromAccount");
}
// create path and map variables
String localVarPath = "/account/{accountId}/mosaics"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = 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(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get mosaics created for given array of addresses
* Gets mosaics created for a given array of addresses.
* @param accountIds (optional)
* @return MosaicsInfoDTO
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
400
InvalidContent
-
409
InvalidArgument
-
*/
public MosaicsInfoDTO getMosaicsFromAccounts(AccountIds accountIds) throws ApiException {
return getMosaicsFromAccountsWithHttpInfo(accountIds).getData();
}
/**
* Get mosaics created for given array of addresses
* Gets mosaics created for a given array of addresses.
* @param accountIds (optional)
* @return ApiResponse<MosaicsInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
400
InvalidContent
-
409
InvalidArgument
-
*/
public ApiResponse getMosaicsFromAccountsWithHttpInfo(AccountIds accountIds) throws ApiException {
Object localVarPostBody = accountIds;
// create path and map variables
String localVarPath = "/account/mosaics";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = 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(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}