We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right now, sending a GET /events returns the list of all events in the db. This is inefficient when the list grows.
/events
Add pagination to /events allowing consumers to receive event data in chunks
The text was updated successfully, but these errors were encountered:
Can use implementation similar to https://reqres.in/ where you pass the number of items per page and the page number as url query params like so:
https://reqres.in/api/users?page=2&per_page=3
This means the API should be able to specify the current page number, number of items per page, total items, and total pages: Sample:
{ "page": 2, "per_page": 3, "total": 12, "total_pages": 4, "data": [ { "id": 4, "email": "eve.holt@reqres.in", "first_name": "Eve", "last_name": "Holt", "avatar": "https://reqres.in/img/faces/4-image.jpg" }, { "id": 5, "email": "charles.morris@reqres.in", "first_name": "Charles", "last_name": "Morris", "avatar": "https://reqres.in/img/faces/5-image.jpg" }, { "id": 6, "email": "tracey.ramos@reqres.in", "first_name": "Tracey", "last_name": "Ramos", "avatar": "https://reqres.in/img/faces/6-image.jpg" } ] }
Sorry, something went wrong.
alvyynm
No branches or pull requests
Current Situation
Right now, sending a GET
/events
returns the list of all events in the db. This is inefficient when the list grows.Solution
Add pagination to
/events
allowing consumers to receive event data in chunksThe text was updated successfully, but these errors were encountered: