mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-09 12:37:47 +00:00
SDK update generated by liblab
This commit is contained in:
32
examples/pom.xml
Normal file
32
examples/pom.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.plexsdk</groupId>
|
||||
<artifactId>examples</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.14.0-rc1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.plexsdk</groupId>
|
||||
<artifactId>PlexSDK</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
20
examples/src/main/java/com/plexsdk/examples/Main.java
Normal file
20
examples/src/main/java/com/plexsdk/examples/Main.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.plexsdk.examples;
|
||||
|
||||
import com.plexsdk.PlexSDK;
|
||||
import com.plexsdk.exceptions.ApiException;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
PlexSDK client = new PlexSDK(
|
||||
System.getenv("PLEXSDK_API_KEY"),
|
||||
System.getenv("PLEXSDK_API_KEY_HEADER")
|
||||
);
|
||||
try {
|
||||
Object response = client.serverService.getServerCapabilities();
|
||||
System.out.println(response);
|
||||
} catch (ApiException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user