Skip to content

RedGuyRu/RedGuyAPIJava

Repository files navigation

RedGuyAPIJava

Codacy Badge GitHub code size in bytes GitHub commit activity

Library to use redguy api.

Install

Gradle:

repositories {
    mavenCentral()
    maven {
        url "https://repo.redguy.ru/repository/maven-public/"
    }
}

dependencies {
    implementation group: 'ru.redguy', name: 'redguyapi', version: '2.0.0'
}

Usage

RedGuyApi api = RedGuyApi.builder("token")
        .baseUrl("https://api.redguy.ru/")
        .build();

ServerInfo serverInfo = api.minecraft().serverInfo("play.example.org");
User user = api.users().info();

For the default API URL, the short constructor is still available:

RedGuyApi api = new RedGuyApi("token");

Guard API

Guard API uses a separate base URL and Bearer token authorization:

GuardApi guard = GuardApi.builder("token").build();

GasStatus gas = guard.gas().status(123456789L);
AiPack pack = guard.ai().pack("Minecraft");
UserInfoResponse user = guard.users().info(
        "123456789",
        Arrays.asList("-1001234567890")
);

Public Guard endpoints can also be called without a token:

GuardApi guard = GuardApi.builder().build();
GasStatus gas = guard.gas().status(123456789L);

About

Java wrapper for redguy.ru api

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages