Update Readme
This commit is contained in:
parent
3500a2a2fe
commit
a13c2abd01
@ -36,12 +36,16 @@ Java Wrapper for FlexPlex API
|
|||||||
|
|
||||||
```java
|
```java
|
||||||
// Instantiate FlexLib, this should be done only once and instance saved.
|
// Instantiate FlexLib, this should be done only once and instance saved.
|
||||||
final FlexLib flexLib = new FlexLib("token", Logger.getGlobal());
|
final FlexLib flexLib = new FlexLib()
|
||||||
|
.setToken("a06ccc622e2976b1d1e28145ebdc2ab408f3fc5ca0f5f4ee09d40b91ba0e903c")
|
||||||
|
.addListener(new FlexLibAdapter());
|
||||||
|
|
||||||
|
flexLib.start();
|
||||||
|
|
||||||
// Get friends API if its available
|
// Get friends API if its available
|
||||||
final Optional<PlayerFriends> playerFriends = getPlayerFriends("a2a20f04-b722-4192-b184-8e41f1080ead");
|
final Optional<PlayerFriends> playerFriends = getPlayerFriends("a2a20f04-b722-4192-b184-8e41f1080ead");
|
||||||
if (playerFriends.isPresent()) {
|
if (playerFriends.isPresent()) {
|
||||||
final Set<UUID> friends = playerFriends.getFriends();
|
final Set<UUID> friends = playerFriends.getFriends();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disables FlexLib
|
// Disables FlexLib
|
||||||
|
Loading…
Reference in New Issue
Block a user