PaginationPageNumber¶
Numbered pages, with the total: ?page=2&page_size=20.
In an app: the example. How strategies work: Pagination. Every argument: the API reference.
Numbered pages, with the total: GET /products?page=2&page_size=20 answers
{"items": [...], "total": 245, "page": 2, "page_size": 20, "pages": 13}. For lists that people
browse page by page, jump through, and want to know the size of.
- From a database: query only the page, with
params.offsetandparams.limit, and count:pages.paginate(rows, params, total=count). Withouttotal,paginateslices the page from the whole list. - Links: first, previous, next and last.
- Its cost: counting the whole list on every page, and the shifting of pages by position.