News for hackers. Stuff that matters.
Re:The RESTful CookBook by bmelton on Sunday March 31, 2013 @07:08PM (#5470552)
I do something similar, with the only exception being that I've never bothered calculating the number of pages (or links to other pages) on the server side, preferring to just let the client figure it out.

Mainly, I've found that for dynamic data sets, the links could possibly change between the first page and the 87th, as well as the number of pages, voiding the practicality of the data set.

Give them the number of records per page, the offset, the number of records, and let the clients determine the rest (ideally you'd have documentation showing how to paginate, whether it be ?page=1 or ?offset=20, or whatever).

That looks very complete though.

There are no comments on this comment yet.