Safe Haskell | None |
---|---|
Language | Haskell2010 |
Core shared by clients
Synopsis
- data BlockfrostError
- data Paged = Paged {
- countPerPage :: Int
- pageNumber :: Int
- data SortOrder
- 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 # (/=) :: BlockfrostError -> BlockfrostError -> Bool # | |
Show BlockfrostError Source # | |
Defined in Blockfrost.Client.Core showsPrec :: Int -> BlockfrostError -> ShowS # show :: BlockfrostError -> String # showList :: [BlockfrostError] -> ShowS # |
Pagination parameters
Paged | |
|
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 # toEncodedUrlPiece :: SortOrder -> Builder # toHeader :: SortOrder -> ByteString # toQueryParam :: SortOrder -> Text # | |
FromHttpApiData SortOrder | |
Defined in Blockfrost.Util.Sorting parseUrlPiece :: Text -> Either Text SortOrder # parseHeader :: ByteString -> Either Text SortOrder # |
paged :: Int -> Int -> Paged #
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 # |