CollActionteam / collaction_backend

Backend code for CollAction
6 stars 4 forks source link

[Api2] [Doc] Pagination (documentation) #95

Open rubenhorn opened 2 years ago

rubenhorn commented 2 years ago

Pagination in the API should be implemented as an extension to JSend. A successful response may include the field nextPage (null, if it does not exist) and should accept the query parameter page with a default value if not present.

Example request:

GET /some/path?page=<PAGE_ID>

Example response:

{
   "status": "success",
   "data": { ... },
   "nextPage": <PAGE_ID>
}

⚠ Please update the API documentation when implementing pagination. (This ticket should remain open until all "legacy" features have been switched to pagination)

rubenhorn commented 2 years ago

Good explanation and Simple Python demo.