Skip to content

JonaHD345/XenforoResourceManagerAPI-Java

Repository files navigation

XenforoResourceManagerAPI-Java

Maven Central License

Java-client for the XenforoResourceManagerAPI from SpigotMC.org https://github.com/SpigotMC/XenforoResourceManagerAPI

Issues and pull requests are welcome!

Installation

To use this project in your Maven-based project, add the following dependency:

<dependency>
    <groupId>de.jonahd345</groupId>
    <artifactId>xenfororesourcemanagerapi</artifactId>
    <version>1.1.1</version>
</dependency>

Usage

XenforoResourceManagerAPI api = new XenforoResourceManagerAPI();

// get Resource (with id)
Resource resource = api.getResource(106888);
if (resource != null) {
    List<Update> updatesOfResource = api.getResourceUpdates(resource.getId());
}

// get Author async (in this way available for all endpoints)
CompletableFuture<Author> futureAuthor = api.getAuthorAsync(1407849);

futureAuthor.thenAccept(author -> {
    if (author != null) {
        System.out.println("Author: " + author.getUsername());
    } else {
        System.out.println("Author not found.");
    }
});

coded with ❤️ by JonaHD345

About

Java implementation of the XenforoResourceManagerAPI from @SpigotMC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages