TheRandomLabs / CurseAPI

A Java library for handling interactions with CurseForge.
MIT License
30 stars 3 forks source link

Add method to get project by curseforge url #23

Closed ErdbeerbaerLP closed 4 years ago

ErdbeerbaerLP commented 4 years ago

I added an method to get an CurseforgeProject by providing the URL to it. It uses the cfwidget api (example URL: https://api.cfwidget.com/minecraft/mc-mods/easyworldmanager) to get the Project ID which then gets passed to the project(id) method.

Tested in my own project and it worked without problems ;)

Edit: JitCI failed? 🤔It worked for me https://jitpack.io/com/github/ErdbeerbaerLP/CurseAPI/2a6ce93777/build.log

TheRandomLabs commented 4 years ago

Sorry if you spent a lot of time on this, but I've done it my own way, which is significantly cleaner. :) CurseAPI#project(HttpUrl) for URLs and CurseAPI#project(String) for URL paths.