Class CommonApi
Represents a collection of functions to interact with the API endpoints
Inheritance
Inherited Members
Namespace: Algorand.V2.Algod
Assembly: Algorand.dll
Syntax
public class CommonApi : ICommonApi, IApiAccessor
Constructors
| Improve this Doc View SourceCommonApi(Configuration)
Initializes a new instance of the CommonApi class using Configuration object
Declaration
public CommonApi(Configuration configuration = null)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | An instance of Configuration |
CommonApi(String)
Initializes a new instance of the CommonApi class.
Declaration
public CommonApi(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath |
Properties
| Improve this Doc View SourceConfiguration
Gets or sets the configuration object
Declaration
public Configuration Configuration { get; set; }
Property Value
Type | Description |
---|---|
Configuration | An instance of the Configuration |
ExceptionFactory
Provides a factory method hook for the creation of exceptions.
Declaration
public ExceptionFactory ExceptionFactory { get; set; }
Property Value
Type | Description |
---|---|
ExceptionFactory |
Methods
| Improve this Doc View SourceAddDefaultHeader(String, String)
Add default header.
Declaration
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Header field name. |
System.String | value | Header field value. |
DefaultHeader()
Gets the default header.
Declaration
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary<string, string> DefaultHeader()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | Dictionary of HTTP header |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
System.String | The base path |
GetGenesis()
Gets the genesis information. Returns the entire genesis file in json.
Declaration
public string GetGenesis()
Returns
Type | Description |
---|---|
System.String | string |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetGenesisAsync()
Gets the genesis information. Returns the entire genesis file in json.
Declaration
public Task<string> GetGenesisAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Task of string |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetGenesisAsyncWithHttpInfo()
Gets the genesis information. Returns the entire genesis file in json.
Declaration
public Task<ApiResponse<string>> GetGenesisAsyncWithHttpInfo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApiResponse<System.String>> | Task of ApiResponse (string) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetGenesisWithHttpInfo()
Gets the genesis information. Returns the entire genesis file in json.
Declaration
public ApiResponse<string> GetGenesisWithHttpInfo()
Returns
Type | Description |
---|---|
ApiResponse<System.String> | ApiResponse of string |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetVersion()
Retrieves the supported API versions, binary build versions, and genesis information.
Declaration
public Version GetVersion()
Returns
Type | Description |
---|---|
Version | Version |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetVersionAsync()
Retrieves the supported API versions, binary build versions, and genesis information.
Declaration
public Task<Version> GetVersionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Version> | Task of Version |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetVersionAsyncWithHttpInfo()
Retrieves the supported API versions, binary build versions, and genesis information.
Declaration
public Task<ApiResponse<Version>> GetVersionAsyncWithHttpInfo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApiResponse<Version>> | Task of ApiResponse (Version) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetVersionWithHttpInfo()
Retrieves the supported API versions, binary build versions, and genesis information.
Declaration
public ApiResponse<Version> GetVersionWithHttpInfo()
Returns
Type | Description |
---|---|
ApiResponse<Version> | ApiResponse of Version |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
HealthCheck()
Returns OK if healthy.
Declaration
public void HealthCheck()
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
HealthCheckAsync()
Returns OK if healthy.
Declaration
public Task HealthCheckAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task of void |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
HealthCheckAsyncWithHttpInfo()
Returns OK if healthy.
Declaration
public Task<ApiResponse<object>> HealthCheckAsyncWithHttpInfo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApiResponse<System.Object>> | Task of ApiResponse |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
HealthCheckWithHttpInfo()
Returns OK if healthy.
Declaration
public ApiResponse<object> HealthCheckWithHttpInfo()
Returns
Type | Description |
---|---|
ApiResponse<System.Object> | ApiResponse of Object(void) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
Metrics()
Return metrics about algod functioning.
Declaration
public void Metrics()
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MetricsAsync()
Return metrics about algod functioning.
Declaration
public Task MetricsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task of void |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MetricsAsyncWithHttpInfo()
Return metrics about algod functioning.
Declaration
public Task<ApiResponse<object>> MetricsAsyncWithHttpInfo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApiResponse<System.Object>> | Task of ApiResponse |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MetricsWithHttpInfo()
Return metrics about algod functioning.
Declaration
public ApiResponse<object> MetricsWithHttpInfo()
Returns
Type | Description |
---|---|
ApiResponse<System.Object> | ApiResponse of Object(void) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SetBasePath(String)
Sets the base path of the API client.
Declaration
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath |
SwaggerJSON()
Gets the current swagger spec. Returns the entire swagger spec in json.
Declaration
public string SwaggerJSON()
Returns
Type | Description |
---|---|
System.String | string |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SwaggerJSONAsync()
Gets the current swagger spec. Returns the entire swagger spec in json.
Declaration
public Task<string> SwaggerJSONAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Task of string |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SwaggerJSONAsyncWithHttpInfo()
Gets the current swagger spec. Returns the entire swagger spec in json.
Declaration
public Task<ApiResponse<string>> SwaggerJSONAsyncWithHttpInfo()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApiResponse<System.String>> | Task of ApiResponse (string) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SwaggerJSONWithHttpInfo()
Gets the current swagger spec. Returns the entire swagger spec in json.
Declaration
public ApiResponse<string> SwaggerJSONWithHttpInfo()
Returns
Type | Description |
---|---|
ApiResponse<System.String> | ApiResponse of string |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |