toddmohney / json-api

Haskell Implementation of the JSON-API specification
http://hackage.haskell.org/package/json-api
MIT License
35 stars 14 forks source link

Support Pagination in Links Object #7

Closed toddmohney closed 5 years ago

toddmohney commented 8 years ago

Specification: http://jsonapi.org/format/#fetching-pagination

shirren commented 5 years ago

@toddmohney this would be a handy feature for us on our project. May I submit a PR with this feature?

toddmohney commented 5 years ago

@shirren Of course! Thanks!

shirren commented 5 years ago

@toddmohney thoughts on whether this feature should support a cursor based strategy? I was thinking of supporting a page-based strategy and offset-based strategy.

toddmohney commented 5 years ago

@shirren just took a look at your draft PR. I think the page/offset strategy works well here.

shirren commented 5 years ago

@toddmohney thanks for checking it out. The tests pass, so good there. But I am thinking of updating the README with instrsuctions on how to use the Pagination. Should we make it part of this PR or another one?

toddmohney commented 5 years ago

@shirren I think updating the README as part of this PR makes a lot of sense. Thanks!

shirren commented 5 years ago

@toddmohney done. I've updated the README with an example on how to add pagination links to the payload.

toddmohney commented 5 years ago

Resolved by https://github.com/toddmohney/json-api/pull/35