apiaryio / polls-api

Polls is an example web API that allows consumers to view polls and vote in them.
MIT License
46 stars 22 forks source link

Support url template for pagination #28

Closed XVincentX closed 6 years ago

XVincentX commented 9 years ago

The actual pagination returns hardcoded URLs. This mean that, in order to navigate to the page 5, I am forced to move thought all previous pages before I can get the final url.

Given that, jump directly to a particular page is not possible.

The API should offer, beyond those links, a templated one in order to compose it on the fly and jump to a particular page.

  "_links": {
    "post": {
      "href": "/posts{/id}",
      "templated": true
    }
  }