ertograham.fortnite-api-rest-client.5.0.3.source-code.Main Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fortnite-api-rest-client Show documentation
Show all versions of fortnite-api-rest-client Show documentation
Provides access to the Fortnite REST API
import io.github.robertograham.fortniteapirestclient.FortniteApiRestClient;
import io.github.robertograham.fortniteapirestclient.domain.Credentials;
import io.github.robertograham.fortniteapirestclient.domain.constant.PartyType;
import io.github.robertograham.fortniteapirestclient.domain.constant.Platform;
import io.github.robertograham.fortniteapirestclient.domain.constant.StatWindow;
import java.util.concurrent.ExecutionException;
public class Main {
public static void main(String[] args) throws ExecutionException, InterruptedException {
FortniteApiRestClient fortniteApiRestClient = FortniteApiRestClient.builder(new Credentials("[email protected]", "Rob13967", "MzRhMDJjZjhmNDQxNGUyOWIxNTkyMTg3NmRhMzZmOWE6ZGFhZmJjY2M3Mzc3NDUwMzlkZmZlNTNkOTRmYzc2Y2Y=", "ZWM2ODRiOGM2ODdmNDc5ZmFkZWEzY2IyYWQ4M2Y1YzY6ZTFmMzFjMjExZjI4NDEzMTg2MjYyZDM3YTEzZmM4NGQ="))
.build();
fortniteApiRestClient.winsLeaderBoard(Platform.PC, PartyType.SOLO, StatWindow.WEEKLY, 100)
.thenAcceptAsync(System.out::println)
.thenRunAsync(fortniteApiRestClient::close)
.get();
}
}