TheRandomLabs / CurseAPI

A Java library for handling interactions with CurseForge.
MIT License
30 stars 3 forks source link
curse curseapi curseforge java java-library

CurseAPI

License: MIT

Build Dependabot

Average time to resolve an issue

A Java library for handling interactions with CurseForge.

All public-facing code is documented with Javadoc and (mostly) tested with JUnit.

Usage

The methods found in CurseAPI can be used to retrieve information about projects and files.

final Optional<CurseFiles<CurseFile>> optionalFiles = CurseAPI.files(285612);

if (optionalFiles.isPresent()) {
    final CurseFiles<CurseFile> files = optionalFiles.get();
    new CurseFileFilter().gameVersionStrings("1.12.2").apply(files);
    //Or:
    //files.filter(new CurseFileFilter().gameVersionStrings("1.12.2"));
    logger.info("Latest 1.12.2 file: {}", files.first());
}

Using with Gradle

CurseAPI can be found on Jitpack:

repositories {
    mavenCentral()

    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    api "com.github.TheRandomLabs:CurseAPI:master-SNAPSHOT"
}

CurseAPI uses SLF4J to log warnings, errors and information messages.