Created
January 17, 2022 16:37
-
-
Save derklaro/55d195ab84e57639914483a329fcf132 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private final SpigetClient client = new Java11SpigetClient(GsonMapper.INSTANCE); | |
public void listAndPrintCategories() { | |
client.categoryList().size(5).exec().whenComplete((result, exception) -> { | |
if (exception != null) { | |
System.err.println("Unable to fetch because " + exception.getMessage()); | |
} else { | |
result.forEach(category -> System.out.println(category.name())); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment