Skip to content

Commit 32a7861

Browse files
committed
Merge pull request #612 from coryodaniel/pagination-readme-notes
Added pagination GET examples in README
2 parents 947077a + a7b86f2 commit 32a7861

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,12 +788,22 @@ The `paged` `paginator` returns results based on pages of a fixed size. Valid `p
788788
If `number` is omitted the first page is returned. If `size` is omitted the `default_page_size` from the configuration
789789
settings is used.
790790

791+
```
792+
GET /articles?page%5Bnumber%5D=10&page%5Bsize%5D=10 HTTP/1.1
793+
Accept: application/vnd.api+json
794+
```
795+
791796
###### Offset Paginator
792797

793798
The `offset` `paginator` returns results based on an offset from the beginning of the resultset. Valid `page` parameters
794799
are `offset` and `limit`. If `offset` is omitted a value of 0 will be used. If `limit` is omitted the `default_page_size`
795800
from the configuration settings is used.
796801

802+
```
803+
GET /articles?page%5Blimit%5D=10&page%5Boffset%5D=10 HTTP/1.1
804+
Accept: application/vnd.api+json
805+
```
806+
797807
###### Custom Paginators
798808

799809
Custom `paginators` can be used. These should derive from `Paginator`. The `apply` method takes a `relation` and

0 commit comments

Comments
 (0)