y9vad9/SketchwareAPI

Java support

y9san9 opened this issue · 1 comments

Guys that making mods may be interested by this library, but they may not know koltin

Recently, I added SketchwareJavaAPI (Java wrapper).
To use the library in Java, include the following dependencies in build.gradle:

repositories {
    maven { url 'https://dl.kotlingang.fun' }
}
dependencies {
    implementation "io.sketchware.api:SketchwareJavaAPI:[version]"
}

Everything works the same as in the Kotlin version, only in the Java version callbacks appeared:

SketchwareJavaAPIClient client = new SketchwareJavaAPIClient();
client.getAllTags(new ResponseCallback<>() {
@Override
public void onSuccess(List<SharedTag> body) {
System.out.println(body);
}

@Override
public void onError(@NotNull Throwable throwable) {
System.err.println(throwable.getLocalizedMessage());
}
});