Safe Haskell | None |
---|---|
Language | Haskell2010 |
- Miscellaneous functions and types for dealing with pushbullet data.
Documentation
:: Monad m | |
=> Count | The count of items you wish to retrieve from the API. |
-> Paginated [a] | The first page of data to kick off the process. |
-> (Cursor -> m (Paginated [a])) | How to retrieve the next page given a cursor. |
-> m [a] |
Retrieves paginated data as a list.
Suppose 550 items from a resource with 1100 entries and Pushbullet emits pages of 100 items each. This function takes care of repeatedly calling the API and keeping track of the cursors emitted from subsequent calls until those 550 items have been collected.