![JAR search and dependency download from the Maven repository](/logo.png)
io.nem.symbol.sdk.openapi.jersey2.api.ChainRoutesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of symbol-openapi-jersey2-client Show documentation
Show all versions of symbol-openapi-jersey2-client Show documentation
symbol-openapi-jersey2-client Generated Open API client for symbol-sdk-java
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.ChainInfoDTO;
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 ChainRoutesApi {
private ApiClient apiClient;
public ChainRoutesApi() {
this(Configuration.getDefaultApiClient());
}
public ChainRoutesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the current information of the chain
* Returns the current information of the blockchain. The higher the score, the better the chain. During synchronization, nodes try to get the best blockchain in the network. The score for a block is derived from its difficulty and the time (in seconds) that has elapsed since the last block: block score = difficulty − time elapsed since last block
* @return ChainInfoDTO
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 success -
*/
public ChainInfoDTO getChainInfo() throws ApiException {
return getChainInfoWithHttpInfo().getData();
}
/**
* Get the current information of the chain
* Returns the current information of the blockchain. The higher the score, the better the chain. During synchronization, nodes try to get the best blockchain in the network. The score for a block is derived from its difficulty and the time (in seconds) that has elapsed since the last block: block score = difficulty − time elapsed since last block
* @return ApiResponse<ChainInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 success -
*/
public ApiResponse getChainInfoWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/chain/info";
// 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("ChainRoutesApi.getChainInfo", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy