-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
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": "..."
}
]
}amnotbananaama, itaquito, tgb20 and kernitus