wet-boew/wet-boew-api-standards — pull request #11 by wardi (2013-10-30 15:23:05+00:00)
Title: better offsets into frequently changing data

This solves a real problem we had with our site. We needed to collect all the activities since a given date, but we had to page through them with an APIs

Since the list of activites is continually being added to, an offset parameter isn't very good: we would get the same activities returned multiple times, make several wasted API calls. There was also the possibility of missing activities completely when an earlier activity gets removed from the list by an administrator.

Using a "following" parameter based on the sort order of the items returned solve these problems nicely, and is very easy to use. It's probably also easier on the database at the back end too.