You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a request to paginated endpoints such as listResources and getResourcesByAuthor, there is no way to know how many pages of resources there are without sending another request with a different page number and expecting an empty response (indicating a blank page).
This could be fixed by returning the total number of resources, and the number of resources per page (should this change in the future) in the API response.
Example GET index.php?action=getResourcesByAuthor&id=138900&page=1:
{
"meta": {
"total_items": "20",
"items_per_page": "10"
},
"items": [
{
"id": "23696",
"title": "Quests [1.8-1.17] | Set up goals for players",
"tag": "Allow your players to do quests in return for rewards",
"etc": "..."
}
]
}
The text was updated successfully, but these errors were encountered:
When sending a request to paginated endpoints such as
listResources
andgetResourcesByAuthor
, there is no way to know how many pages of resources there are without sending another request with a different page number and expecting an empty response (indicating a blank page).This could be fixed by returning the total number of resources, and the number of resources per page (should this change in the future) in the API response.
Example
GET index.php?action=getResourcesByAuthor&id=138900&page=1
:The text was updated successfully, but these errors were encountered: