Safe Haskell | None |
---|---|
Language | Haskell2010 |
Core shared by clients
Synopsis
- data BlockfrostError
-
data
Paged
=
Paged
{
- countPerPage :: Int
- pageNumber :: Int
-
data
SortOrder
- = Ascending
- | Descending
- asc :: SortOrder
- def :: Default a => a
- desc :: SortOrder
- fromServantClientError :: ClientError -> BlockfrostError
- newEnvByProject :: Project -> IO ClientEnv
- page :: Int -> Paged
- paged :: Int -> Int -> Paged
- allPages :: Monad m => ( Paged -> m [a]) -> m [a]
- nextPage :: Paged -> Paged
- projectFromEnv :: IO Project
- projectFromEnv' :: String -> IO Project
- projectFromFile :: FilePath -> IO Project
Documentation
data BlockfrostError Source #
BlockfrostError Text | |
BlockfrostBadRequest Text | |
BlockfrostTokenMissing Text | |
BlockfrostNotFound | |
BlockfrostIPBanned | |
BlockfrostUsageLimitReached | |
BlockfrostFatal Text | |
ServantClientError ClientError |
Instances
Eq BlockfrostError Source # | |
Defined in Blockfrost.Client.Core (==) :: BlockfrostError -> BlockfrostError -> Bool Source # (/=) :: BlockfrostError -> BlockfrostError -> Bool Source # |
|
Show BlockfrostError Source # | |
Defined in Blockfrost.Client.Core |
Pagination parameters
Paged | |
|
Instances
Eq Paged | |
Ord Paged | |
Defined in Blockfrost.Util.Pagination |
|
Show Paged | |
Default Paged | |
Defined in Blockfrost.Util.Pagination |
Instances
Eq SortOrder | |
Ord SortOrder | |
Defined in Blockfrost.Util.Sorting |
|
Show SortOrder | |
Default SortOrder | |
Defined in Blockfrost.Util.Sorting |
|
ToHttpApiData SortOrder | |
Defined in Blockfrost.Util.Sorting toUrlPiece :: SortOrder -> Text Source # toEncodedUrlPiece :: SortOrder -> Builder Source # toHeader :: SortOrder -> ByteString Source # toQueryParam :: SortOrder -> Text Source # |
|
FromHttpApiData SortOrder | |
Defined in Blockfrost.Util.Sorting |
paged :: Int -> Int -> Paged Source #
Construct
Paged
from page size and page number.
Throws error on invalid values.
allPages :: Monad m => ( Paged -> m [a]) -> m [a] Source #
Query all results, until we get less than maximum items per page.
projectFromEnv :: IO Project Source #
Read file according to BLOCKFROST_TOKEN_PATH environment variable name.
projectFromFile :: FilePath -> IO Project Source #
Read file with token and turn it into
Project
Expects tokens prefixed with environment, e.g.
testnetA3C2E...
Orphan instances
ToMultipart Tmp Form Source # | |
toMultipart :: Form -> MultipartData Tmp Source # |