Public FlexPlex library
Go to file
2023-07-30 19:48:56 +03:00
src/main/java/fi/flexplex/lib Remove logger and change initialization 2023-07-30 19:34:49 +03:00
.gitignore FlexPlex api wrapper first version 2023-07-30 04:39:23 +03:00
pom.xml Remove logger and change initialization 2023-07-30 19:34:49 +03:00
README.md Update Readme 2023-07-30 19:48:56 +03:00

FlexLib

Java Wrapper for FlexPlex API

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>fi.jonttu.git.FlexPlex</groupId>
    <artifactId>FlexLib</artifactId>
    <version>Version</version>
</dependency>

Dependencies

<dependency>
    <groupId>com.neovisionaries</groupId>
    <artifactId>nv-websocket-client</artifactId>
    <version>2.14</version>
</dependency>
<dependency>
    <groupId>com.google.code.gson</groupId>
    <artifactId>gson</artifactId>
    <version>2.8.9</version>
</dependency>

Example

// Instantiate FlexLib, this should be done only once and instance saved.
final FlexLib flexLib = new FlexLib()
    .setToken("a06ccc622e2976b1d1e28145ebdc2ab408f3fc5ca0f5f4ee09d40b91ba0e903c")
    .addListener(new FlexLibAdapter());

flexLib.start();

// Get friends API if its available
final Optional<PlayerFriends> playerFriends = getPlayerFriends("a2a20f04-b722-4192-b184-8e41f1080ead");
if (playerFriends.isPresent()) {
    final Set<UUID> friends = playerFriends.getFriends();
}

// Disables FlexLib
flexLib.disable();