Class FlowApiV1
Namespace: Flow.Net.Sdk.Client.Http
Assembly: Flow.Net.Sdk.Client.Http.dll
Syntax
public class FlowApiV1
Constructors
| Improve this Doc View SourceFlowApiV1(HttpClient)
Declaration
public FlowApiV1(HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient |
Properties
| Improve this Doc View SourceBaseUrl
Declaration
public string BaseUrl { get; set; }
Property Value
Type | Description |
---|---|
String |
JsonSerializerSettings
Declaration
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializerSettings |
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceAccountsAsync(String, String, IEnumerable<String>)
Get an Account By Address
Declaration
public Task<Account> AccountsAsync(string address, string block_height, IEnumerable<string> expand)
Parameters
Type | Name | Description |
---|---|---|
String | address | The address of the account. |
String | block_height | The block height to query for the account details at the "sealed" is used by default. |
IEnumerable<String> | expand |
Returns
Type | Description |
---|---|
Task<Account> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
AccountsAsync(String, String, IEnumerable<String>, CancellationToken)
Get an Account By Address
Declaration
public async Task<Account> AccountsAsync(string address, string block_height, IEnumerable<string> expand, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | address | The address of the account. |
String | block_height | The block height to query for the account details at the "sealed" is used by default. |
IEnumerable<String> | expand | |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<Account> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
BlocksAllAsync(IEnumerable<String>, String, String, IEnumerable<String>, IEnumerable<String>)
Gets Blocks by Height
Declaration
public Task<ICollection<Block>> BlocksAllAsync(IEnumerable<string> height, string start_height, string end_height, IEnumerable<string> expand, IEnumerable<string> select)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | height | A comma-separated list of block heights to get. This parameter is incompatible with |
String | start_height | The start height of the block range to get. Must be used together with |
String | end_height | The ending height of the block range to get. Must be used together with |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
Returns
Type | Description |
---|---|
Task<ICollection<Block>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
BlocksAllAsync(IEnumerable<String>, String, String, IEnumerable<String>, IEnumerable<String>, CancellationToken)
Gets Blocks by Height
Declaration
public async Task<ICollection<Block>> BlocksAllAsync(IEnumerable<string> height, string start_height, string end_height, IEnumerable<string> expand, IEnumerable<string> select, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | height | A comma-separated list of block heights to get. This parameter is incompatible with |
String | start_height | The start height of the block range to get. Must be used together with |
String | end_height | The ending height of the block range to get. Must be used together with |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<ICollection<Block>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
BlocksAsync(IEnumerable<String>, IEnumerable<String>, IEnumerable<String>)
Get Blocks by ID.
Declaration
public Task<ICollection<Block>> BlocksAsync(IEnumerable<string> id, IEnumerable<string> expand, IEnumerable<string> select)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | id | A block ID or comma-separated list of block IDs. |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
Returns
Type | Description |
---|---|
Task<ICollection<Block>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
BlocksAsync(IEnumerable<String>, IEnumerable<String>, IEnumerable<String>, CancellationToken)
Get Blocks by ID.
Declaration
public async Task<ICollection<Block>> BlocksAsync(IEnumerable<string> id, IEnumerable<string> expand, IEnumerable<string> select, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | id | A block ID or comma-separated list of block IDs. |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<ICollection<Block>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CollectionsAsync(String, IEnumerable<String>)
Gets a Collection by ID
Declaration
public Task<Collection> CollectionsAsync(string id, IEnumerable<string> expand)
Parameters
Type | Name | Description |
---|---|---|
String | id | The collection ID. |
IEnumerable<String> | expand |
Returns
Type | Description |
---|---|
Task<Collection> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
CollectionsAsync(String, IEnumerable<String>, CancellationToken)
Gets a Collection by ID
Declaration
public async Task<Collection> CollectionsAsync(string id, IEnumerable<string> expand, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | id | The collection ID. |
IEnumerable<String> | expand | |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<Collection> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
EventsAsync(String, String, String, IEnumerable<String>, IEnumerable<String>)
Get Events
Declaration
public Task<ICollection<BlockEvents>> EventsAsync(string type, string start_height, string end_height, IEnumerable<string> block_ids, IEnumerable<string> select)
Parameters
Type | Name | Description |
---|---|---|
String | type | The event type is identifier of the event as defined here. |
String | start_height | The start height of the block range for events. Must be used together with |
String | end_height | The end height of the block range for events. Must be used together with |
IEnumerable<String> | block_ids | List of block IDs. Either provide this parameter or both height parameters. This parameter is incompatible with heights parameters. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
Returns
Type | Description |
---|---|
Task<ICollection<BlockEvents>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
EventsAsync(String, String, String, IEnumerable<String>, IEnumerable<String>, CancellationToken)
Get Events
Declaration
public async Task<ICollection<BlockEvents>> EventsAsync(string type, string start_height, string end_height, IEnumerable<string> block_ids, IEnumerable<string> select, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | type | The event type is identifier of the event as defined here. |
String | start_height | The start height of the block range for events. Must be used together with |
String | end_height | The end height of the block range for events. Must be used together with |
IEnumerable<String> | block_ids | List of block IDs. Either provide this parameter or both height parameters. This parameter is incompatible with heights parameters. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<ICollection<BlockEvents>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>)
Declaration
protected virtual async Task<FlowApiV1.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers)
Parameters
Type | Name | Description |
---|---|---|
HttpResponseMessage | response | |
IReadOnlyDictionary<String, IEnumerable<String>> | headers |
Returns
Type | Description |
---|---|
Task<FlowApiV1.ObjectResponseResult<T>> |
Type Parameters
Name | Description |
---|---|
T |
ResultsAllAsync(IEnumerable<String>)
Get Execution Results by Block ID
Declaration
public Task<ICollection<ExecutionResult>> ResultsAllAsync(IEnumerable<string> block_id)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | block_id | Single ID or comma-separated list of block IDs. |
Returns
Type | Description |
---|---|
Task<ICollection<ExecutionResult>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ResultsAllAsync(IEnumerable<String>, CancellationToken)
Get Execution Results by Block ID
Declaration
public async Task<ICollection<ExecutionResult>> ResultsAllAsync(IEnumerable<string> block_id, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | block_id | Single ID or comma-separated list of block IDs. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<ICollection<ExecutionResult>> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ResultsAsync(String)
Get Execution Result by ID
Declaration
public Task<ExecutionResult> ResultsAsync(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the execution result. |
Returns
Type | Description |
---|---|
Task<ExecutionResult> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ResultsAsync(String, IEnumerable<String>, IEnumerable<String>)
Get a Transaction Result by ID.
Declaration
public Task<TransactionResult> ResultsAsync(string transaction_id, IEnumerable<string> expand, IEnumerable<string> select)
Parameters
Type | Name | Description |
---|---|---|
String | transaction_id | The transaction ID of the transaction result. |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
Returns
Type | Description |
---|---|
Task<TransactionResult> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ResultsAsync(String, IEnumerable<String>, IEnumerable<String>, CancellationToken)
Get a Transaction Result by ID.
Declaration
public async Task<TransactionResult> ResultsAsync(string transaction_id, IEnumerable<string> expand, IEnumerable<string> select, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | transaction_id | The transaction ID of the transaction result. |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<TransactionResult> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ResultsAsync(String, CancellationToken)
Get Execution Result by ID
Declaration
public async Task<ExecutionResult> ResultsAsync(string id, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the execution result. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<ExecutionResult> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ScriptsAsync(String, String, ScriptBody)
Execute a Cadence Script
Declaration
public Task<Response> ScriptsAsync(string block_id, string block_height, ScriptBody body)
Parameters
Type | Name | Description |
---|---|---|
String | block_id | The ID of the block to execute the script against. For a specific block height, use |
String | block_height | The height of the block to execute the script against. This parameter is incompatible with |
ScriptBody | body | The script to execute. |
Returns
Type | Description |
---|---|
Task<Response> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
ScriptsAsync(String, String, ScriptBody, CancellationToken)
Execute a Cadence Script
Declaration
public async Task<Response> ScriptsAsync(string block_id, string block_height, ScriptBody body, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | block_id | The ID of the block to execute the script against. For a specific block height, use |
String | block_height | The height of the block to execute the script against. This parameter is incompatible with |
ScriptBody | body | The script to execute. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<Response> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
SendTransactionAsync(TransactionBody)
Submit a Transaction
Declaration
public Task<Transaction> SendTransactionAsync(TransactionBody body)
Parameters
Type | Name | Description |
---|---|---|
TransactionBody | body | The transaction to submit. |
Returns
Type | Description |
---|---|
Task<Transaction> | Created |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
SendTransactionAsync(TransactionBody, CancellationToken)
Submit a Transaction
Declaration
public async Task<Transaction> SendTransactionAsync(TransactionBody body, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TransactionBody | body | The transaction to submit. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<Transaction> | Created |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
TransactionsAsync(String, IEnumerable<String>, IEnumerable<String>)
Get a Transaction by ID.
Declaration
public Task<Transaction> TransactionsAsync(string id, IEnumerable<string> expand, IEnumerable<string> select)
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the transaction to get. |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
Returns
Type | Description |
---|---|
Task<Transaction> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |
TransactionsAsync(String, IEnumerable<String>, IEnumerable<String>, CancellationToken)
Get a Transaction by ID.
Declaration
public async Task<Transaction> TransactionsAsync(string id, IEnumerable<string> expand, IEnumerable<string> select, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the transaction to get. |
IEnumerable<String> | expand | A comma-separated list indicating which properties of the content to expand. |
IEnumerable<String> | select | A comma-separated list indicating which properties of the content to return. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<Transaction> | OK |
Exceptions
Type | Condition |
---|---|
ApiException | A server side error occurred. |