mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 04:20:46 +00:00
924 B
924 B
package hello.world;
import lukehagar.plexapi.plexapi.PlexAPI;
import lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse;
import lukehagar.plexapi.plexapi.models.shared.Security;
public class Application {
public static void main(String[] args) {
try {
PlexAPI sdk = PlexAPI.builder()
.setSecurity(new Security(
"<value>"){{
accessToken = "<YOUR_API_KEY_HERE>";
}})
.build();
lukehagar.plexapi.plexapi.models.operations.GetServerCapabilitiesResponse res = sdk.server.getServerCapabilities();
if (res.twoHundredApplicationJsonObject != null) {
// handle response
}
} catch (Exception e) {
// handle exception
}
}
}