mcdelta-project / deltamc-archive

All the JSON files for mods.
2 stars 1 forks source link

Adding new versions of mods should be automated. How should it be done? #8

Open williambl opened 7 years ago

williambl commented 7 years ago

I found this API for curse. I'll create a program which parses the output from it.

Valiec commented 5 years ago

Another curseforge API.

https://www.reddit.com/r/feedthebeast/comments/9vj5nm/wip_curseforge_minecraft_mod_indexer_api/

williambl commented 5 years ago

Wow, I'd forgotten all about this project... do either of these APIs still work with the new curseforge redesign?

Valiec commented 5 years ago

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).

Valiec commented 5 years ago

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.

Valiec commented 5 years ago

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).

Valiec commented 5 years ago

Well, I created a DB anyway, and it has the slugs and ids of every mod on CurseForge.

Valiec commented 5 years ago

Besides the description being full of HTML, it is getting the info (can't install curse mods yet though, but I'm making progress):

Screen Shot 2019-07-10 at 11 28 06 PM
Valiec commented 5 years ago

Since I'm getting into implementation, I'm opening an issue for this on deltamc-python.

https://github.com/deltamc-project/deltamc-python/issues/50