Class CommonApi
Represents a collection of functions to interact with the API endpoints
Inheritance
Inherited Members
Namespace: Algorand.V2.Indexer
Assembly: Algorand.dll
Syntax
public class CommonApi : ICommonApi, IApiAccessor
  Constructors
| Improve this Doc View SourceCommonApi()
Initializes a new instance of the CommonApi class
Declaration
public CommonApi()
  CommonApi(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  | 
      
MakeHealthCheck()
Returns 200 if healthy.
Declaration
public HealthCheck MakeHealthCheck()
  Returns
| Type | Description | 
|---|---|
| HealthCheck | HealthCheck  | 
      
Exceptions
| Type | Condition | 
|---|---|
| ApiException | Thrown when fails to make API call  | 
      
MakeHealthCheckAsync()
Returns 200 if healthy.
Declaration
public Task<HealthCheck> MakeHealthCheckAsync()
  Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<HealthCheck> | Task of HealthCheck  | 
      
Exceptions
| Type | Condition | 
|---|---|
| ApiException | Thrown when fails to make API call  | 
      
MakeHealthCheckAsyncWithHttpInfo()
Returns 200 if healthy.
Declaration
public Task<ApiResponse<HealthCheck>> MakeHealthCheckAsyncWithHttpInfo()
  Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<ApiResponse<HealthCheck>> | Task of ApiResponse (HealthCheck)  | 
      
Exceptions
| Type | Condition | 
|---|---|
| ApiException | Thrown when fails to make API call  | 
      
MakeHealthCheckWithHttpInfo()
Returns 200 if healthy.
Declaration
public ApiResponse<HealthCheck> MakeHealthCheckWithHttpInfo()
  Returns
| Type | Description | 
|---|---|
| ApiResponse<HealthCheck> | ApiResponse of HealthCheck  | 
      
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 |