Flow.Net
Show / Hide Table of Contents

Class FlowApiV1

Inheritance
Object
FlowApiV1
Namespace: Flow.Net.Sdk.Client.Http
Assembly: Flow.Net.Sdk.Client.Http.dll
Syntax
public class FlowApiV1

Constructors

| Improve this Doc View Source

FlowApiV1(HttpClient)

Declaration
public FlowApiV1(HttpClient httpClient)
Parameters
Type Name Description
HttpClient httpClient

Properties

| Improve this Doc View Source

BaseUrl

Declaration
public string BaseUrl { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

JsonSerializerSettings

Declaration
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type Description
Newtonsoft.Json.JsonSerializerSettings
| Improve this Doc View Source

ReadResponseAsString

Declaration
public bool ReadResponseAsString { get; set; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AccountsAsync(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 start_height and end_height.

String start_height

The start height of the block range to get. Must be used together with end_height. This parameter is incompatible with height.

String end_height

The ending height of the block range to get. Must be used together with start_height. This parameter is incompatible with height.

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.

| Improve this Doc View Source

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 start_height and end_height.

String start_height

The start height of the block range to get. Must be used together with end_height. This parameter is incompatible with height.

String end_height

The ending height of the block range to get. Must be used together with start_height. This parameter is incompatible with height.

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 end_height. This parameter is incompatible with block_ids.

String end_height

The end height of the block range for events. Must be used together with start_height. This parameter is incompatible with block_ids.

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.

| Improve this Doc View Source

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 end_height. This parameter is incompatible with block_ids.

String end_height

The end height of the block range for events. Must be used together with start_height. This parameter is incompatible with block_ids.

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 block_height instead.

String block_height

The height of the block to execute the script against. This parameter is incompatible with block_id.

ScriptBody body

The script to execute.

Returns
Type Description
Task<Response>

OK

Exceptions
Type Condition
ApiException

A server side error occurred.

| Improve this Doc View Source

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 block_height instead.

String block_height

The height of the block to execute the script against. This parameter is incompatible with block_id.

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX