Closed jacobsandersen closed 3 years ago
Going to do some work on this soon. Have had too much school stuff going on recently.
@md-5 This is ready for review. For your reference:
ADDITIONS
getResourceUpdate
and getResourceUpdates
routes have been added. For the former, it is requesting a specific update by its update id. For the latter, it is finding all updates for a given resource by the resource id. This addresses #14.
Resources and authors now contain the respective icon URL if one exists. Otherwise, it will return the default icon. This makes use of the PUBLIC_PATH
config setting. We had this before, but did not want to keep it because it was downloading every image and base64 encoding it. This simply provides a link, and the user will have to do whatever they want with it at that point. This addresses #22.
A findUser
route was added which accepts a name
parameter and finds a user by exact username match. This is not a general search feature, so it does not fully honor the issue, but I did not want to go too far and add too much to this route. Maybe I can add more later. Depends on demand. This addresses #24.
A listResources
route which accepts category
and page
arguments. The category
is numeric and refers to the ID of the category (as opposed to name), and the page
is numeric defaulting to 1
. Response is truncated to 10 results per page and this is not user modifiable. Can be decreased or increased as required. If no category is specified, resources will simply be returned in ascending order by resource id. To accommodate the numeric category, a second route listResourceCategories
was made available. This route will show available category IDs with title and description. This addresses #32.
CHANGES
A docker environment was added so anyone can run the API and help code. They just need a XenForo w/ XenForo Resource Manager instance to point it at.
Hopefully identities are fixed this time around, but like before it's still a guessing game. If so, this addresses #30.
The native and supported minecraft versions are now shown on the resource route(s). This addresses #31.
The resource description has been exposed on the resource route(s). This addresses #34.
A discrepancy in what the API reports as 'reviews' was identified in that what we show is the total amount of reviews and not unique amount of reviews across all downloads. The API now shows both unique and total review counts. This addresses #35.
The API now checks whether or not a user actually wants to share their identities before putting them in the response. This addresses #36.
And that should be it!
EXTRA The DB fields needed have slightly changed for resource/author and there are some extra queries to look at. If you have any questions or need clarification please just reach out.
Thanks, simple
Nice work
Looks good as far as my php skills go. Trying to find an extra pair of eyes or two would probably be helpful, but otherwise I'm ok with merging
One thing probably worth double checking though, does this need php 8? We currently run 7.3 as that's the supported debian version https://packages.debian.org/buster/php
Looks good to me. Great work!
Thank you for reviewing Marc, I appreciate it!
Looks good as far as my php skills go. Trying to find an extra pair of eyes or two would probably be helpful, but otherwise I'm ok with merging
One thing probably worth double checking though, does this need php 8? We currently run 7.3 as that's the supported debian version https://packages.debian.org/buster/php
Does not need php 8, nope. I just updated the docker stuff to use 7.3 to match Spigot's env. I tested every route and all works as expected!
I asked Marc to review and I'm looking for one more person, or you can merge if you feel okay with it already.
Thanks both!
Excellent stuff. Thanks very much Marc, likewise I really appreciate it.
All good with this from me and can merge if you wish. Unfortunately can't deploy right now as otherwise preoccupied, but I will make sure it is deployed ASAP.
Thanks again for your hard work Simple, also really appreciate it.
Ready to merge!
Thanks a lot md! Good luck with the 1.17 update 😎
getResourceUpdates
as I forgot to do so. Now in case a resource is particularly prolific in updates, the request to the API won't murder the databaseOkay, now it's really ready to go. Just had some itches to scratch there. Not touching anymore 👍🏻
Merged and will work on deploying
Intends to: