ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.401.2

This commit is contained in:
speakeasybot
2024-09-21 00:25:44 +00:00
parent f3780ae807
commit 3499fe6d12
190 changed files with 4636 additions and 5690 deletions

View File

@@ -28,43 +28,30 @@ Get Server Capabilities
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -92,43 +79,30 @@ Get Server Preferences
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerPreferencesBadRequest, GetServerPreferencesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerPreferencesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerPreferencesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -156,43 +130,30 @@ Get Available Clients
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest;
import dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized;
import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetAvailableClientsBadRequest, GetAvailableClientsUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetAvailableClientsBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetAvailableClientsUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -220,43 +181,30 @@ Get Devices
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetDevicesBadRequest;
import dev.plexapi.sdk.models.errors.GetDevicesUnauthorized;
import dev.plexapi.sdk.models.operations.GetDevicesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetDevicesBadRequest, GetDevicesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetDevicesResponse res = sdk.server().getDevices()
GetDevicesResponse res = sdk.server().getDevices()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetDevicesBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetDevicesUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -284,39 +232,28 @@ This request is useful to determine if the server is online or offline
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout;
import dev.plexapi.sdk.models.operations.GetServerIdentityResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception {
PlexAPI sdk = PlexAPI.builder()
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerIdentityResponse res = sdk.server().getServerIdentity()
GetServerIdentityResponse res = sdk.server().getServerIdentity()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerIdentityRequestTimeout e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -343,43 +280,30 @@ Returns MyPlex Account Information
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest;
import dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized;
import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetMyPlexAccountBadRequest, GetMyPlexAccountUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetMyPlexAccountUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -408,7 +332,8 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest;
import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized;
import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest;
import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse;
import dev.plexapi.sdk.models.operations.MinSize;
@@ -417,46 +342,32 @@ import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetResizedPhotoBadRequest, GetResizedPhotoUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
.width(110d)
.height(165d)
.opacity(100L)
.blur(4000d)
.minSize(MinSize.ZERO)
.upscale(Upscale.ZERO)
.blur(0d)
.minSize(MinSize.ONE)
.upscale(Upscale.ONE)
.url("/library/metadata/49564/thumb/1654258204")
.build();
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
GetResizedPhotoResponse res = sdk.server().getResizedPhoto()
.request(req)
.call();
// handle response
} catch (dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
}
// handle response
}
}
```
@@ -490,44 +401,31 @@ Retrieves media providers and their features from the Plex server.
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest;
import dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized;
import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetMediaProvidersBadRequest, GetMediaProvidersUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetMediaProvidersBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetMediaProvidersUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```
@@ -561,43 +459,30 @@ Get Server List
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.errors.GetServerListBadRequest;
import dev.plexapi.sdk.models.errors.GetServerListUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerListResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
try {
PlexAPI sdk = PlexAPI.builder()
public static void main(String[] args) throws GetServerListBadRequest, GetServerListUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.clientID("gcgzw5rz2xovp84b4vha3a40")
.clientName("Plex Web")
.clientVersion("4.133.0")
.clientPlatform("Chrome")
.deviceName("Linux")
.build();
.build();
GetServerListResponse res = sdk.server().getServerList()
GetServerListResponse res = sdk.server().getServerList()
.call();
if (res.object().isPresent()) {
// handle response
}
} catch (dev.plexapi.sdk.models.errors.GetServerListBadRequest e) {
// handle exception
throw e;
} catch (dev.plexapi.sdk.models.errors.GetServerListUnauthorized e) {
// handle exception
throw e;
} catch (SDKError e) {
// handle exception
throw e;
} catch (Exception e) {
// handle exception
throw e;
if (res.object().isPresent()) {
// handle response
}
}
}
```