Class ApiClient
API client is mainly responsible for making the HTTP call to the API backend.
Inheritance
Namespace: BoldSign.Api
Assembly: BoldSign.Api.dll
Syntax
public class ApiClient : object
Constructors
| Improve this Doc View SourceApiClient()
Initializes a new instance of the ApiClient class with default configuration.
Declaration
public ApiClient()
ApiClient(Configuration)
Initializes a new instance of the ApiClient class with default base path ApiBaseUrl.
Declaration
public ApiClient(Configuration config)
Parameters
Type | Name | Description |
---|---|---|
Configuration | config | An instance of Configuration. |
ApiClient(String)
Initializes a new instance of the ApiClient class with default configuration.
Declaration
public ApiClient(string basePath = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath | The base path. |
ApiClient(String, String)
Initializes a new instance of the ApiClient class
Declaration
public ApiClient(string basePath, string apiKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath | An instance of base path. |
System.String | apiKey | An instance of api key. |
Fields
| Improve this Doc View SourceXApiKey
X-API-KEY for ApiKey.
Declaration
public const string XApiKey = null
Field Value
Type | Description |
---|---|
System.String | X-API-KEY for ApiKey. |
Properties
| Improve this Doc View SourceApiKey
Initializes a new instance of the ApiClient class
Declaration
public string ApiKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Configuration
Gets or sets an instance of the IReadableConfiguration.
Declaration
public IReadableConfiguration Configuration { get; set; }
Property Value
Type | Description |
---|---|
IReadableConfiguration | An instance of the IReadableConfiguration. |
Remarks
IReadableConfiguration helps us to avoid modifying possibly global configuration values from within a given client. It does not guarantee thread-safety of the Configuration instance in any way.
Methods
| Improve this Doc View SourceEscapeString(String)
Escape string (url-encoded).
Declaration
public string EscapeString(string str)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | String to be escaped. |
Returns
Type | Description |
---|---|
System.String | Escaped string. |
IsJsonMime(String)
Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json
Declaration
public bool IsJsonMime(string mime)
Parameters
Type | Name | Description |
---|---|---|
System.String | mime | MIME |
Returns
Type | Description |
---|---|
System.Boolean | Returns True if MIME type is json. |