blockfrost-client-core-0.6.0.1: blockfrost.io common client definitions / instances
Safe HaskellSafe-Inferred
LanguageHaskell2010

Blockfrost.Client.Pagination

Description

Pagination instance for HasClient

Synopsis

Documentation

data Paged #

Pagination parameters

Constructors

Paged 

Fields

Instances

Instances details
Show Paged 
Instance details

Defined in Blockfrost.Util.Pagination

Methods

showsPrec :: Int -> Paged -> ShowS #

show :: Paged -> String #

showList :: [Paged] -> ShowS #

Default Paged 
Instance details

Defined in Blockfrost.Util.Pagination

Methods

def :: Paged #

Eq Paged 
Instance details

Defined in Blockfrost.Util.Pagination

Methods

(==) :: Paged -> Paged -> Bool #

(/=) :: Paged -> Paged -> Bool #

Ord Paged 
Instance details

Defined in Blockfrost.Util.Pagination

Methods

compare :: Paged -> Paged -> Ordering #

(<) :: Paged -> Paged -> Bool #

(<=) :: Paged -> Paged -> Bool #

(>) :: Paged -> Paged -> Bool #

(>=) :: Paged -> Paged -> Bool #

max :: Paged -> Paged -> Paged #

min :: Paged -> Paged -> Paged #

page :: Int -> Paged #

Default Paged at specific page number

paged :: Int -> Int -> Paged #

Construct Paged from page size and page number.

Throws error on invalid values.

nextPage :: Paged -> Paged #

Increment page number

allPages :: Monad m => (Paged -> m [a]) -> m [a] Source #

Query all results, until we get less than maximum items per page.

Orphan instances

HasClient m subApi => HasClient m (Pagination :> subApi) Source # 
Instance details

Associated Types

type Client m (Pagination :> subApi) #

Methods

clientWithRoute :: Proxy m -> Proxy (Pagination :> subApi) -> Request -> Client m (Pagination :> subApi) #

hoistClientMonad :: Proxy m -> Proxy (Pagination :> subApi) -> (forall x. mon x -> mon' x) -> Client mon (Pagination :> subApi) -> Client mon' (Pagination :> subApi) #