daodm / streamcardano / StreamCardano.Api

Helpers for sending Http requests to the StreamCardano endpoints.


type Credentials

StreamCardano API credentials

credentials : { r | host : String, key : String } -> Credentials

Init credentials

Get Requests

getStatus : (Result Http.Error StreamCardano.Data.Status.Status -> msg) -> Credentials -> Platform.Cmd.Cmd msg

SEND a basic request to check if the Service is online. No authentication is required.

getLastBlock : (Result Http.Error StreamCardano.Data.LastBlock.LastBlock -> msg) -> Credentials -> Platform.Cmd.Cmd msg

Checking StreamCardano is up-to-date with the Cardano network.

Post Requests

postQuery : (Result Http.Error StreamCardano.Data.Query.Query -> msg) -> Credentials -> String -> Platform.Cmd.Cmd msg

Selecting data with a custom SQL query.

postQueryDebug : (Result Http.Error StreamCardano.Data.Query.Query -> msg) -> Credentials -> String -> Platform.Cmd.Cmd msg

Selecting data with a custom SQL query. Use Debug endpoint