Skip to content

Server - Paging for jokes and submissions #525

Open
@Sv443

Description

@Sv443
  • 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,
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3Tasks for version 3.0.0

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions