Skip to content

Commit a7b86f2

Browse files
committed
Added pagination GET examples in README
1 parent 8e85d68 commit a7b86f2

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
@@ -785,12 +785,22 @@ The `paged` `paginator` returns results based on pages of a fixed size. Valid `p
785785
If `number` is omitted the first page is returned. If `size` is omitted the `default_page_size` from the configuration
786786
settings is used.
787787

788+
```
789+
GET /articles?page%5Bnumber%5D=10&page%5Bsize%5D=10 HTTP/1.1
790+
Accept: application/vnd.api+json
791+
```
792+
788793
###### Offset Paginator
789794

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

799+
```
800+
GET /articles?page%5Blimit%5D=10&page%5Boffset%5D=10 HTTP/1.1
801+
Accept: application/vnd.api+json
802+
```
803+
794804
###### Custom Paginators
795805

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

0 commit comments

Comments
 (0)