Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Response a = Either SlackClientError a
- type LoadPage m a = m (Response [a])
- loadingPage :: (Monad m, Monoid n) => LoadPage m a -> (Response [a] -> m n) -> m n
- fetchAllBy :: (MonadIO m, PagedRequest req, PagedResponse resp) => (req -> m (Response resp)) -> req -> m (LoadPage m (ResponseObject resp))
- module Web.Slack.Pager.Types
Documentation
type Response a = Either SlackClientError a Source #
type LoadPage m a = m (Response [a]) Source #
Represents an action which returns a paginated response from Slack. Every time calling the action, it performs a request with a new cursor to get the next page. If there is no more response, the action returns an empty list.
fetchAllBy :: (MonadIO m, PagedRequest req, PagedResponse resp) => (req -> m (Response resp)) -> req -> m (LoadPage m (ResponseObject resp)) Source #
module Web.Slack.Pager.Types