json-api-store icon indicating copy to clipboard operation
json-api-store copied to clipboard

[Feature] Ability to use nested page options

Open Emerson opened this issue 9 years ago • 0 comments

Priority

High (for me anyways)

What Changed & Why

The official JSON API Spec has a bunch of examples that suggest users can use nested page parameters. If you check the examples page you'll find something like this:

GET /articles?page[number]=3&page[size]=1 HTTP/1.1

One of the most popular JSON API projects for Rails uses this convention, so I think it's worth adding to this repo.

Testing

  • [ ] Run npm test browser and npm test node on the command line. Everything passes.

Documentation

var options = {
  page: {
    number: 5,
    size: 1
  }
}

=> page[number]=5&page[size]=1

In Progress/Follow Up

None

People

@Emerson @haydn

Emerson avatar Mar 11 '16 16:03 Emerson