Library to use redguy api.
Gradle:
repositories {
mavenCentral()
maven {
url "https://repo.redguy.ru/repository/maven-public/"
}
}
dependencies {
implementation group: 'ru.redguy', name: 'redguyapi', version: '2.0.0'
}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 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);