Skip to content
New issue

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

Server - Paging for jokes and submissions #525

Open
4 tasks
Sv443 opened this issue Mar 10, 2024 · 0 comments
Open
4 tasks

Server - Paging for jokes and submissions #525

Sv443 opened this issue Mar 10, 2024 · 0 comments
Labels
v3 Tasks for version 3.0.0

Comments

@Sv443
Copy link
Member

Sv443 commented Mar 10, 2024

  • Add capability to divide the data into pages and return a selected page through a URL param - closes Joke Search Paginated API #459
    • for the GET jokes endpoint
    • for the GET submissions endpoint
  • TBD: allow setting page size within x bounds (maybe higher for paid tier), else default to value y

I imagine something like this, where the structure only gets changed if the page parameter is present:

GET /jokes?page=1&page-size=5

{
  data: [
    { /* joke 1 */ },
    { /* joke 2 */ },
    { /* joke 3 */ },
    { /* joke 4 */ },
    { /* joke 5 */ }
  ],
  paging: {
    currentPage: 1,
	totalPages: 12,
    totalItems: 57,
    pageSize: 5,
  }
}
@Sv443 Sv443 added the v3 Tasks for version 3.0.0 label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Tasks for version 3.0.0
Projects
Status: Backlog
Development

No branches or pull requests

1 participant