Safe Haskell | None |
---|---|
Language | Haskell2010 |
Client Types
Synopsis
- type BlockfrostClient = ExceptT BlockfrostError (ReaderT ClientConfig IO)
- data BlockfrostError
- type ClientConfig = (ClientEnv, Project)
- runBlockfrost :: Project -> BlockfrostClient a -> IO (Either BlockfrostError a)
- apiClient :: BlockfrostAPI (AsClientT BlockfrostClient)
- api0Client :: Project -> BlockfrostV0API (AsClientT BlockfrostClient)
- commonClient :: Project -> CommonAPI (AsClientT BlockfrostClient)
- cardanoClient :: Project -> CardanoAPI (AsClientT BlockfrostClient)
- ipfsClient :: Project -> IPFSAPI (AsClientT BlockfrostClient)
- nutLinkClient :: Project -> NutLinkAPI (AsClientT BlockfrostClient)
- data Project = Project {
- projectEnv :: Env
- projectId :: Text
- data Paged = Paged {
- countPerPage :: Int
- pageNumber :: Int
- data SortOrder
- go :: (Project -> BlockfrostClient a) -> BlockfrostClient a
- data AsClientT (m :: Type -> Type)
- fromServant :: GenericServant routes mode => ToServant routes mode -> routes mode
- tryError :: MonadError e m => m a -> m (Either e a)
- def :: Default a => a
Documentation
data BlockfrostError #
BlockfrostError Text | |
BlockfrostBadRequest Text | |
BlockfrostTokenMissing Text | |
BlockfrostNotFound | |
BlockfrostIPBanned | |
BlockfrostUsageLimitReached | |
BlockfrostFatal Text | |
ServantClientError ClientError |
Instances
Eq BlockfrostError | |
Defined in Blockfrost.Client.Core (==) :: BlockfrostError -> BlockfrostError -> Bool # (/=) :: BlockfrostError -> BlockfrostError -> Bool # | |
Show BlockfrostError | |
Defined in Blockfrost.Client.Core showsPrec :: Int -> BlockfrostError -> ShowS # show :: BlockfrostError -> String # showList :: [BlockfrostError] -> ShowS # |
type ClientConfig = (ClientEnv, Project) Source #
runBlockfrost :: Project -> BlockfrostClient a -> IO (Either BlockfrostError a) Source #
Run BlockfrostClient
monad, using provided Project
apiClient :: BlockfrostAPI (AsClientT BlockfrostClient) Source #
api0Client :: Project -> BlockfrostV0API (AsClientT BlockfrostClient) Source #
commonClient :: Project -> CommonAPI (AsClientT BlockfrostClient) Source #
cardanoClient :: Project -> CardanoAPI (AsClientT BlockfrostClient) Source #
ipfsClient :: Project -> IPFSAPI (AsClientT BlockfrostClient) Source #
nutLinkClient :: Project -> NutLinkAPI (AsClientT BlockfrostClient) Source #
Project | |
|
Instances
Eq Project | |
Show Project | |
IsString Project | |
Defined in Blockfrost.Auth fromString :: String -> Project # | |
Generic Project | |
type Rep Project | |
Defined in Blockfrost.Auth type Rep Project = D1 ('MetaData "Project" "Blockfrost.Auth" "blockfrost-api-0.1.0.0-IUovSY8qZrZI80mAb9CnjM" 'False) (C1 ('MetaCons "Project" 'PrefixI 'True) (S1 ('MetaSel ('Just "projectEnv") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Env) :*: S1 ('MetaSel ('Just "projectId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
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 # |
go :: (Project -> BlockfrostClient a) -> BlockfrostClient a Source #
Helper
data AsClientT (m :: Type -> Type) #
A type that specifies that an API record contains a client implementation.
Instances
GenericMode (AsClientT m) | |
Defined in Servant.Client.Generic | |
type (AsClientT m) :- api | |
Defined in Servant.Client.Generic |
fromServant :: GenericServant routes mode => ToServant routes mode -> routes mode #
Inverse of toServant
.
This can be used to turn generated
values such as client functions into records.
You may need to provide a type signature for the output type (your record type).
tryError :: MonadError e m => m a -> m (Either e a) Source #
MonadError
analogue to the try
function.