Closed LoneWanderer-GH closed 1 year ago
Thanks for the suggestion @LoneWanderer-GH! I'm not familiar with Curseforge at all, but based on all the info you collated and shared above this seems very doable.
Few questions for you:
Repository name
in the issue description for one of the badges we could support. Can you provide more details on that one?gamePopularityRank
and popularityScore
in the response that could be usedRelated issue here: https://github.com/way2muchnoise/CurseForgeBadge/issues/15
* How would users go about locating their project number? Is it common knowledge or would users of these badges on Shields need to know how to look up/locate their respective project number?
Most of the time, project owner or developper has to know project numbers since they can be used for webhooks/package api. This is not a tricky thing to obtain see this screen of a project page:
* You mentioned `Repository name` in the issue description for one of the badges we could support. Can you provide more details on that one?
I think RedSparr0w answered the question. This repo https://github.com/way2muchnoise/CurseForgeBadge has no commits on master since 31 oct. 2019. The project provides an API to build simple badges, and I guess it relies on a server hosted by repo owner. I found the shields.io API more flexible/appealing, but that's my taste.
* Would badges with popularity data be of interest? It looks like there's `gamePopularityRank` and `popularityScore` in the response that could be used
I can't tell for others, but yeah, downloads, versions supported,
gamePopularityRank
/popularityScore
might be of interest.
Side note, the curseforge api data available seems to be refreshed at a lower rate than the API used by the twitch application (project page download count and twitch app download count are accurately refreshed, by the above api reply is not (stayed at 44 for a while then jumped at 431. Not really an issue, but worth to know if an actual badge support is provided. It may avoid lots of bug reports.
For a better api, I could be a good idea to wireshark the Twitch app what is the app web api and if it has the same access level/techniques as https://addons-ecs.forgesvc.net/api/v2/addon/ (too bad curseforge does not provide a reliable page for this kind of matters
This is not a tricky thing to obtain see this screen of a project page:
Great! We like to include some inline documentation in these types of circumstances to provide Shields users with guidance on how they can obtain the values they need for the badge parameters
You mentioned Repository name in the issue description for one of the badges we could support. Can you provide more details on that one?
I think RedSparr0w answered the question.
I still do not understand what a "Curseforge repository name" badge would look like in the context of Shields.
Side note, the curseforge api data available seems to be refreshed at a lower rate than the API used by the twitch application (project page download count and twitch app download count are accurately refreshed, by the above api reply is not (stayed at 44 for a while then jumped at 431. Not really an issue, but worth to know if an actual badge support is provided. It may avoid lots of bug reports.
Could simply be a caching issue on that inline badge, but worth keeping an eye on. It'd be helpful if someone with an account could do some comparisons of the API response values and whatever is shown within the actual app to see what, if any, data latency there may be in the API
It looks like the CurseForge had the time to break. I can't find a way to get a project's details.
This is the only thing I found that still works : https://bukkit.gamepedia.com/ServerMods_API
https://api.cfwidget.com/{projectid}
I use this for all my purposes, it returns not much json that is easily parsable. I'd add it but I only know java
I am fairly certain the api caches download count for a while, I dont know exactly how much. Has the resource you are looking at grown significantly in the past few days?
What is the current status of this? I'd like to be able to have a badge for CurseForge downloads. The other alternatives for this right now don't fit to the shields badges as they use other structures and colors, so I would love to see this happening. ^^
Thanks to @Minecraftschurli's and @SandroHc's contributions, we now support three CurseForge badges:
Going to close this issue. Feel free to open a follow up issue or PRs to propose new CurseForge badges. 😉
:clipboard: Description
Badges for CurseForge addons.
Simple example: One could also give a shot to the very nice project https://github.com/way2muchnoise/CurseForgeBadge that does part of the job but may not be as popular a shileds
:link: Data
Where can we get the data from?
:microphone: Motivation
Please explain why this feature should be implemented and how it would be used.
Example of request result: