Add some types and test make resquests

This commit is contained in:
Guilherme Werner 2024-01-05 09:59:24 -03:00
parent 8a45692208
commit 3e6f8251a7
12 changed files with 310 additions and 2 deletions

20
examples/build.gradle Normal file
View file

@ -0,0 +1,20 @@
plugins {
id 'application'
}
version = "0.0.4"
archivesBaseName = "TribufuExample"
repositories {
mavenCentral()
}
dependencies {
implementation project(':lib')
implementation 'com.google.guava:guava:30.0-jre'
testImplementation 'junit:junit:4.13.1'
}
application {
mainClass = 'com.tribufu.example.ExampleApp'
}

View file

@ -0,0 +1,23 @@
// Copyright (c) Tribufu. All Rights Reserved.
package com.tribufu.example;
import com.tribufu.TribufuApi;
public class ExampleApp {
public static void main(String[] args) {
var api = new TribufuApi();
var games = api.getGames();
System.out.println("\n---- GAMES ----");
for (var game : games) {
System.out.println(game.name);
}
var servers = api.getServers();
System.out.println("\n---- SERVERS ----");
for (var server : servers) {
System.out.println(server.name);
}
}
}