-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi there!
I am currently attempting to write an update notification system for one of my plugins. Old wikis point me to the legacy API endpoint, but I figured using this would be better.
While doing some testing I noticed that the getResourceUpdate action is rather confusing. This endpoint seemed most logical to use for checking for updates. Especially since the getResource does not have a field that gives you the ID of the last resource update.
Some of my notes:
getResourceUpdate includes the resource description
The first entry in the return array is the current resource page. This is not an update and is rather confusing. I would suggest removing this one from the response. Getting this information can already be done by using getResource.
No information about the pagination
The result is an array. This array can contain up to 10 results and is paginated. That's all clear. However, the max amount of pages is not sent. Getting the latest update would require going through all pages.
Edit: Noticed just that this is also referenced by issue #54
Deferring to #54 for the above.
No way of sorting the result
In order to get the last resource updates, it would be very useful to be able to sort it by resource updated descending.
This would allow users to get the last couple of updates.
See #64
Now I am not sure how achievable these suggestions are, but I wanted to point them out anyway! An action getLastResourceUpdate?resource= would also help greatly but I am not sure if would fit in with the current API.
I am well aware that getResource gives you the current version string, but if possible I would like to parse the update description in order to notify users of why they should actually update ;)
PS: I would love to help with this so if you want me to PR some of the features feel free to ask.