PagingStrategy syntax for Laravel-style or length-aware style pagination
We are creating a rest connection to consume an API that uses Laravel-style (length-aware) pagination.
The request URL should be formatted as follows:
- GET /fooObject?page=2&count=200
The response will include metadata about other pages
- {
- "data": [ /* 200 foo objects here */ ],
- "links": {
- "first": "...?page=1",
- "last": "...?page=10",
- "prev": "...?page=1",
- "next": "...?page=3"
- },
- "meta": {
- "current_page": 2,
- "from": 201,
- "to": 400,
- "per_page": 200,
- "total": 1850,
- "last_page": 10
- }
- }
What syntax should I use in my rest connection metadata for this paging strategy?