This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Events
Vrekt edited this page Jan 11, 2020
·
1 revision
The Events
class provides a wrapper for EventsPublicService
.
This is just a quick example, there are LOTS of fields and methods for events.
final var response = athena.events().downloadEvents("NAE", "Windows");
response.events().forEach(event -> {
final var windows = event.eventWindows();
System.err.println(event.eventId());
if (event.isPlatformSupported(Platform.IOS)) {
System.err.println("IOS is supported.");
}
if (event.isRegionSupported(Region.BR)) {
System.err.println("BR is supported.");
}
windows.forEach(window -> {
System.err.println(window.eventWindowId());
System.err.println(window.beginTime());
});
});
Again, just a simple example, this returns the same object as downloadEvents
so there is lots of information here.
final var download = athena.events().downloadData("NAE", true);
download.getByEventId("abc").ifPresent(event -> {
System.err.println("found event ABC.");
// etc..
});
final var events = athena.events().downloadEvents("NAE", "Windows");
events.events().forEach(event -> {
final var leaderboard = athena.events().leaderboards(event.eventId(), event.eventWindows().get(0).eventWindowId(), 0, 0, false);
leaderboard.entries().forEach(entry -> {
System.err.println(entry.rank());
System.err.println(entry.teamId());
});
});
You need:
- eventId
- eventWindowId
- Page number (0-X) (you can retrieve total number of pages with leaderboard object.)
- rank (0-??)
- showLiveSessions - if true live sessions will be given, currently not supported YET.