Safe Haskell | Safe-Inferred |
---|---|
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 #
Instances
Show BlockfrostError Source # | |
Defined in Blockfrost.Client.Core showsPrec :: Int -> BlockfrostError -> ShowS # show :: BlockfrostError -> String # showList :: [BlockfrostError] -> ShowS # | |
Eq BlockfrostError Source # | |
Defined in Blockfrost.Client.Core (==) :: BlockfrostError -> BlockfrostError -> Bool # (/=) :: BlockfrostError -> BlockfrostError -> Bool # |
Pagination parameters
Paged | |
|
Instances
Show SortOrder | |
Default SortOrder | |
Defined in Blockfrost.Util.Sorting | |
Eq SortOrder | |
Ord SortOrder | |
Defined in Blockfrost.Util.Sorting | |
FromHttpApiData SortOrder | |
Defined in Blockfrost.Util.Sorting parseUrlPiece :: Text -> Either Text SortOrder # parseHeader :: ByteString -> Either Text SortOrder # | |
ToHttpApiData SortOrder | |
Defined in Blockfrost.Util.Sorting toUrlPiece :: SortOrder -> Text # toEncodedUrlPiece :: SortOrder -> Builder # toHeader :: SortOrder -> ByteString # toQueryParam :: SortOrder -> Text # toEncodedQueryParam :: SortOrder -> Builder # |
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 # |