Blockfrost.HTTP (Blockfrost v0.1.1) View Source
HTTP requests to Blockfrost APIs.
This module is not meant to be use directly. Use the higher level modules to do calls to the Blockfrost API.
Link to this section Summary
Functions
Builds a request to a Blockfrost API
Builds a request and sends it.
Does a request to a Blockfrost API.
Link to this section Types
Specs
error_response() :: {:error, :bad_request | :unauthenticated | :ip_banned | :usage_limit_reached | :internal_server_error | Finch.Error.t()}
Link to this section Functions
Specs
build(atom(), Finch.Request.method(), binary(), map(), binary()) :: Finch.Request.t()
Builds a request to a Blockfrost API
This function only builds the request. You can execute it with request/3
.
Specs
Builds a request and sends it.
Supports pagination.
If pagination.page is :all
, will fetch all pages concurrently, with retries
according to retry options. If some page fails to be fetched, the first error
found will be returned.
If you're fetching all pages, maximum concurrency can be configured by using
the :max_concurrency option. Default is 10
.
Keeps data in the order requested.
Specs
request(atom(), Finch.Request.t(), Keyword.t()) :: Finch.Response.t()
Does a request to a Blockfrost API.
Receives the following options:
:retry_enabled?
: whether it should retry failing requests:retry_max_attempts
: max retry attempts:retry_interval
: interval between attempts
All these options fall back to the config. If they're not defined there,
they fall back to default values. See Blockfrost.Config
for more info.
For additional options, see Finch.request/3
Build requests with build/4
.