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
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.
The text was updated successfully, but these errors were encountered:
Thanks for submitting the suggestion. I'm not too active in MC anymore, so help is certainly welcome if you're interested. The main blocker to contribution though is that you need a XenForo installation so that you can inspect the DB tables and understand the schema. If you have that, then absolutely feel free to help out.
I agree with the need for these features, I just haven't had the time to work on this much.
I sadly don't have access to the XenForo plugin. However, I can make a pretty educated guess on how things should or do work.
I created a PR for one of the smaller features in the suggestion. Sadly I cannot test it, but I hope that won't take too much time :)
For your first suggestion, I don't think there is an easy way for me to do this without some sketchy query modification. Since ordering is coming in #64 (thanks), getting the latest update is as easy as ordering descending. I do agree though, that is confusing. Unfortunately, XF treats it as an update.
I'm deferring to #54 for your second suggestion and your third suggestion will be handled in #64. :)
I'm going to close this issue because it is tracking multiple things, but everything here should be handled. (Except for the first suggestion, sorry)
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 paginationThe 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 #54Deferring to #54 for the above.
No way of sorting the resultIn 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.
The text was updated successfully, but these errors were encountered: