Open williambl opened 7 years ago
Another curseforge API.
https://www.reddit.com/r/feedthebeast/comments/9vj5nm/wip_curseforge_minecraft_mod_indexer_api/
Wow, I'd forgotten all about this project... do either of these APIs still work with the new curseforge redesign?
The one you posted works perfectly. I later found another one (Cursemeta), and a page documenting the twitch api itself (reverse engineered from the twitch launcher), but both of these require keeping a database of mod slugs to curseforge mod ids. The cfwidget api does not.
To use the example from its docs page, you can do https://api.cfwidget.com/mc-mods/minecraft/more-swords-mod not https://api.cfwidget.com/mc-mods/minecraft/59903 and you don't need to setup and maintain a database of every single mod id to mod slug on curseforge.
Cfwidget seems to be the way to go now.
Based on what happened when I tried https://api.cfwidget.com/mc-mods/minecraft/59903 (as if "59903" was the slug), I think it's maintaining a db itself (so why make another db?), the only issue is a 10-second delay if you ask for something no one has asked it before (probably means it's caching data from requests to make its db, not just scanning the whole range of ids automatically).
The one thing it doesn't have is a "list every single mod there is" feature (which breaks the list of available mods in the GUI), but neither do the other APIs.
But with 13,236 mods, that list would probably break from the load anyway.
The other API (which looks like a wrapper around the Twitch API), can be used to get a list of all the mods, but it takes around 370 requests every time...or I cache this and update it all the time (i.e. a database).
Well, I created a DB anyway, and it has the slugs and ids of every mod on CurseForge.
Besides the description being full of HTML, it is getting the info (can't install curse mods yet though, but I'm making progress):
Since I'm getting into implementation, I'm opening an issue for this on deltamc-python.
I found this API for curse. I'll create a program which parses the output from it.