Skip to content

Latest commit

History

History
84 lines (56 loc) 路 3.63 KB

BlocksApi.md

File metadata and controls

84 lines (56 loc) 路 3.63 KB

{{classname}}

All URIs are relative to https://rest-canary.onflow.org/v1/

Method HTTP request Description
BlocksGet Get /blocks Gets Blocks by Height
BlocksIdGet Get /blocks/{id} Get Blocks by ID.

BlocksGet

[]Block BlocksGet(ctx, optional) Gets Blocks by Height

Get block data by the provided height range or list of heights.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *BlocksApiBlocksGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BlocksApiBlocksGetOpts struct

Name Type Description Notes
height optional.Interface of []BlockHeight A comma-separated list of block heights to get. This parameter is incompatible with `start_height` and `end_height`.
startHeight optional.Interface of BlockHeight The start height of the block range to get. Must be used together with `end_height`. This parameter is incompatible with `height`.
endHeight optional.Interface of BlockHeight The ending height of the block range to get. Must be used together with `start_height`. This parameter is incompatible with `height`.
expand optional.Interface of []string A comma-separated list indicating which properties of the content to expand.
select_ optional.Interface of []string A comma-separated list indicating which properties of the content to return.

Return type

[]Block

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

BlocksIdGet

[]Block BlocksIdGet(ctx, id, optional) Get Blocks by ID.

Get a block data or list of blocks by the provided ID or list of IDs.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id []string A block ID or comma-separated list of block IDs.
optional *BlocksApiBlocksIdGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BlocksApiBlocksIdGetOpts struct

Name Type Description Notes

expand | optional.Interface of []string| A comma-separated list indicating which properties of the content to expand. | select_ | optional.Interface of []string| A comma-separated list indicating which properties of the content to return. |

Return type

[]Block

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]