diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 32492a89..2af60a63 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,23 +1,23 @@ lockVersion: 2.0.0 id: 1732900d-e173-47c1-a90d-d45182eb35d9 management: - docChecksum: f387ae03f10decba230886eaab322b20 + docChecksum: f12b653820ae77ca3b2820bc9459d866 docVersion: 0.0.3 - speakeasyVersion: 1.404.5 - generationVersion: 2.426.2 - releaseVersion: 0.6.2 - configChecksum: 046f14829c0f092a936a69c12a4534a8 + speakeasyVersion: 1.405.6 + generationVersion: 2.428.1 + releaseVersion: 0.7.0 + configChecksum: 778e40a6f6ea35580b5da4c033f0b08f repoURL: https://github.com/LukeHagar/plexjava.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.30.3 + core: 3.30.4 deprecations: 2.81.1 downloadStreams: 0.1.1 enums: 2.81.2 - errors: 0.1.3 + errors: 0.1.4 flattening: 2.81.1 globalSecurity: 2.82.7 globalSecurityCallbacks: 0.1.0 @@ -28,7 +28,6 @@ features: nameOverrides: 2.81.3 nullables: 0.1.0 sdkHooks: 0.1.0 - tests: 0.1.0 generatedFiles: - .gitattributes - CONTRIBUTING.md @@ -1714,22 +1713,6 @@ generatedFiles: - src/main/java/dev/plexapi/sdk/utils/TypedObject.java - src/main/java/dev/plexapi/sdk/utils/Types.java - src/main/java/dev/plexapi/sdk/utils/Utils.java - - src/test/java/dev/plexapi/sdk/ActivitiesTests.java - - src/test/java/dev/plexapi/sdk/AuthenticationTests.java - - src/test/java/dev/plexapi/sdk/ButlerTests.java - - src/test/java/dev/plexapi/sdk/HubsTests.java - - src/test/java/dev/plexapi/sdk/LibraryTests.java - - src/test/java/dev/plexapi/sdk/LogTests.java - - src/test/java/dev/plexapi/sdk/MediaTests.java - - src/test/java/dev/plexapi/sdk/PlaylistsTests.java - - src/test/java/dev/plexapi/sdk/PlexTests.java - - src/test/java/dev/plexapi/sdk/SearchTests.java - - src/test/java/dev/plexapi/sdk/ServerTests.java - - src/test/java/dev/plexapi/sdk/SessionsTests.java - - src/test/java/dev/plexapi/sdk/StatisticsTests.java - - src/test/java/dev/plexapi/sdk/UpdaterTests.java - - src/test/java/dev/plexapi/sdk/VideoTests.java - - src/test/java/dev/plexapi/sdk/WatchlistTests.java examples: getServerCapabilities: speakeasy-default-get-server-capabilities: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ecbb56c3..96325611 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 0.6.2 + version: 0.7.0 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 16487616..50f5c169 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.404.5 +speakeasyVersion: 1.405.6 sources: my-source: sourceNamespace: my-source @@ -8,8 +8,8 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:a9bd67eaa35b8311162ae769209f725cc5da16e57976b4928c54594c02cd451c - sourceBlobDigest: sha256:43ddffba137c37d2f64f8db185179a273bcc5ca7242594c932da99d1eb7f3e98 + sourceRevisionDigest: sha256:b377f79289070406b0d4adcf59fa6886c6c90cb13a7893c07b44cae956ee25e4 + sourceBlobDigest: sha256:92072097f693005146db1ceb5728eee08693d61bb5578b26c32dcbe1cc32927f tags: - latest - main @@ -17,10 +17,10 @@ targets: plexjava: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:a9bd67eaa35b8311162ae769209f725cc5da16e57976b4928c54594c02cd451c - sourceBlobDigest: sha256:43ddffba137c37d2f64f8db185179a273bcc5ca7242594c932da99d1eb7f3e98 + sourceRevisionDigest: sha256:b377f79289070406b0d4adcf59fa6886c6c90cb13a7893c07b44cae956ee25e4 + sourceBlobDigest: sha256:92072097f693005146db1ceb5728eee08693d61bb5578b26c32dcbe1cc32927f codeSamplesNamespace: code-samples-java-plexjava - codeSamplesRevisionDigest: sha256:40bad00663958b34b9255a105a42474263029fd25e58660da79a50057fc50f7a + codeSamplesRevisionDigest: sha256:ad2e918f9c50ecf860a405c94410f64a3ad90197c672258c177fd2e9d1f3d9a6 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index dc3fb7a4..ce4b6a5a 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.plexapi:plexapi:0.6.2' +implementation 'dev.plexapi:plexapi:0.7.0' ``` Maven: @@ -70,7 +70,7 @@ Maven: dev.plexapi plexapi - 0.6.2 + 0.7.0 ``` @@ -274,10 +274,7 @@ The following global parameters are available. | Name | Type | Required | Description | | ---- | ---- |:--------:| ----------- | -| clientID | java.lang.String | | The unique identifier for the client application -This is used to track the client application and its usage -(UUID, serial number, or other number unique per device) - | +| clientID | java.lang.String | | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) | | clientName | java.lang.String | | The clientName parameter. | | clientVersion | java.lang.String | | The clientVersion parameter. | | clientPlatform | java.lang.String | | The clientPlatform parameter. | @@ -329,13 +326,15 @@ public class Application { ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Exception type. +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. -| Error Object | Status Code | Content Type | +By default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `getServerCapabilities` method throws the following exceptions: + +| Error Type | Status Code | Content Type | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | models/errors/GetServerCapabilitiesBadRequest | 400 | application/json | | models/errors/GetServerCapabilitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ### Example diff --git a/RELEASES.md b/RELEASES.md index 3ad534a8..6bbc57d0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -128,4 +128,14 @@ Based on: ### Generated - [java v0.6.2] . ### Releases -- [Maven Central v0.6.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.6.2 - . \ No newline at end of file +- [Maven Central v0.6.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.6.2 - . + +## 2024-10-01 00:28:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.7.0] . +### Releases +- [Maven Central v0.7.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.7.0 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3913a8ca..4a8754b4 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "dev.plexapi" -version = "0.6.2" +version = "0.7.0" sourcesJar { archiveBaseName = "plexapi" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'dev.plexapi' artifactId = 'plexapi' - version = '0.6.2' + version = '0.7.0' from components.java @@ -152,9 +152,6 @@ dependencies { implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'org.apache.httpcomponents:httpmime:4.5.14' implementation 'commons-io:commons-io:2.15.1' - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' - testImplementation 'org.mockito:mockito-core:5.12.0' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2' } diff --git a/docs/models/operations/GetPinRequest.md b/docs/models/operations/GetPinRequest.md index 6ea26022..046a9069 100644 --- a/docs/models/operations/GetPinRequest.md +++ b/docs/models/operations/GetPinRequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `strong` | *Optional* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | -| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | -| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | -| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | -| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | -| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `strong` | *Optional* | :heavy_minus_sign: | Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non-Strong codes are used for `Plex.tv/link`
| | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) | gcgzw5rz2xovp84b4vha3a40 | +| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | +| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | +| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | +| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file diff --git a/docs/models/operations/GetServerResourcesRequest.md b/docs/models/operations/GetServerResourcesRequest.md index 2b4cacd6..c5212001 100644 --- a/docs/models/operations/GetServerResourcesRequest.md +++ b/docs/models/operations/GetServerResourcesRequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `includeHttps` | [Optional](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `includeRelay` | [Optional](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `includeIPv6` | [Optional](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `includeHttps` | [Optional](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `includeRelay` | [Optional](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `includeIPv6` | [Optional](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) | gcgzw5rz2xovp84b4vha3a40 | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdRequest.md b/docs/models/operations/GetTokenByPinIdRequest.md index e9e22ea6..429b1b4b 100644 --- a/docs/models/operations/GetTokenByPinIdRequest.md +++ b/docs/models/operations/GetTokenByPinIdRequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | -| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | -| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | -| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | -| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | -| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) | gcgzw5rz2xovp84b4vha3a40 | +| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | +| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | +| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | +| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataRequest.md b/docs/models/operations/PostUsersSignInDataRequest.md index 996ffde3..26110d80 100644 --- a/docs/models/operations/PostUsersSignInDataRequest.md +++ b/docs/models/operations/PostUsersSignInDataRequest.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | -| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | -| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | -| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | -| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | -| `requestBody` | [Optional](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) | gcgzw5rz2xovp84b4vha3a40 | +| `clientName` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | +| `deviceName` | *Optional* | :heavy_minus_sign: | N/A | Linux | +| `clientVersion` | *Optional* | :heavy_minus_sign: | N/A | 4.133.0 | +| `clientPlatform` | *Optional* | :heavy_minus_sign: | N/A | Chrome | +| `requestBody` | [Optional](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | \ No newline at end of file diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 0bab2e26..10a0e59c 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -61,12 +61,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/GetServerActivitiesBadRequest | 400 | application/json | | models/errors/GetServerActivitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## cancelServerActivities @@ -117,8 +116,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | models/errors/CancelServerActivitiesBadRequest | 400 | application/json | | models/errors/CancelServerActivitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index 4f2d28f1..1f29fb98 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -67,12 +67,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | models/errors/GetTransientTokenBadRequest | 400 | application/json | | models/errors/GetTransientTokenUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getSourceConnectionInformation @@ -125,12 +124,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | | models/errors/GetSourceConnectionInformationBadRequest | 400 | application/json | | models/errors/GetSourceConnectionInformationUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getTokenDetails @@ -182,12 +180,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/GetTokenDetailsBadRequest | 400 | application/json | | models/errors/GetTokenDetailsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## postUsersSignInData @@ -250,8 +247,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/PostUsersSignInDataBadRequest | 400 | application/json | | models/errors/PostUsersSignInDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 045a9b64..01686c6c 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -58,12 +58,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/GetButlerTasksBadRequest | 400 | application/json | | models/errors/GetButlerTasksUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## startAllTasks @@ -112,12 +111,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/StartAllTasksBadRequest | 400 | application/json | | models/errors/StartAllTasksUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## stopAllTasks @@ -162,12 +160,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | | models/errors/StopAllTasksBadRequest | 400 | application/json | | models/errors/StopAllTasksUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## startTask @@ -224,12 +221,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------- | ----------------------------------- | ----------------------------------- | | models/errors/StartTaskBadRequest | 400 | application/json | | models/errors/StartTaskUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## stopTask @@ -282,8 +278,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------- | ---------------------------------- | ---------------------------------- | | models/errors/StopTaskBadRequest | 400 | application/json | | models/errors/StopTaskUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 9e7f4306..3c7d3fe0 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -66,12 +66,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/GetGlobalHubsBadRequest | 400 | application/json | | models/errors/GetGlobalHubsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getRecentlyAdded @@ -135,10 +134,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLibraryHubs @@ -197,8 +195,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/GetLibraryHubsBadRequest | 400 | application/json | | models/errors/GetLibraryHubsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 1d84200c..9937e52b 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -72,12 +72,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | models/errors/GetFileHashBadRequest | 400 | application/json | | models/errors/GetFileHashUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getRecentlyAddedLibrary @@ -157,12 +156,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | models/errors/GetRecentlyAddedLibraryBadRequest | 400 | application/json | | models/errors/GetRecentlyAddedLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getAllLibraries @@ -214,12 +212,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/GetAllLibrariesBadRequest | 400 | application/json | | models/errors/GetAllLibrariesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLibraryDetails @@ -314,12 +311,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | models/errors/GetLibraryDetailsBadRequest | 400 | application/json | | models/errors/GetLibraryDetailsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## deleteLibrary @@ -370,12 +366,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/DeleteLibraryBadRequest | 400 | application/json | | models/errors/DeleteLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLibraryItems @@ -463,12 +458,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/GetLibraryItemsBadRequest | 400 | application/json | | models/errors/GetLibraryItemsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getRefreshLibraryMetadata @@ -523,12 +517,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | models/errors/GetRefreshLibraryMetadataBadRequest | 400 | application/json | | models/errors/GetRefreshLibraryMetadataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getSearchLibrary @@ -602,12 +595,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | | models/errors/GetSearchLibraryBadRequest | 400 | application/json | | models/errors/GetSearchLibraryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getMetaDataByRatingKey @@ -661,12 +653,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | models/errors/GetMetaDataByRatingKeyBadRequest | 400 | application/json | | models/errors/GetMetaDataByRatingKeyUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getMetadataChildren @@ -722,12 +713,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/GetMetadataChildrenBadRequest | 400 | application/json | | models/errors/GetMetadataChildrenUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getTopWatchedContent @@ -784,12 +774,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | models/errors/GetTopWatchedContentBadRequest | 400 | application/json | | models/errors/GetTopWatchedContentUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getOnDeck @@ -836,8 +825,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------- | ----------------------------------- | ----------------------------------- | | models/errors/GetOnDeckBadRequest | 400 | application/json | | models/errors/GetOnDeckUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 9ae96717..6c86873a 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -67,12 +67,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | | models/errors/LogLineBadRequest | 400 | application/json | | models/errors/LogLineUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## logMultiLine @@ -148,12 +147,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | | models/errors/LogMultiLineBadRequest | 400 | application/json | | models/errors/LogMultiLineUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## enablePaperTrail @@ -198,8 +196,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | | models/errors/EnablePaperTrailBadRequest | 400 | application/json | | models/errors/EnablePaperTrailUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 1b103868..54d0641b 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -63,12 +63,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | | models/errors/MarkPlayedBadRequest | 400 | application/json | | models/errors/MarkPlayedUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## markUnplayed @@ -119,12 +118,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | | models/errors/MarkUnplayedBadRequest | 400 | application/json | | models/errors/MarkUnplayedUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## updatePlayProgress @@ -180,12 +178,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | | models/errors/UpdatePlayProgressBadRequest | 400 | application/json | | models/errors/UpdatePlayProgressUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getBannerImage @@ -248,12 +245,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/GetBannerImageBadRequest | 400 | application/json | | models/errors/GetBannerImageUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getThumbImage @@ -316,8 +312,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/GetThumbImageBadRequest | 400 | application/json | | models/errors/GetThumbImageUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index b3d26605..52ca104d 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -85,12 +85,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/CreatePlaylistBadRequest | 400 | application/json | | models/errors/CreatePlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getPlaylists @@ -147,12 +146,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | | models/errors/GetPlaylistsBadRequest | 400 | application/json | | models/errors/GetPlaylistsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getPlaylist @@ -207,12 +205,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | models/errors/GetPlaylistBadRequest | 400 | application/json | | models/errors/GetPlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## deletePlaylist @@ -264,12 +261,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/DeletePlaylistBadRequest | 400 | application/json | | models/errors/DeletePlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## updatePlaylist @@ -325,12 +321,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/UpdatePlaylistBadRequest | 400 | application/json | | models/errors/UpdatePlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getPlaylistContents @@ -390,12 +385,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/GetPlaylistContentsBadRequest | 400 | application/json | | models/errors/GetPlaylistContentsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## clearPlaylistContents @@ -447,12 +441,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | models/errors/ClearPlaylistContentsBadRequest | 400 | application/json | | models/errors/ClearPlaylistContentsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## addPlaylistContents @@ -511,12 +504,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/AddPlaylistContentsBadRequest | 400 | application/json | | models/errors/AddPlaylistContentsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## uploadPlaylist @@ -573,8 +565,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/UploadPlaylistBadRequest | 400 | application/json | | models/errors/UploadPlaylistUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 4fc6cff8..7c8b606b 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -66,12 +66,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | models/errors/GetCompanionsDataBadRequest | 400 | application/json | | models/errors/GetCompanionsDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getUserFriends @@ -123,12 +122,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | | models/errors/GetUserFriendsBadRequest | 400 | application/json | | models/errors/GetUserFriendsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getGeoData @@ -179,12 +177,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | | models/errors/GetGeoDataBadRequest | 400 | application/json | | models/errors/GetGeoDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getHomeData @@ -230,12 +227,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | models/errors/GetHomeDataBadRequest | 400 | application/json | | models/errors/GetHomeDataUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getServerResources @@ -284,13 +280,13 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `includeHttps` | [Optional](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `includeRelay` | [Optional](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `includeIPv6` | [Optional](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `includeHttps` | [Optional](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `includeRelay` | [Optional](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `includeIPv6` | [Optional](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `clientID` | *Optional* | :heavy_minus_sign: | The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) | gcgzw5rz2xovp84b4vha3a40 | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response @@ -298,12 +294,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | | models/errors/GetServerResourcesBadRequest | 400 | application/json | | models/errors/GetServerResourcesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getPin @@ -359,11 +354,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------ | ------------------------------ | ------------------------------ | | models/errors/GetPinBadRequest | 400 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getTokenByPinId @@ -421,8 +415,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/GetTokenByPinIdBadRequest | 400 | application/json | | models/errors/GetTokenByPinIdResponseBody | 404 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 03ea0b23..c5cf3b03 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -77,12 +77,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/PerformSearchBadRequest | 400 | application/json | | models/errors/PerformSearchUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## performVoiceSearch @@ -141,12 +140,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | | models/errors/PerformVoiceSearchBadRequest | 400 | application/json | | models/errors/PerformVoiceSearchUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getSearchResults @@ -199,8 +197,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | | models/errors/GetSearchResultsBadRequest | 400 | application/json | | models/errors/GetSearchResultsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 6cfe1bbe..012a5847 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -62,12 +62,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | models/errors/GetServerCapabilitiesBadRequest | 400 | application/json | | models/errors/GetServerCapabilitiesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getServerPreferences @@ -113,12 +112,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | models/errors/GetServerPreferencesBadRequest | 400 | application/json | | models/errors/GetServerPreferencesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getAvailableClients @@ -164,12 +162,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/GetAvailableClientsBadRequest | 400 | application/json | | models/errors/GetAvailableClientsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getDevices @@ -215,12 +212,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------ | ------------------------------------ | ------------------------------------ | | models/errors/GetDevicesBadRequest | 400 | application/json | | models/errors/GetDevicesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getServerIdentity @@ -264,11 +260,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | models/errors/GetServerIdentityRequestTimeout | 408 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getMyPlexAccount @@ -314,12 +309,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | | models/errors/GetMyPlexAccountBadRequest | 400 | application/json | | models/errors/GetMyPlexAccountUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getResizedPhoto @@ -384,12 +378,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/GetResizedPhotoBadRequest | 400 | application/json | | models/errors/GetResizedPhotoUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getMediaProviders @@ -442,12 +435,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | models/errors/GetMediaProvidersBadRequest | 400 | application/json | | models/errors/GetMediaProvidersUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getServerList @@ -493,8 +485,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/GetServerListBadRequest | 400 | application/json | | models/errors/GetServerListUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 96aaf5d0..2fb06c9c 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -57,12 +57,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | models/errors/GetSessionsBadRequest | 400 | application/json | | models/errors/GetSessionsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getSessionHistory @@ -123,12 +122,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | models/errors/GetSessionHistoryBadRequest | 400 | application/json | | models/errors/GetSessionHistoryUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getTranscodeSessions @@ -174,12 +172,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | models/errors/GetTranscodeSessionsBadRequest | 400 | application/json | | models/errors/GetTranscodeSessionsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## stopTranscodeSession @@ -230,8 +227,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | | models/errors/StopTranscodeSessionBadRequest | 400 | application/json | | models/errors/StopTranscodeSessionUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index bfdd27e2..5806d1ca 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -63,12 +63,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------- | --------------------------------------- | --------------------------------------- | | models/errors/GetStatisticsBadRequest | 400 | application/json | | models/errors/GetStatisticsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getResourcesStatistics @@ -121,12 +120,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | models/errors/GetResourcesStatisticsBadRequest | 400 | application/json | | models/errors/GetResourcesStatisticsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getBandwidthStatistics @@ -179,8 +177,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | models/errors/GetBandwidthStatisticsBadRequest | 400 | application/json | | models/errors/GetBandwidthStatisticsUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index 46c467a1..bf5bc237 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -57,12 +57,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/GetUpdateStatusBadRequest | 400 | application/json | | models/errors/GetUpdateStatusUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## checkForUpdates @@ -114,12 +113,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | models/errors/CheckForUpdatesBadRequest | 400 | application/json | | models/errors/CheckForUpdatesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## applyUpdates @@ -175,8 +173,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | | models/errors/ApplyUpdatesBadRequest | 400 | application/json | | models/errors/ApplyUpdatesUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index d9b56e16..6ebec5bf 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -75,12 +75,11 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------- | ------------------------------------- | ------------------------------------- | | models/errors/GetTimelineBadRequest | 400 | application/json | | models/errors/GetTimelineUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## startUniversalTranscode @@ -151,8 +150,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | models/errors/StartUniversalTranscodeBadRequest | 400 | application/json | | models/errors/StartUniversalTranscodeUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index ccc54eed..b52436d1 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -71,8 +71,8 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | -------------------------------------- | -------------------------------------- | -------------------------------------- | | models/errors/GetWatchListBadRequest | 400 | application/json | | models/errors/GetWatchListUnauthorized | 401 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/src/main/java/dev/plexapi/sdk/Plex.java b/src/main/java/dev/plexapi/sdk/Plex.java index a89f6b30..97bec702 100644 --- a/src/main/java/dev/plexapi/sdk/Plex.java +++ b/src/main/java/dev/plexapi/sdk/Plex.java @@ -778,10 +778,7 @@ public class Plex implements E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 * @param includeIPv6 Include IPv6 entries in the results - * @param clientID The unique identifier for the client application - This is used to track the client application and its usage - (UUID, serial number, or other number unique per device) - + * @param clientID The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) * @param serverURL Overrides the server URL. * @return The response from the API call * @throws Exception if the API call fails diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index 17ea857b..b0f1dd22 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -36,8 +36,8 @@ class SDKConfiguration { } }; private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.0.3"; - public static final String SDK_VERSION = "0.6.2"; - public static final String GEN_VERSION = "2.426.2"; + public static final String SDK_VERSION = "0.7.0"; + public static final String GEN_VERSION = "2.428.1"; private static final String BASE_PACKAGE = "dev.plexapi.sdk"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java index 62d2f9cd..1ac6cad2 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java @@ -30,10 +30,7 @@ public class GetPinRequest { private Optional strong; /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") private Optional clientID; @@ -88,10 +85,7 @@ public class GetPinRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @JsonIgnore public Optional clientID() { @@ -147,10 +141,7 @@ public class GetPinRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public GetPinRequest withClientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -159,10 +150,7 @@ public class GetPinRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public GetPinRequest withClientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -301,10 +289,7 @@ public class GetPinRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -313,10 +298,7 @@ public class GetPinRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java index c3b44a09..a5404469 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java @@ -41,10 +41,7 @@ public class GetServerResourcesRequest { private Optional includeIPv6; /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") private Optional clientID; @@ -99,10 +96,7 @@ public class GetServerResourcesRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @JsonIgnore public Optional clientID() { @@ -172,10 +166,7 @@ public class GetServerResourcesRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public GetServerResourcesRequest withClientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -184,10 +175,7 @@ public class GetServerResourcesRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public GetServerResourcesRequest withClientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -302,10 +290,7 @@ public class GetServerResourcesRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -314,10 +299,7 @@ public class GetServerResourcesRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java index a1fb9983..b471a5cd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java @@ -25,10 +25,7 @@ public class GetTokenByPinIdRequest { private long pinID; /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") private Optional clientID; @@ -81,10 +78,7 @@ public class GetTokenByPinIdRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @JsonIgnore public Optional clientID() { @@ -125,10 +119,7 @@ public class GetTokenByPinIdRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public GetTokenByPinIdRequest withClientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -137,10 +128,7 @@ public class GetTokenByPinIdRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public GetTokenByPinIdRequest withClientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -264,10 +252,7 @@ public class GetTokenByPinIdRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -276,10 +261,7 @@ public class GetTokenByPinIdRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java index 66edb8d5..a76b059e 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java @@ -19,10 +19,7 @@ import java.util.Optional; public class PostUsersSignInDataRequest { /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") private Optional clientID; @@ -72,10 +69,7 @@ public class PostUsersSignInDataRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ @JsonIgnore public Optional clientID() { @@ -116,10 +110,7 @@ public class PostUsersSignInDataRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public PostUsersSignInDataRequest withClientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -128,10 +119,7 @@ public class PostUsersSignInDataRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public PostUsersSignInDataRequest withClientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -264,10 +252,7 @@ public class PostUsersSignInDataRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(String clientID) { Utils.checkNotNull(clientID, "clientID"); @@ -276,10 +261,7 @@ public class PostUsersSignInDataRequest { } /** - * The unique identifier for the client application - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * + * The unique identifier for the client application. This is used to track the client application and its usage. (UUID, serial number, or other number unique per device) */ public Builder clientID(Optional clientID) { Utils.checkNotNull(clientID, "clientID"); diff --git a/src/test/java/dev/plexapi/sdk/ActivitiesTests.java b/src/test/java/dev/plexapi/sdk/ActivitiesTests.java deleted file mode 100644 index c6f8cba3..00000000 --- a/src/test/java/dev/plexapi/sdk/ActivitiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import dev.plexapi.sdk.models.operations.CancelServerActivitiesResponse; -import dev.plexapi.sdk.models.operations.GetServerActivitiesResponse; -import java.lang.Exception; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class ActivitiesTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testActivities_GetServerActivities() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetServerActivitiesResponse res = sdk.activities().getServerActivities() - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testActivities_CancelServerActivities_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() - .activityUUID("25b71ed5-0f9d-461c-baa7-d404e9e10d3e") - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/AuthenticationTests.java b/src/test/java/dev/plexapi/sdk/AuthenticationTests.java deleted file mode 100644 index 997a9b92..00000000 --- a/src/test/java/dev/plexapi/sdk/AuthenticationTests.java +++ /dev/null @@ -1,441 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.AutoSelectSubtitle; -import dev.plexapi.sdk.models.operations.Billing; -import dev.plexapi.sdk.models.operations.DefaultSubtitleAccessibility; -import dev.plexapi.sdk.models.operations.DefaultSubtitleForced; -import dev.plexapi.sdk.models.operations.GetSourceConnectionInformationResponse; -import dev.plexapi.sdk.models.operations.GetTokenDetailsAuthenticationResponseStatus; -import dev.plexapi.sdk.models.operations.GetTokenDetailsAuthenticationStatus; -import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse; -import dev.plexapi.sdk.models.operations.GetTokenDetailsStatus; -import dev.plexapi.sdk.models.operations.GetTokenDetailsSubscription; -import dev.plexapi.sdk.models.operations.GetTokenDetailsUserPlexAccount; -import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType; -import dev.plexapi.sdk.models.operations.GetTransientTokenResponse; -import dev.plexapi.sdk.models.operations.InternalPaymentMethod; -import dev.plexapi.sdk.models.operations.MailingListStatus; -import dev.plexapi.sdk.models.operations.MediaReviewsVisibility; -import dev.plexapi.sdk.models.operations.PastSubscription; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataAuthenticationResponseStatus; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataAuthenticationStatus; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataAuthenticationSubscription; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataAutoSelectSubtitle; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataDefaultSubtitleAccessibility; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataDefaultSubtitleForced; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataMailingListStatus; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataMediaReviewsVisibility; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataServices; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataState; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataStatus; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataSubscription; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataUserPlexAccount; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataUserProfile; -import dev.plexapi.sdk.models.operations.PostUsersSignInDataWatchedIndicator; -import dev.plexapi.sdk.models.operations.Scope; -import dev.plexapi.sdk.models.operations.Services; -import dev.plexapi.sdk.models.operations.Subscription; -import dev.plexapi.sdk.models.operations.Trials; -import dev.plexapi.sdk.models.operations.UserProfile; -import dev.plexapi.sdk.models.operations.WatchedIndicator; -import java.lang.Exception; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class AuthenticationTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testAuthentication_GetTransientToken() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetTransientTokenResponse res = sdk.authentication().getTransientToken() - .type(GetTransientTokenQueryParamType.DELEGATION) - .scope(Scope.ALL) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testAuthentication_GetSourceConnectionInformation() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() - .source("server://client-identifier") - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testAuthentication_GetTokenDetails() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() - .call(); - - assertEquals( - GetTokenDetailsUserPlexAccount.builder() - .adsConsent(false) - .adsConsentReminderAt(OffsetDateTime.parse("2022-06-24T05:32:09.341Z")) - .adsConsentSetAt(OffsetDateTime.parse("2022-05-01T23:18:27.767Z")) - .authToken("CxoUzBTSV5hsxjTpFKaf") - .country("US") - .email("username@email.com") - .friendlyName("friendlyUsername") - .entitlements(List.of( - "[]")) - .homeSize(1) - .id(13692262) - .joinedAt(1556281940L) - .locale("sv") - .mailingListStatus(MailingListStatus.ACTIVE) - .maxHomeSize(15) - .profile(UserProfile.builder() - .defaultAudioLanguage("ja") - .defaultSubtitleLanguage("en") - .autoSelectAudio(true) - .autoSelectSubtitle(AutoSelectSubtitle.Enable) - .defaultSubtitleAccessibility(DefaultSubtitleAccessibility.Enable) - .defaultSubtitleForced(DefaultSubtitleForced.Enable) - .watchedIndicator(WatchedIndicator.Enable) - .mediaReviewsVisibility(MediaReviewsVisibility.Enable) - .build()) - .rememberExpiresAt(1556281940L) - .scrobbleTypes("") - .services(List.of( - Services.builder() - .identifier("metadata-dev") - .endpoint("https://epg.provider.plex.tv") - .token("DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv") - .secret("") - .status(GetTokenDetailsStatus.ONLINE) - .build())) - .subscription(Subscription.builder() - .active(true) - .subscribedAt("2021-04-12T18:21:12Z") - .status(GetTokenDetailsAuthenticationStatus.INACTIVE) - .build()) - .subscriptionDescription("") - .subscriptions(List.of( - GetTokenDetailsSubscription.builder() - .active(true) - .subscribedAt("2021-04-12T18:21:12Z") - .status(GetTokenDetailsAuthenticationResponseStatus.INACTIVE) - .build())) - .thumb("https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101") - .title("UsernameTitle") - .username("Username") - .uuid("dae343c1f45beb4f") - .attributionPartner(Optional.empty()) - .anonymous(false) - .backupCodesCreated(false) - .confirmed(false) - .emailOnlyAuth(false) - .experimentalFeatures(false) - .guest(false) - .hasPassword(true) - .home(false) - .homeAdmin(false) - .mailingListActive(false) - .pin("string") - .protected_(false) - .restricted(false) - .roles(List.of( - "string")) - .twoFactorEnabled(false) - .build(), - res.userPlexAccount().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testAuthentication_PostUsersSignInData() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() - .requestBody(PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") - .build()) - .build(); - - PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() - .request(req) - .call(); - - assertEquals( - PostUsersSignInDataUserPlexAccount.builder() - .adsConsent(false) - .adsConsentReminderAt(OffsetDateTime.parse("2022-06-01T10:45:51.668Z")) - .adsConsentSetAt(OffsetDateTime.parse("2022-08-04T10:54:08.790Z")) - .authToken("CxoUzBTSV5hsxjTpFKaf") - .country("US") - .email("username@email.com") - .friendlyName("friendlyUsername") - .entitlements(List.of( - "[]")) - .homeSize(1) - .id(13692262) - .joinedAt(1556281940L) - .locale("ja") - .mailingListStatus(PostUsersSignInDataMailingListStatus.ACTIVE) - .maxHomeSize(15) - .profile(PostUsersSignInDataUserProfile.builder() - .defaultAudioLanguage("ja") - .defaultSubtitleLanguage("en") - .autoSelectAudio(true) - .autoSelectSubtitle(PostUsersSignInDataAutoSelectSubtitle.Enable) - .defaultSubtitleAccessibility(PostUsersSignInDataDefaultSubtitleAccessibility.Enable) - .defaultSubtitleForced(PostUsersSignInDataDefaultSubtitleForced.Enable) - .watchedIndicator(PostUsersSignInDataWatchedIndicator.Enable) - .mediaReviewsVisibility(PostUsersSignInDataMediaReviewsVisibility.Enable) - .build()) - .rememberExpiresAt(1556281940L) - .scrobbleTypes("") - .services(List.of( - PostUsersSignInDataServices.builder() - .identifier("metadata-dev") - .endpoint("https://epg.provider.plex.tv") - .token("DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv") - .secret("") - .status(PostUsersSignInDataStatus.ONLINE) - .build())) - .subscription(PostUsersSignInDataSubscription.builder() - .active(true) - .subscribedAt("2021-04-12T18:21:12Z") - .status(PostUsersSignInDataAuthenticationStatus.INACTIVE) - .build()) - .subscriptionDescription("") - .subscriptions(List.of( - PostUsersSignInDataAuthenticationSubscription.builder() - .active(true) - .subscribedAt("2021-04-12T18:21:12Z") - .status(PostUsersSignInDataAuthenticationResponseStatus.INACTIVE) - .build())) - .thumb("https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101") - .title("UsernameTitle") - .username("Username") - .uuid("dae343c1f45beb4f") - .attributionPartner(Optional.empty()) - .pastSubscriptions(List.of( - PastSubscription.builder() - .id("") - .mode("") - .renewsAt(1556281940L) - .endsAt(1556281940L) - .type("plexpass") - .transfer("") - .state(PostUsersSignInDataState.ENDED) - .billing(Billing.builder() - .internalPaymentMethod(InternalPaymentMethod.builder() - .build()) - .paymentMethodId(820994L) - .build()) - .canceled(false) - .gracePeriod(false) - .onHold(false) - .canReactivate(false) - .canUpgrade(false) - .canDowngrade(false) - .canConvert(false) - .build())) - .trials(List.of( - Trials.builder() - .build())) - .anonymous(false) - .backupCodesCreated(false) - .confirmed(false) - .emailOnlyAuth(false) - .experimentalFeatures(false) - .guest(false) - .hasPassword(true) - .home(false) - .homeAdmin(false) - .mailingListActive(false) - .pin("string") - .protected_(false) - .restricted(false) - .roles(List.of( - "string")) - .twoFactorEnabled(false) - .build(), - res.userPlexAccount().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testAuthentication_PostUsersSignInData_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder() - .requestBody(PostUsersSignInDataRequestBody.builder() - .login("username@email.com") - .password("password123") - .verificationCode("123456") - .build()) - .build(); - - PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() - .request(req) - .call(); - - assertEquals( - PostUsersSignInDataUserPlexAccount.builder() - .adsConsent(false) - .adsConsentReminderAt(OffsetDateTime.parse("2022-04-17T10:09:07.050Z")) - .adsConsentSetAt(OffsetDateTime.parse("2024-07-07T09:18:10.249Z")) - .authToken("CxoUzBTSV5hsxjTpFKaf") - .country("US") - .email("username@email.com") - .friendlyName("friendlyUsername") - .entitlements(List.of( - "[]")) - .homeSize(1) - .id(13692262) - .joinedAt(1556281940L) - .locale("es") - .mailingListStatus(PostUsersSignInDataMailingListStatus.ACTIVE) - .maxHomeSize(15) - .profile(PostUsersSignInDataUserProfile.builder() - .defaultAudioLanguage("ja") - .defaultSubtitleLanguage("en") - .autoSelectAudio(true) - .autoSelectSubtitle(PostUsersSignInDataAutoSelectSubtitle.Enable) - .defaultSubtitleAccessibility(PostUsersSignInDataDefaultSubtitleAccessibility.Enable) - .defaultSubtitleForced(PostUsersSignInDataDefaultSubtitleForced.Enable) - .watchedIndicator(PostUsersSignInDataWatchedIndicator.Enable) - .mediaReviewsVisibility(PostUsersSignInDataMediaReviewsVisibility.Enable) - .build()) - .rememberExpiresAt(1556281940L) - .scrobbleTypes("") - .services(List.of( - PostUsersSignInDataServices.builder() - .identifier("metadata-dev") - .endpoint("https://epg.provider.plex.tv") - .token("DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv") - .secret("") - .status(PostUsersSignInDataStatus.ONLINE) - .build())) - .subscription(PostUsersSignInDataSubscription.builder() - .active(true) - .subscribedAt("2021-04-12T18:21:12Z") - .status(PostUsersSignInDataAuthenticationStatus.INACTIVE) - .build()) - .subscriptionDescription("") - .subscriptions(List.of( - PostUsersSignInDataAuthenticationSubscription.builder() - .active(true) - .subscribedAt("2021-04-12T18:21:12Z") - .status(PostUsersSignInDataAuthenticationResponseStatus.INACTIVE) - .build())) - .thumb("https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101") - .title("UsernameTitle") - .username("Username") - .uuid("dae343c1f45beb4f") - .attributionPartner(Optional.empty()) - .pastSubscriptions(List.of( - PastSubscription.builder() - .id("") - .mode("") - .renewsAt(1556281940L) - .endsAt(1556281940L) - .type("plexpass") - .transfer("") - .state(PostUsersSignInDataState.ENDED) - .billing(Billing.builder() - .internalPaymentMethod(InternalPaymentMethod.builder() - .build()) - .paymentMethodId(976460L) - .build()) - .canceled(false) - .gracePeriod(false) - .onHold(false) - .canReactivate(false) - .canUpgrade(false) - .canDowngrade(false) - .canConvert(false) - .build())) - .trials(List.of( - Trials.builder() - .build())) - .anonymous(false) - .backupCodesCreated(false) - .confirmed(false) - .emailOnlyAuth(false) - .experimentalFeatures(false) - .guest(false) - .hasPassword(true) - .home(false) - .homeAdmin(false) - .mailingListActive(false) - .pin("string") - .protected_(false) - .restricted(false) - .roles(List.of( - "string")) - .twoFactorEnabled(false) - .build(), - res.userPlexAccount().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/ButlerTests.java b/src/test/java/dev/plexapi/sdk/ButlerTests.java deleted file mode 100644 index 87394e05..00000000 --- a/src/test/java/dev/plexapi/sdk/ButlerTests.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.ButlerTask; -import dev.plexapi.sdk.models.operations.ButlerTasks; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponse; -import dev.plexapi.sdk.models.operations.GetButlerTasksResponseBody; -import dev.plexapi.sdk.models.operations.PathParamTaskName; -import dev.plexapi.sdk.models.operations.StartAllTasksResponse; -import dev.plexapi.sdk.models.operations.StartTaskResponse; -import dev.plexapi.sdk.models.operations.StopAllTasksResponse; -import dev.plexapi.sdk.models.operations.StopTaskResponse; -import dev.plexapi.sdk.models.operations.TaskName; -import java.lang.Exception; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class ButlerTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testButler_GetButlerTasks() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetButlerTasksResponse res = sdk.butler().getButlerTasks() - .call(); - - assertEquals( - GetButlerTasksResponseBody.builder() - .butlerTasks(ButlerTasks.builder() - .butlerTask(List.of( - ButlerTask.builder() - .name("BackupDatabase") - .interval(3d) - .title("Backup Database") - .description("Create a backup copy of the server's database in the configured backup directory") - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testButler_StartAllTasks() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - StartAllTasksResponse res = sdk.butler().startAllTasks() - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testButler_StopAllTasks() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - StopAllTasksResponse res = sdk.butler().stopAllTasks() - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testButler_StartTask() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - StartTaskResponse res = sdk.butler().startTask() - .taskName(TaskName.GENERATE_CHAPTER_THUMBS) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testButler_StopTask() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - StopTaskResponse res = sdk.butler().stopTask() - .taskName(PathParamTaskName.DEEP_MEDIA_ANALYSIS) - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/HubsTests.java b/src/test/java/dev/plexapi/sdk/HubsTests.java deleted file mode 100644 index bdd0c504..00000000 --- a/src/test/java/dev/plexapi/sdk/HubsTests.java +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.Collection; -import dev.plexapi.sdk.models.operations.Country; -import dev.plexapi.sdk.models.operations.Director; -import dev.plexapi.sdk.models.operations.FlattenSeasons; -import dev.plexapi.sdk.models.operations.Genre; -import dev.plexapi.sdk.models.operations.GetGlobalHubsMediaContainer; -import dev.plexapi.sdk.models.operations.GetGlobalHubsMetadata; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse; -import dev.plexapi.sdk.models.operations.GetGlobalHubsResponseBody; -import dev.plexapi.sdk.models.operations.GetLibraryHubsCountry; -import dev.plexapi.sdk.models.operations.GetLibraryHubsDirector; -import dev.plexapi.sdk.models.operations.GetLibraryHubsGenre; -import dev.plexapi.sdk.models.operations.GetLibraryHubsHub; -import dev.plexapi.sdk.models.operations.GetLibraryHubsMedia; -import dev.plexapi.sdk.models.operations.GetLibraryHubsMediaContainer; -import dev.plexapi.sdk.models.operations.GetLibraryHubsMetadata; -import dev.plexapi.sdk.models.operations.GetLibraryHubsPart; -import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse; -import dev.plexapi.sdk.models.operations.GetLibraryHubsResponseBody; -import dev.plexapi.sdk.models.operations.GetLibraryHubsRole; -import dev.plexapi.sdk.models.operations.GetLibraryHubsWriter; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedActiveDirection; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedDefaultDirection; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedField; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedFieldType; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedFilter; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedHubsResponseType; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedHubsType; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedImage; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedMediaContainer; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedMetadata; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedOperator; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponseBody; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedSort; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedType; -import dev.plexapi.sdk.models.operations.HasThumbnail; -import dev.plexapi.sdk.models.operations.Hub; -import dev.plexapi.sdk.models.operations.IncludeMeta; -import dev.plexapi.sdk.models.operations.Media; -import dev.plexapi.sdk.models.operations.MediaGuid; -import dev.plexapi.sdk.models.operations.Meta; -import dev.plexapi.sdk.models.operations.MetaDataRating; -import dev.plexapi.sdk.models.operations.OnlyTransient; -import dev.plexapi.sdk.models.operations.OptimizedForStreaming; -import dev.plexapi.sdk.models.operations.Part; -import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient; -import dev.plexapi.sdk.models.operations.Role; -import dev.plexapi.sdk.models.operations.ShowOrdering; -import dev.plexapi.sdk.models.operations.Stream; -import dev.plexapi.sdk.models.operations.Type; -import dev.plexapi.sdk.models.operations.UltraBlurColors; -import dev.plexapi.sdk.models.operations.Writer; -import java.lang.Exception; -import java.time.LocalDate; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class HubsTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testHubs_GetGlobalHubs() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() - .count(6399.21d) - .onlyTransient(OnlyTransient.ZERO) - .call(); - - assertEquals( - GetGlobalHubsResponseBody.builder() - .mediaContainer(GetGlobalHubsMediaContainer.builder() - .size(8) - .allowSync(true) - .identifier("com.plexapp.plugins.library") - .hub(List.of( - Hub.builder() - .hubKey("/library/metadata/50768,65523,58188,57341,57302,57070") - .key("/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio") - .title("Recent Playlists") - .type("playlist") - .hubIdentifier("home.playlists") - .context("hub.home.playlists") - .size(6) - .more(true) - .style("shelf") - .promoted(true) - .metadata(List.of( - GetGlobalHubsMetadata.builder() - .ratingKey("57070") - .key("/playlists/57070/items") - .guid("com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c") - .type("playlist") - .title("November Movie Day") - .titleSort("Tracks") - .summary("") - .smart(false) - .playlistType("video") - .composite("/playlists/57070/composite/1668787730") - .icon("playlist://image.smart") - .viewCount(2) - .lastViewedAt(1668787732) - .duration(16873000) - .leafCount(3) - .addedAt(1668779618) - .updatedAt(1668787730) - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testHubs_GetRecentlyAdded() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder() - .contentDirectoryID(944669L) - .type(Type.TvShow) - .sectionID(2L) - .includeMeta(IncludeMeta.Enable) - .xPlexContainerStart(0) - .xPlexContainerSize(50) - .build(); - - GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded() - .request(req) - .call(); - - assertEquals( - GetRecentlyAddedResponseBody.builder() - .mediaContainer(GetRecentlyAddedMediaContainer.builder() - .size(50d) - .identifier("com.plexapp.plugins.library") - .meta(Meta.builder() - .type(List.of( - GetRecentlyAddedType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetRecentlyAddedSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetRecentlyAddedActiveDirection.Ascending) - .defaultDirection(GetRecentlyAddedDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build(), - GetRecentlyAddedType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetRecentlyAddedSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetRecentlyAddedActiveDirection.Ascending) - .defaultDirection(GetRecentlyAddedDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - GetRecentlyAddedSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetRecentlyAddedActiveDirection.Ascending) - .defaultDirection(GetRecentlyAddedDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - GetRecentlyAddedSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetRecentlyAddedActiveDirection.Ascending) - .defaultDirection(GetRecentlyAddedDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build(), - GetRecentlyAddedType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetRecentlyAddedFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetRecentlyAddedSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetRecentlyAddedActiveDirection.Ascending) - .defaultDirection(GetRecentlyAddedDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - GetRecentlyAddedSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetRecentlyAddedActiveDirection.Ascending) - .defaultDirection(GetRecentlyAddedDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetRecentlyAddedField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build())) - .fieldType(List.of( - GetRecentlyAddedFieldType.builder() - .type("tag") - .operator(List.of( - GetRecentlyAddedOperator.builder() - .key("=") - .title("is") - .build())) - .build(), - GetRecentlyAddedFieldType.builder() - .type("tag") - .operator(List.of( - GetRecentlyAddedOperator.builder() - .key("=") - .title("is") - .build())) - .build(), - GetRecentlyAddedFieldType.builder() - .type("tag") - .operator(List.of( - GetRecentlyAddedOperator.builder() - .key("=") - .title("is") - .build())) - .build())) - .build()) - .metadata(List.of( - GetRecentlyAddedMetadata.builder() - .ratingKey("58683") - .key("/library/metadata/58683") - .guid("plex://movie/5d7768ba96b655001fdc0408") - .type(GetRecentlyAddedHubsType.Movie) - .title("Avatar: The Way of Water") - .summary("Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.") - .addedAt(1556281940L) - .studio("20th Century Studios") - .skipChildren(false) - .librarySectionID(1L) - .librarySectionTitle("Movies") - .librarySectionKey("/library/sections/1") - .slug("4-for-texas") - .contentRating("PG-13") - .rating(7.6d) - .audienceRating(9.2d) - .year(2022) - .seasonCount(2022) - .tagline("Return to Pandora.") - .flattenSeasons(FlattenSeasons.True) - .showOrdering(ShowOrdering.Dvd) - .thumb("/library/metadata/58683/thumb/1703239236") - .art("/library/metadata/58683/art/1703239236") - .banner("/library/metadata/58683/banner/1703239236") - .duration(11558112) - .originallyAvailableAt(LocalDate.parse("2022-12-14T00:00:00Z")) - .updatedAt(1556281940L) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .chapterSource("media") - .primaryExtraKey("/library/metadata/58684") - .ratingImage("rottentomatoes://image.rating.ripe") - .grandparentRatingKey("66") - .grandparentGuid("plex://show/5d9c081b170e24001f2a7be4") - .grandparentKey("/library/metadata/66") - .grandparentTitle("Caprica") - .grandparentThumb("/library/metadata/66/thumb/1705716261") - .parentSlug("alice-in-borderland-2020") - .grandparentSlug("alice-in-borderland-2020") - .grandparentArt("/library/metadata/66/art/1705716261") - .grandparentTheme("/library/metadata/66/theme/1705716261") - .media(List.of( - Media.builder() - .id(119534) - .duration(11558112) - .bitrate(25025) - .width(3840) - .height(2072) - .aspectRatio(1.85d) - .audioChannels(6) - .audioCodec("eac3") - .videoCodec("hevc") - .videoResolution("4k") - .container("mkv") - .videoFrameRate("24p") - .videoProfile("main 10") - .part(List.of( - Part.builder() - .id(119542) - .key("/library/parts/119542/1680457526/file.mkv") - .duration(11558112) - .file("/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv") - .size(36158371307L) - .container("mkv") - .videoProfile("main 10") - .audioProfile("dts") - .has64bitOffsets(false) - .optimizedForStreaming(false) - .indexes("sd") - .hasThumbnail(HasThumbnail.True) - .stream(List.of( - Stream.builder() - .id(272796L) - .streamType(1L) - .codec("h264") - .index(0L) - .default_(true) - .selected(true) - .bitrate(6273L) - .colorPrimaries("bt709") - .colorRange("tv") - .colorSpace("bt709") - .colorTrc("bt709") - .bitDepth(8L) - .chromaLocation("left") - .streamIdentifier("2") - .chromaSubsampling("4:2:0") - .codedHeight(1088L) - .codedWidth(1920L) - .frameRate(29.97d) - .hasScalingMatrix(false) - .hearingImpaired(false) - .closedCaptions(false) - .embeddedInVideo("1") - .height(1080L) - .level(40L) - .profile("main") - .refFrames(4L) - .scanType("progressive") - .width(1920L) - .displayTitle("1080p (H.264)") - .extendedDisplayTitle("1080p (H.264)") - .channels(2L) - .language("English") - .languageTag("en") - .languageCode("eng") - .audioChannelLayout("stereo") - .samplingRate(48000L) - .title("English") - .canAutoSync(false) - .build())) - .build())) - .audioProfile("dts") - .hasVoiceActivity(false) - .optimizedForStreaming(OptimizedForStreaming.Enable) - .has64bitOffsets(false) - .build())) - .genre(List.of( - Genre.builder() - .tag("Adventure") - .build())) - .country(List.of( - Country.builder() - .tag("United States of America") - .build())) - .director(List.of( - Director.builder() - .tag("James Cameron") - .build(), - Director.builder() - .tag("James Cameron") - .build())) - .writer(List.of( - Writer.builder() - .tag("James Cameron") - .build())) - .collection(List.of( - Collection.builder() - .tag("Working NL Subs") - .build())) - .role(List.of( - Role.builder() - .id(294129L) - .filter("actor=294129") - .thumb("https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg") - .tag("Mike Smith") - .tagKey("668e7e7b22bcad9064350c91") - .role("Self") - .build(), - Role.builder() - .id(294129L) - .filter("actor=294129") - .thumb("https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg") - .tag("Mike Smith") - .tagKey("668e7e7b22bcad9064350c91") - .role("Self") - .build(), - Role.builder() - .id(294129L) - .filter("actor=294129") - .thumb("https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg") - .tag("Mike Smith") - .tagKey("668e7e7b22bcad9064350c91") - .role("Self") - .build())) - .mediaGuid(List.of( - MediaGuid.builder() - .id("imdb://tt13015952") - .build(), - MediaGuid.builder() - .id("imdb://tt13015952") - .build(), - MediaGuid.builder() - .id("imdb://tt13015952") - .build())) - .ultraBlurColors(UltraBlurColors.builder() - .topLeft("11333b") - .topRight("0a232d") - .bottomRight("73958") - .bottomLeft("1f5066") - .build()) - .metaDataRating(List.of( - MetaDataRating.builder() - .image("themoviedb://image.rating") - .value(3f) - .type("audience") - .build())) - .image(List.of( - GetRecentlyAddedImage.builder() - .alt("Episode 1") - .type(GetRecentlyAddedHubsResponseType.BACKGROUND) - .url("/library/metadata/45521/thumb/1644710589") - .build(), - GetRecentlyAddedImage.builder() - .alt("Episode 1") - .type(GetRecentlyAddedHubsResponseType.BACKGROUND) - .url("/library/metadata/45521/thumb/1644710589") - .build(), - GetRecentlyAddedImage.builder() - .alt("Episode 1") - .type(GetRecentlyAddedHubsResponseType.BACKGROUND) - .url("/library/metadata/45521/thumb/1644710589") - .build())) - .titleSort("Whale") - .viewCount(1) - .lastViewedAt(1682752242) - .originalTitle("映画 ブラッククローバー 魔法帝の剣") - .viewOffset(5222500) - .skipCount(1) - .index(1) - .theme("/library/metadata/1/theme/1705636920") - .leafCount(14) - .viewedLeafCount(0) - .childCount(1) - .hasPremiumExtras("1") - .hasPremiumPrimaryExtra("1") - .parentRatingKey("66") - .parentGuid("plex://show/5d9c081b170e24001f2a7be4") - .parentStudio("UCP") - .parentKey("/library/metadata/66") - .parentTitle("Caprica") - .parentIndex(1) - .parentYear(2010) - .parentThumb("/library/metadata/66/thumb/1705716261") - .parentTheme("/library/metadata/66/theme/1705716261") - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testHubs_GetLibraryHubs() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() - .sectionId(5218.48d) - .count(4146.62d) - .onlyTransient(QueryParamOnlyTransient.ZERO) - .call(); - - assertEquals( - GetLibraryHubsResponseBody.builder() - .mediaContainer(GetLibraryHubsMediaContainer.builder() - .size(7) - .allowSync(true) - .identifier("com.plexapp.plugins.library") - .librarySectionID(1) - .librarySectionTitle("Movies") - .librarySectionUUID("322a231a-b7f7-49f5-920f-14c61199cd30") - .hub(List.of( - GetLibraryHubsHub.builder() - .key("/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0") - .title("Recently Played Movies") - .type("movie") - .hubIdentifier("movie.recentlyviewed.1") - .context("hub.movie.recentlyviewed") - .size(6) - .more(true) - .style("shelf") - .hubKey("/library/metadata/66485,66098,57249,11449,5858,14944") - .metadata(List.of( - GetLibraryHubsMetadata.builder() - .ratingKey("14944") - .key("/library/metadata/14944") - .guid("plex://movie/5d77686eeb5d26001f1eb339") - .studio("Walt Disney Animation Studios") - .type("movie") - .title("Tangled") - .librarySectionTitle("Movies") - .librarySectionID(1) - .librarySectionKey("/library/sections/1") - .contentRating("PG") - .summary("The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.") - .rating(8.9d) - .audienceRating(8.7d) - .viewCount(1) - .lastViewedAt(1704936047) - .year(2010) - .tagline("They're taking adventure to new lengths.") - .thumb("/library/metadata/14944/thumb/1705739847") - .art("/library/metadata/14944/art/1705739847") - .duration(6017237) - .originallyAvailableAt(LocalDate.parse("2010-11-24T00:00:00Z")) - .addedAt(1589412494) - .updatedAt(1705739847) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .primaryExtraKey("/library/metadata/14952") - .ratingImage("rottentomatoes://image.rating.ripe") - .media(List.of( - GetLibraryHubsMedia.builder() - .id(38247) - .duration(6017237) - .bitrate(2051) - .width(1920) - .height(1080) - .aspectRatio(1.78d) - .audioChannels(2) - .audioCodec("aac") - .videoCodec("h264") - .videoResolution("1080") - .container("mp4") - .videoFrameRate("24p") - .optimizedForStreaming(1) - .audioProfile("lc") - .has64bitOffsets(false) - .videoProfile("high") - .part(List.of( - GetLibraryHubsPart.builder() - .id(38247) - .key("/library/parts/38247/1589412494/file.mp4") - .duration(6017237) - .file("/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4") - .size(1545647447) - .audioProfile("lc") - .container("mp4") - .has64bitOffsets(false) - .optimizedForStreaming(true) - .videoProfile("high") - .build())) - .build())) - .genre(List.of( - GetLibraryHubsGenre.builder() - .tag("Animation") - .build())) - .country(List.of( - GetLibraryHubsCountry.builder() - .tag("United States of America") - .build())) - .director(List.of( - GetLibraryHubsDirector.builder() - .tag("Nathan Greno") - .build())) - .role(List.of( - GetLibraryHubsRole.builder() - .tag("Donna Murphy") - .build())) - .writer(List.of( - GetLibraryHubsWriter.builder() - .tag("Wilhelm Grimm") - .build())) - .skipCount(1) - .chapterSource("media") - .build())) - .promoted(true) - .random(true) - .build())) - .build()) - .build(), - res.object().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/LibraryTests.java b/src/test/java/dev/plexapi/sdk/LibraryTests.java deleted file mode 100644 index 11948421..00000000 --- a/src/test/java/dev/plexapi/sdk/LibraryTests.java +++ /dev/null @@ -1,2111 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.ActiveDirection; -import dev.plexapi.sdk.models.operations.DefaultDirection; -import dev.plexapi.sdk.models.operations.DeleteLibraryResponse; -import dev.plexapi.sdk.models.operations.Field; -import dev.plexapi.sdk.models.operations.FieldType; -import dev.plexapi.sdk.models.operations.Force; -import dev.plexapi.sdk.models.operations.GetAllLibrariesDirectory; -import dev.plexapi.sdk.models.operations.GetAllLibrariesMediaContainer; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse; -import dev.plexapi.sdk.models.operations.GetAllLibrariesResponseBody; -import dev.plexapi.sdk.models.operations.GetFileHashResponse; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsDirectory; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsField; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsFieldType; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsFilter; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsMediaContainer; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsOperator; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponseBody; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsSort; -import dev.plexapi.sdk.models.operations.GetLibraryDetailsType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsActiveDirection; -import dev.plexapi.sdk.models.operations.GetLibraryItemsCollection; -import dev.plexapi.sdk.models.operations.GetLibraryItemsCountry; -import dev.plexapi.sdk.models.operations.GetLibraryItemsDefaultDirection; -import dev.plexapi.sdk.models.operations.GetLibraryItemsDirector; -import dev.plexapi.sdk.models.operations.GetLibraryItemsField; -import dev.plexapi.sdk.models.operations.GetLibraryItemsFieldType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsFilter; -import dev.plexapi.sdk.models.operations.GetLibraryItemsFlattenSeasons; -import dev.plexapi.sdk.models.operations.GetLibraryItemsGenre; -import dev.plexapi.sdk.models.operations.GetLibraryItemsHasThumbnail; -import dev.plexapi.sdk.models.operations.GetLibraryItemsImage; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryActiveDirection; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryDefaultDirection; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryField; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryFieldType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryFilter; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryOperator; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryResponse200Type; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryResponseType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibrarySort; -import dev.plexapi.sdk.models.operations.GetLibraryItemsLibraryType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsMedia; -import dev.plexapi.sdk.models.operations.GetLibraryItemsMediaContainer; -import dev.plexapi.sdk.models.operations.GetLibraryItemsMediaGuid; -import dev.plexapi.sdk.models.operations.GetLibraryItemsMeta; -import dev.plexapi.sdk.models.operations.GetLibraryItemsMetaDataRating; -import dev.plexapi.sdk.models.operations.GetLibraryItemsMetadata; -import dev.plexapi.sdk.models.operations.GetLibraryItemsOperator; -import dev.plexapi.sdk.models.operations.GetLibraryItemsOptimizedForStreaming; -import dev.plexapi.sdk.models.operations.GetLibraryItemsPart; -import dev.plexapi.sdk.models.operations.GetLibraryItemsQueryParamIncludeMeta; -import dev.plexapi.sdk.models.operations.GetLibraryItemsQueryParamType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest; -import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse; -import dev.plexapi.sdk.models.operations.GetLibraryItemsResponseBody; -import dev.plexapi.sdk.models.operations.GetLibraryItemsRole; -import dev.plexapi.sdk.models.operations.GetLibraryItemsShowOrdering; -import dev.plexapi.sdk.models.operations.GetLibraryItemsSort; -import dev.plexapi.sdk.models.operations.GetLibraryItemsStream; -import dev.plexapi.sdk.models.operations.GetLibraryItemsType; -import dev.plexapi.sdk.models.operations.GetLibraryItemsUltraBlurColors; -import dev.plexapi.sdk.models.operations.GetLibraryItemsWriter; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyCountry; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyDirector; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyGenre; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyMedia; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyMediaContainer; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyMetadata; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyPart; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyResponse; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyResponseBody; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyRole; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyStream; -import dev.plexapi.sdk.models.operations.GetMetaDataByRatingKeyWriter; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenDirectory; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenMediaContainer; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenMetadata; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse; -import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponseBody; -import dev.plexapi.sdk.models.operations.GetOnDeckGuids; -import dev.plexapi.sdk.models.operations.GetOnDeckMedia; -import dev.plexapi.sdk.models.operations.GetOnDeckMediaContainer; -import dev.plexapi.sdk.models.operations.GetOnDeckMetadata; -import dev.plexapi.sdk.models.operations.GetOnDeckPart; -import dev.plexapi.sdk.models.operations.GetOnDeckResponse; -import dev.plexapi.sdk.models.operations.GetOnDeckResponseBody; -import dev.plexapi.sdk.models.operations.GetOnDeckStream; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryCountry; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryDirector; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryFilter; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryGenre; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryMedia; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryMediaContainer; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryMetadata; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryPart; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponse; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponseBody; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRole; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryType; -import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryWriter; -import dev.plexapi.sdk.models.operations.GetRefreshLibraryMetadataResponse; -import dev.plexapi.sdk.models.operations.GetSearchLibraryMediaContainer; -import dev.plexapi.sdk.models.operations.GetSearchLibraryMetadata; -import dev.plexapi.sdk.models.operations.GetSearchLibraryQueryParamType; -import dev.plexapi.sdk.models.operations.GetSearchLibraryResponse; -import dev.plexapi.sdk.models.operations.GetSearchLibraryResponseBody; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentCountry; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentGenre; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentGuids; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentMediaContainer; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentMetadata; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentQueryParamType; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody; -import dev.plexapi.sdk.models.operations.GetTopWatchedContentRole; -import dev.plexapi.sdk.models.operations.Guids; -import dev.plexapi.sdk.models.operations.IncludeDetails; -import dev.plexapi.sdk.models.operations.IncludeGuids; -import dev.plexapi.sdk.models.operations.Location; -import dev.plexapi.sdk.models.operations.Operator; -import dev.plexapi.sdk.models.operations.Producer; -import dev.plexapi.sdk.models.operations.QueryParamIncludeMeta; -import dev.plexapi.sdk.models.operations.QueryParamType; -import dev.plexapi.sdk.models.operations.Ratings; -import dev.plexapi.sdk.models.operations.Sort; -import dev.plexapi.sdk.models.operations.Tag; -import dev.plexapi.sdk.models.operations.User; -import java.lang.Exception; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class LibraryTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetFileHash() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetFileHashResponse res = sdk.library().getFileHash() - .url("file://C:\Image.png&type=13") - .type(187.90d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetRecentlyAddedLibrary() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder() - .type(QueryParamType.TvShow) - .contentDirectoryID(2L) - .pinnedContentDirectoryID(List.of( - 3L, - 5L, - 7L, - 13L, - 12L, - 1L, - 6L, - 14L, - 2L, - 10L, - 16L, - 17L)) - .sectionID(2L) - .includeMeta(QueryParamIncludeMeta.Enable) - .xPlexContainerStart(0) - .xPlexContainerSize(50) - .build(); - - GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary() - .request(req) - .call(); - - assertEquals( - GetRecentlyAddedLibraryResponseBody.builder() - .mediaContainer(GetRecentlyAddedLibraryMediaContainer.builder() - .type(List.of( - GetRecentlyAddedLibraryType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetRecentlyAddedLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - Sort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(ActiveDirection.Ascending) - .defaultDirection(DefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - Sort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(ActiveDirection.Ascending) - .defaultDirection(DefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - Sort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(ActiveDirection.Ascending) - .defaultDirection(DefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - Field.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - Field.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build(), - GetRecentlyAddedLibraryType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetRecentlyAddedLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - Sort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(ActiveDirection.Ascending) - .defaultDirection(DefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - Sort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(ActiveDirection.Ascending) - .defaultDirection(DefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - Sort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(ActiveDirection.Ascending) - .defaultDirection(DefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - Field.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - Field.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build())) - .fieldType(List.of( - FieldType.builder() - .type("tag") - .operator(List.of( - Operator.builder() - .key("=") - .title("is") - .build())) - .build())) - .size(50d) - .identifier("com.plexapp.plugins.library") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1680021154d) - .metadata(List.of( - GetRecentlyAddedLibraryMetadata.builder() - .librarySectionID(1d) - .librarySectionTitle("Movies") - .librarySectionUUID("322a231a-b7f7-49f5-920f-14c61199cd30") - .ratingKey(59398d) - .key("/library/metadata/59398") - .guid("plex://movie/5e161a83bea6ac004126e148") - .studio("Marvel Studios") - .type("movie") - .title("Ant-Man and the Wasp: Quantumania") - .contentRating("PG-13") - .summary("Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.") - .rating(4.7d) - .audienceRating(8.3d) - .year(2023d) - .tagline("Witness the beginning of a new dynasty.") - .thumb("/library/metadata/59398/thumb/1681888010") - .art("/library/metadata/59398/art/1681888010") - .duration(7474422d) - .originallyAvailableAt(OffsetDateTime.parse("2023-02-15T00:00:00Z")) - .addedAt(1681803215d) - .updatedAt(1681888010d) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .chapterSource("media") - .primaryExtraKey("/library/metadata/59399") - .ratingImage("rottentomatoes://image.rating.rotten") - .media(List.of( - GetRecentlyAddedLibraryMedia.builder() - .id(120345d) - .duration(7474422d) - .bitrate(3623d) - .width(1920d) - .height(804d) - .aspectRatio(2.35d) - .audioChannels(6d) - .audioCodec("ac3") - .videoCodec("h264") - .videoResolution(1080d) - .container("mp4") - .videoFrameRate("24p") - .optimizedForStreaming(0d) - .videoProfile("high") - .part(List.of( - GetRecentlyAddedLibraryPart.builder() - .id(120353d) - .key("/library/parts/120353/1681803203/file.mp4") - .duration(7474422d) - .file("/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4") - .size(3395307162d) - .container("mp4") - .hasThumbnail(1d) - .videoProfile("high") - .build())) - .build())) - .genre(List.of( - GetRecentlyAddedLibraryGenre.builder() - .tag("Comedy") - .build())) - .director(List.of( - GetRecentlyAddedLibraryDirector.builder() - .tag("Peyton Reed") - .build())) - .writer(List.of( - GetRecentlyAddedLibraryWriter.builder() - .tag("Jeff Loveness") - .build())) - .country(List.of( - GetRecentlyAddedLibraryCountry.builder() - .tag("United States of America") - .build())) - .role(List.of( - GetRecentlyAddedLibraryRole.builder() - .tag("Paul Rudd") - .build(), - GetRecentlyAddedLibraryRole.builder() - .tag("Paul Rudd") - .build(), - GetRecentlyAddedLibraryRole.builder() - .tag("Paul Rudd") - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetAllLibraries() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetAllLibrariesResponse res = sdk.library().getAllLibraries() - .call(); - - assertEquals( - GetAllLibrariesResponseBody.builder() - .mediaContainer(GetAllLibrariesMediaContainer.builder() - .size(5) - .allowSync(false) - .title1("Plex Library") - .directory(List.of( - GetAllLibrariesDirectory.builder() - .allowSync(true) - .art("/:/resources/movie-fanart.jpg") - .composite("/library/sections/1/composite/1705615584") - .filters(true) - .refreshing(false) - .thumb("/:/resources/movie.png") - .key("1") - .type("movie") - .title("Movies") - .agent("tv.plex.agents.movie") - .scanner("Plex Movie") - .language("en-US") - .uuid("322a231a-b7f7-49f5-920f-14c61199cd30") - .updatedAt(1556281940L) - .createdAt(1556281940L) - .scannedAt(1556281940L) - .content(true) - .directory(true) - .contentChangedAt(1556281940L) - .hidden(0) - .location(List.of( - Location.builder() - .id(1) - .path("/movies") - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetLibraryDetails() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() - .sectionKey(9518) - .includeDetails(IncludeDetails.ONE) - .call(); - - assertEquals( - GetLibraryDetailsResponseBody.builder() - .mediaContainer(GetLibraryDetailsMediaContainer.builder() - .size(29) - .allowSync(false) - .art("/:/resources/movie-fanart.jpg") - .content("secondary") - .identifier("com.plexapp.plugins.library") - .librarySectionID(1) - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1701731894) - .thumb("/:/resources/movie.png") - .title1("Movies") - .viewGroup("secondary") - .viewMode(65592) - .directory(List.of( - GetLibraryDetailsDirectory.builder() - .key("search?type=1") - .title("Search...") - .secondary(true) - .prompt("Search Movies") - .search(true) - .build())) - .type(List.of( - GetLibraryDetailsType.builder() - .key("/library/sections/1/all?type=1") - .type("movie") - .title("Movies") - .active(false) - .filter(List.of( - GetLibraryDetailsFilter.builder() - .filter("label") - .filterType("string") - .key("/library/sections/1/label") - .title("Labels") - .type("filter") - .build())) - .sort(List.of( - GetLibraryDetailsSort.builder() - .default_("asc") - .defaultDirection("desc") - .descKey("random:desc") - .firstCharacterKey("/library/sections/1/firstCharacter") - .key("random") - .title("Randomly") - .build())) - .field(List.of( - GetLibraryDetailsField.builder() - .key("label") - .title("Label") - .type("tag") - .subType("bitrate") - .build())) - .build())) - .fieldType(List.of( - GetLibraryDetailsFieldType.builder() - .type("resolution") - .operator(List.of( - GetLibraryDetailsOperator.builder() - .key("=") - .title("is") - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_DeleteLibrary() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - DeleteLibraryResponse res = sdk.library().deleteLibrary() - .sectionKey(9518) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetLibraryItems_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() - .sectionKey(9518) - .tag(Tag.DIRECTOR) - .includeGuids(IncludeGuids.Enable) - .type(GetLibraryItemsQueryParamType.TvShow) - .includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable) - .xPlexContainerStart(0) - .xPlexContainerSize(50) - .build(); - - GetLibraryItemsResponse res = sdk.library().getLibraryItems() - .request(req) - .call(); - - assertEquals( - GetLibraryItemsResponseBody.builder() - .mediaContainer(GetLibraryItemsMediaContainer.builder() - .size(70) - .totalSize(170) - .offset(0) - .content("secondary") - .allowSync(true) - .art("/:/resources/movie-fanart.jpg") - .identifier("com.plexapp.plugins.library") - .librarySectionID(1L) - .librarySectionTitle("Movies") - .librarySectionUUID("322a231a-b7f7-49f5-920f-14c61199cd30") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1701731894) - .thumb("/:/resources/movie.png") - .title1("Movies") - .title2("Recently Released") - .viewGroup("movie") - .metadata(List.of( - GetLibraryItemsMetadata.builder() - .ratingKey("58683") - .key("/library/metadata/58683") - .guid("plex://movie/5d7768ba96b655001fdc0408") - .type(GetLibraryItemsLibraryType.Movie) - .title("Avatar: The Way of Water") - .summary("Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.") - .addedAt(1556281940L) - .studio("20th Century Studios") - .skipChildren(false) - .librarySectionID(1L) - .librarySectionTitle("Movies") - .librarySectionKey("/library/sections/1") - .slug("4-for-texas") - .contentRating("PG-13") - .rating(7.6d) - .audienceRating(9.2d) - .year(2022) - .seasonCount(2022) - .tagline("Return to Pandora.") - .flattenSeasons(GetLibraryItemsFlattenSeasons.True) - .showOrdering(GetLibraryItemsShowOrdering.Dvd) - .thumb("/library/metadata/58683/thumb/1703239236") - .art("/library/metadata/58683/art/1703239236") - .banner("/library/metadata/58683/banner/1703239236") - .duration(11558112) - .originallyAvailableAt(LocalDate.parse("2022-12-14T00:00:00Z")) - .updatedAt(1556281940L) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .chapterSource("media") - .primaryExtraKey("/library/metadata/58684") - .ratingImage("rottentomatoes://image.rating.ripe") - .grandparentRatingKey("66") - .grandparentGuid("plex://show/5d9c081b170e24001f2a7be4") - .grandparentKey("/library/metadata/66") - .grandparentTitle("Caprica") - .grandparentThumb("/library/metadata/66/thumb/1705716261") - .parentSlug("alice-in-borderland-2020") - .grandparentSlug("alice-in-borderland-2020") - .grandparentArt("/library/metadata/66/art/1705716261") - .grandparentTheme("/library/metadata/66/theme/1705716261") - .media(List.of( - GetLibraryItemsMedia.builder() - .id(119534) - .duration(11558112) - .bitrate(25025) - .width(3840) - .height(2072) - .aspectRatio(1.85d) - .audioChannels(6) - .audioCodec("eac3") - .videoCodec("hevc") - .videoResolution("4k") - .container("mkv") - .videoFrameRate("24p") - .videoProfile("main 10") - .part(List.of( - GetLibraryItemsPart.builder() - .id(119542) - .key("/library/parts/119542/1680457526/file.mkv") - .duration(11558112) - .file("/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv") - .size(36158371307L) - .container("mkv") - .videoProfile("main 10") - .audioProfile("dts") - .has64bitOffsets(false) - .optimizedForStreaming(false) - .indexes("sd") - .hasThumbnail(GetLibraryItemsHasThumbnail.True) - .stream(List.of( - GetLibraryItemsStream.builder() - .id(272796L) - .streamType(1L) - .codec("h264") - .index(0L) - .default_(true) - .selected(true) - .bitrate(6273L) - .colorPrimaries("bt709") - .colorRange("tv") - .colorSpace("bt709") - .colorTrc("bt709") - .bitDepth(8L) - .chromaLocation("left") - .streamIdentifier("2") - .chromaSubsampling("4:2:0") - .codedHeight(1088L) - .codedWidth(1920L) - .frameRate(29.97d) - .hasScalingMatrix(false) - .hearingImpaired(false) - .closedCaptions(false) - .embeddedInVideo("1") - .height(1080L) - .level(40L) - .profile("main") - .refFrames(4L) - .scanType("progressive") - .width(1920L) - .displayTitle("1080p (H.264)") - .extendedDisplayTitle("1080p (H.264)") - .channels(2L) - .language("English") - .languageTag("en") - .languageCode("eng") - .audioChannelLayout("stereo") - .samplingRate(48000L) - .title("English") - .canAutoSync(false) - .build())) - .build())) - .audioProfile("dts") - .hasVoiceActivity(false) - .optimizedForStreaming(GetLibraryItemsOptimizedForStreaming.Enable) - .has64bitOffsets(false) - .build())) - .genre(List.of( - GetLibraryItemsGenre.builder() - .tag("Adventure") - .build())) - .country(List.of( - GetLibraryItemsCountry.builder() - .tag("United States of America") - .build())) - .director(List.of( - GetLibraryItemsDirector.builder() - .tag("James Cameron") - .build())) - .writer(List.of( - GetLibraryItemsWriter.builder() - .tag("James Cameron") - .build())) - .collection(List.of( - GetLibraryItemsCollection.builder() - .tag("Working NL Subs") - .build())) - .role(List.of( - GetLibraryItemsRole.builder() - .id(294129L) - .filter("actor=294129") - .thumb("https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg") - .tag("Mike Smith") - .tagKey("668e7e7b22bcad9064350c91") - .role("Self") - .build())) - .mediaGuid(List.of( - GetLibraryItemsMediaGuid.builder() - .id("imdb://tt13015952") - .build())) - .ultraBlurColors(GetLibraryItemsUltraBlurColors.builder() - .topLeft("11333b") - .topRight("0a232d") - .bottomRight("73958") - .bottomLeft("1f5066") - .build()) - .metaDataRating(List.of( - GetLibraryItemsMetaDataRating.builder() - .image("themoviedb://image.rating") - .value(3f) - .type("audience") - .build())) - .image(List.of( - GetLibraryItemsImage.builder() - .alt("Episode 1") - .type(GetLibraryItemsLibraryResponse200Type.BACKGROUND) - .url("/library/metadata/45521/thumb/1644710589") - .build())) - .titleSort("Whale") - .viewCount(1) - .lastViewedAt(1682752242) - .originalTitle("映画 ブラッククローバー 魔法帝の剣") - .viewOffset(5222500) - .skipCount(1) - .index(1) - .theme("/library/metadata/1/theme/1705636920") - .leafCount(14) - .viewedLeafCount(0) - .childCount(1) - .hasPremiumExtras("1") - .hasPremiumPrimaryExtra("1") - .parentRatingKey("66") - .parentGuid("plex://show/5d9c081b170e24001f2a7be4") - .parentStudio("UCP") - .parentKey("/library/metadata/66") - .parentTitle("Caprica") - .parentIndex(1) - .parentYear(2010) - .parentThumb("/library/metadata/66/thumb/1705716261") - .parentTheme("/library/metadata/66/theme/1705716261") - .build())) - .type(List.of( - GetLibraryItemsType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetLibraryItemsFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetLibraryItemsSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetLibraryItemsActiveDirection.Ascending) - .defaultDirection(GetLibraryItemsDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetLibraryItemsField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build())) - .fieldType(List.of( - GetLibraryItemsFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsOperator.builder() - .key("=") - .title("is") - .build())) - .build())) - .nocache(true) - .viewMode(65592) - .mixedParents(true) - .meta(GetLibraryItemsMeta.builder() - .type(List.of( - GetLibraryItemsLibraryResponseType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetLibraryItemsLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetLibraryItemsLibrarySort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetLibraryItemsLibraryActiveDirection.Ascending) - .defaultDirection(GetLibraryItemsLibraryDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetLibraryItemsLibraryField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build())) - .fieldType(List.of( - GetLibraryItemsLibraryFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsLibraryOperator.builder() - .key("=") - .title("is") - .build())) - .build())) - .build()) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetLibraryItems() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() - .sectionKey(9518) - .tag(Tag.DIRECTOR) - .includeGuids(IncludeGuids.Enable) - .type(GetLibraryItemsQueryParamType.TvShow) - .includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable) - .xPlexContainerStart(0) - .xPlexContainerSize(50) - .build(); - - GetLibraryItemsResponse res = sdk.library().getLibraryItems() - .request(req) - .call(); - - assertEquals( - GetLibraryItemsResponseBody.builder() - .mediaContainer(GetLibraryItemsMediaContainer.builder() - .size(70) - .totalSize(170) - .offset(0) - .content("secondary") - .allowSync(true) - .art("/:/resources/movie-fanart.jpg") - .identifier("com.plexapp.plugins.library") - .librarySectionID(1L) - .librarySectionTitle("Movies") - .librarySectionUUID("322a231a-b7f7-49f5-920f-14c61199cd30") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1701731894) - .thumb("/:/resources/movie.png") - .title1("Movies") - .title2("Recently Released") - .viewGroup("movie") - .metadata(List.of( - GetLibraryItemsMetadata.builder() - .ratingKey("58683") - .key("/library/metadata/58683") - .guid("plex://movie/5d7768ba96b655001fdc0408") - .type(GetLibraryItemsLibraryType.Movie) - .title("Avatar: The Way of Water") - .summary("Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.") - .addedAt(1556281940L) - .studio("20th Century Studios") - .skipChildren(false) - .librarySectionID(1L) - .librarySectionTitle("Movies") - .librarySectionKey("/library/sections/1") - .slug("4-for-texas") - .contentRating("PG-13") - .rating(7.6d) - .audienceRating(9.2d) - .year(2022) - .seasonCount(2022) - .tagline("Return to Pandora.") - .flattenSeasons(GetLibraryItemsFlattenSeasons.True) - .showOrdering(GetLibraryItemsShowOrdering.Dvd) - .thumb("/library/metadata/58683/thumb/1703239236") - .art("/library/metadata/58683/art/1703239236") - .banner("/library/metadata/58683/banner/1703239236") - .duration(11558112) - .originallyAvailableAt(LocalDate.parse("2022-12-14T00:00:00Z")) - .updatedAt(1556281940L) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .chapterSource("media") - .primaryExtraKey("/library/metadata/58684") - .ratingImage("rottentomatoes://image.rating.ripe") - .grandparentRatingKey("66") - .grandparentGuid("plex://show/5d9c081b170e24001f2a7be4") - .grandparentKey("/library/metadata/66") - .grandparentTitle("Caprica") - .grandparentThumb("/library/metadata/66/thumb/1705716261") - .parentSlug("alice-in-borderland-2020") - .grandparentSlug("alice-in-borderland-2020") - .grandparentArt("/library/metadata/66/art/1705716261") - .grandparentTheme("/library/metadata/66/theme/1705716261") - .media(List.of( - GetLibraryItemsMedia.builder() - .id(119534) - .duration(11558112) - .bitrate(25025) - .width(3840) - .height(2072) - .aspectRatio(1.85d) - .audioChannels(6) - .audioCodec("eac3") - .videoCodec("hevc") - .videoResolution("4k") - .container("mkv") - .videoFrameRate("24p") - .videoProfile("main 10") - .part(List.of( - GetLibraryItemsPart.builder() - .id(119542) - .key("/library/parts/119542/1680457526/file.mkv") - .duration(11558112) - .file("/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv") - .size(36158371307L) - .container("mkv") - .videoProfile("main 10") - .audioProfile("dts") - .has64bitOffsets(false) - .optimizedForStreaming(false) - .indexes("sd") - .hasThumbnail(GetLibraryItemsHasThumbnail.True) - .stream(List.of( - GetLibraryItemsStream.builder() - .id(272796L) - .streamType(1L) - .codec("h264") - .index(0L) - .default_(true) - .selected(true) - .bitrate(6273L) - .colorPrimaries("bt709") - .colorRange("tv") - .colorSpace("bt709") - .colorTrc("bt709") - .bitDepth(8L) - .chromaLocation("left") - .streamIdentifier("2") - .chromaSubsampling("4:2:0") - .codedHeight(1088L) - .codedWidth(1920L) - .frameRate(29.97d) - .hasScalingMatrix(false) - .hearingImpaired(false) - .closedCaptions(false) - .embeddedInVideo("1") - .height(1080L) - .level(40L) - .profile("main") - .refFrames(4L) - .scanType("progressive") - .width(1920L) - .displayTitle("1080p (H.264)") - .extendedDisplayTitle("1080p (H.264)") - .channels(2L) - .language("English") - .languageTag("en") - .languageCode("eng") - .audioChannelLayout("stereo") - .samplingRate(48000L) - .title("English") - .canAutoSync(false) - .build())) - .build())) - .audioProfile("dts") - .hasVoiceActivity(false) - .optimizedForStreaming(GetLibraryItemsOptimizedForStreaming.Enable) - .has64bitOffsets(false) - .build())) - .genre(List.of( - GetLibraryItemsGenre.builder() - .tag("Adventure") - .build())) - .country(List.of( - GetLibraryItemsCountry.builder() - .tag("United States of America") - .build())) - .director(List.of( - GetLibraryItemsDirector.builder() - .tag("James Cameron") - .build())) - .writer(List.of( - GetLibraryItemsWriter.builder() - .tag("James Cameron") - .build())) - .collection(List.of( - GetLibraryItemsCollection.builder() - .tag("Working NL Subs") - .build())) - .role(List.of( - GetLibraryItemsRole.builder() - .id(294129L) - .filter("actor=294129") - .thumb("https://metadata-static.plex.tv/2/people/27b85844536c39f3f9ac943aaad46608.jpg") - .tag("Mike Smith") - .tagKey("668e7e7b22bcad9064350c91") - .role("Self") - .build())) - .mediaGuid(List.of( - GetLibraryItemsMediaGuid.builder() - .id("imdb://tt13015952") - .build())) - .ultraBlurColors(GetLibraryItemsUltraBlurColors.builder() - .topLeft("11333b") - .topRight("0a232d") - .bottomRight("73958") - .bottomLeft("1f5066") - .build()) - .metaDataRating(List.of( - GetLibraryItemsMetaDataRating.builder() - .image("themoviedb://image.rating") - .value(3f) - .type("audience") - .build())) - .image(List.of( - GetLibraryItemsImage.builder() - .alt("Episode 1") - .type(GetLibraryItemsLibraryResponse200Type.BACKGROUND) - .url("/library/metadata/45521/thumb/1644710589") - .build())) - .titleSort("Whale") - .viewCount(1) - .lastViewedAt(1682752242) - .originalTitle("映画 ブラッククローバー 魔法帝の剣") - .viewOffset(5222500) - .skipCount(1) - .index(1) - .theme("/library/metadata/1/theme/1705636920") - .leafCount(14) - .viewedLeafCount(0) - .childCount(1) - .hasPremiumExtras("1") - .hasPremiumPrimaryExtra("1") - .parentRatingKey("66") - .parentGuid("plex://show/5d9c081b170e24001f2a7be4") - .parentStudio("UCP") - .parentKey("/library/metadata/66") - .parentTitle("Caprica") - .parentIndex(1) - .parentYear(2010) - .parentThumb("/library/metadata/66/thumb/1705716261") - .parentTheme("/library/metadata/66/theme/1705716261") - .build())) - .type(List.of( - GetLibraryItemsType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetLibraryItemsFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetLibraryItemsFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetLibraryItemsSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetLibraryItemsActiveDirection.Ascending) - .defaultDirection(GetLibraryItemsDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build(), - GetLibraryItemsSort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetLibraryItemsActiveDirection.Ascending) - .defaultDirection(GetLibraryItemsDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetLibraryItemsField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build())) - .fieldType(List.of( - GetLibraryItemsFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsOperator.builder() - .key("=") - .title("is") - .build())) - .build(), - GetLibraryItemsFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsOperator.builder() - .key("=") - .title("is") - .build())) - .build(), - GetLibraryItemsFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsOperator.builder() - .key("=") - .title("is") - .build())) - .build())) - .nocache(true) - .viewMode(65592) - .mixedParents(true) - .meta(GetLibraryItemsMeta.builder() - .type(List.of( - GetLibraryItemsLibraryResponseType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetLibraryItemsLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetLibraryItemsLibrarySort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetLibraryItemsLibraryActiveDirection.Ascending) - .defaultDirection(GetLibraryItemsLibraryDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetLibraryItemsLibraryField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetLibraryItemsLibraryField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build(), - GetLibraryItemsLibraryResponseType.builder() - .key("/library/sections/2/all?type=2") - .type("show") - .title("TV Shows") - .active(false) - .filter(List.of( - GetLibraryItemsLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetLibraryItemsLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build(), - GetLibraryItemsLibraryFilter.builder() - .filter("genre") - .filterType("string") - .key("/library/sections/2/genre?type=2") - .title("Genre") - .type("filter") - .build())) - .sort(List.of( - GetLibraryItemsLibrarySort.builder() - .key("titleSort") - .title("Title") - .default_("asc") - .active(false) - .activeDirection(GetLibraryItemsLibraryActiveDirection.Ascending) - .defaultDirection(GetLibraryItemsLibraryDefaultDirection.Ascending) - .descKey("titleSort:desc") - .firstCharacterKey("/library/sections/2/firstCharacter") - .build())) - .field(List.of( - GetLibraryItemsLibraryField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetLibraryItemsLibraryField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build(), - GetLibraryItemsLibraryField.builder() - .key("show.title") - .title("Show Title") - .type("string") - .subType("rating") - .build())) - .build())) - .fieldType(List.of( - GetLibraryItemsLibraryFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsLibraryOperator.builder() - .key("=") - .title("is") - .build())) - .build(), - GetLibraryItemsLibraryFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsLibraryOperator.builder() - .key("=") - .title("is") - .build())) - .build(), - GetLibraryItemsLibraryFieldType.builder() - .type("tag") - .operator(List.of( - GetLibraryItemsLibraryOperator.builder() - .key("=") - .title("is") - .build())) - .build())) - .build()) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetRefreshLibraryMetadata() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() - .sectionKey(9518) - .force(Force.ONE) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetSearchLibrary() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSearchLibraryResponse res = sdk.library().getSearchLibrary() - .sectionKey(9518) - .type(GetSearchLibraryQueryParamType.TvShow) - .call(); - - assertEquals( - GetSearchLibraryResponseBody.builder() - .mediaContainer(GetSearchLibraryMediaContainer.builder() - .size(2) - .allowSync(false) - .art("/:/resources/show-fanart.jpg") - .identifier("com.plexapp.plugins.library") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1698860922) - .nocache(true) - .thumb("/:/resources/show.png") - .title1("TV Shows") - .title2("Search for ''") - .viewGroup("season") - .viewMode(65593) - .metadata(List.of( - GetSearchLibraryMetadata.builder() - .ratingKey("2") - .key("/library/metadata/2/children") - .parentRatingKey("1") - .guid("plex://season/602e67e766dfdb002c0a1b5b") - .parentGuid("plex://show/5d9c086c7d06d9001ffd27aa") - .parentStudio("Mutant Enemy Productions") - .type("season") - .title("Season 1") - .parentKey("/library/metadata/1") - .parentTitle("Firefly") - .summary("Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.") - .index(1) - .parentIndex(1) - .parentYear(2002) - .thumb("/library/metadata/2/thumb/1705636920") - .art("/library/metadata/1/art/1705636920") - .parentThumb("/library/metadata/1/thumb/1705636920") - .parentTheme("/library/metadata/1/theme/1705636920") - .addedAt(1705636916) - .updatedAt(1705636920) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetMetaDataByRatingKey() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey() - .ratingKey(9518L) - .call(); - - assertEquals( - GetMetaDataByRatingKeyResponseBody.builder() - .mediaContainer(GetMetaDataByRatingKeyMediaContainer.builder() - .size(1) - .allowSync(true) - .identifier("com.plexapp.plugins.library") - .librarySectionID(1) - .librarySectionTitle("Movies") - .librarySectionUUID("cfc899d7-3000-46f6-8489-b9592714ada5") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1698860922) - .metadata(List.of( - GetMetaDataByRatingKeyMetadata.builder() - .ratingKey("17") - .key("/library/metadata/17") - .guid("plex://movie/5d77683f6f4521001ea9dc53") - .studio("Universal Pictures") - .type("movie") - .title("Serenity") - .librarySectionTitle("Movies") - .librarySectionID(1) - .librarySectionKey("/library/sections/1") - .contentRating("PG-13") - .summary("Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.") - .rating(8.2d) - .audienceRating(9.1d) - .year(2005) - .tagline("They aim to misbehave.") - .thumb("/library/metadata/17/thumb/1705637165") - .art("/library/metadata/17/art/1705637165") - .duration(141417) - .originallyAvailableAt(LocalDate.parse("2005-09-29T00:00:00Z")) - .addedAt(1705637164) - .updatedAt(1705637165) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .hasPremiumPrimaryExtra("1") - .ratingImage("rottentomatoes://image.rating.ripe") - .media(List.of( - GetMetaDataByRatingKeyMedia.builder() - .id(15) - .duration(141417) - .bitrate(2278) - .width(1920) - .height(814) - .aspectRatio(2.35d) - .audioChannels(2) - .audioCodec("aac") - .videoCodec("h264") - .videoResolution("1080") - .container("mp4") - .videoFrameRate("24p") - .optimizedForStreaming(0) - .audioProfile("lc") - .has64bitOffsets(false) - .videoProfile("high") - .part(List.of( - GetMetaDataByRatingKeyPart.builder() - .id(15) - .key("/library/parts/15/1705637151/file.mp4") - .duration(141417) - .file("/movies/Serenity (2005)/Serenity (2005).mp4") - .size(40271948) - .audioProfile("lc") - .container("mp4") - .has64bitOffsets(false) - .optimizedForStreaming(false) - .videoProfile("high") - .stream(List.of( - GetMetaDataByRatingKeyStream.builder() - .id(29) - .streamType(2) - .default_(true) - .codec("aac") - .index(0) - .bitrate(128) - .bitDepth(8) - .chromaLocation("left") - .chromaSubsampling("14520") - .codedHeight(816) - .codedWidth(1920) - .colorPrimaries("bt709") - .colorRange("tv") - .colorSpace("bt709") - .colorTrc("bt709") - .frameRate(24) - .hasScalingMatrix(false) - .height(814) - .level(40) - .profile("lc") - .refFrames(4) - .scanType("progressive") - .streamIdentifier("1") - .width(1920) - .displayTitle("English (AAC Stereo)") - .extendedDisplayTitle("English (AAC Stereo)") - .selected(true) - .channels(2) - .language("English") - .languageTag("en") - .languageCode("eng") - .samplingRate(44100) - .build())) - .build())) - .build())) - .genre(List.of( - GetMetaDataByRatingKeyGenre.builder() - .id(184) - .filter("genre=184") - .tag("Thriller") - .build())) - .country(List.of( - GetMetaDataByRatingKeyCountry.builder() - .id(116) - .filter("country=116") - .tag("United States of America") - .build())) - .guids(List.of( - Guids.builder() - .id("tvdb://2337") - .build())) - .ratings(List.of( - Ratings.builder() - .image("themoviedb://image.rating") - .value(7.4d) - .type("audience") - .build())) - .director(List.of( - GetMetaDataByRatingKeyDirector.builder() - .id(130) - .filter("director=130") - .tag("Joss Whedon") - .tagKey("5d776828880197001ec90e8f") - .thumb("https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg") - .build())) - .writer(List.of( - GetMetaDataByRatingKeyWriter.builder() - .id(132) - .filter("writer=132") - .tag("Joss Whedon") - .tagKey("5d776828880197001ec90e8f") - .thumb("https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg") - .build())) - .role(List.of( - GetMetaDataByRatingKeyRole.builder() - .id(220) - .filter("actor=220") - .tag("Dennis Keiffer") - .tagKey("5d77683554f42c001f8c4708") - .role("Bar Guy (uncredited)") - .thumb("https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg") - .build())) - .producer(List.of( - Producer.builder() - .id(221) - .filter("producer=221") - .tag("Barry Mendel") - .tagKey("5d776826961905001eb90e2b") - .thumb("https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg") - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetMetadataChildren_IncludeStream() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() - .ratingKey(6818.20d) - .includeElements("") - .call(); - - assertEquals( - GetMetadataChildrenResponseBody.builder() - .mediaContainer(GetMetadataChildrenMediaContainer.builder() - .size(3) - .allowSync(true) - .art("/library/metadata/30072/art/1705739923") - .identifier("com.plexapp.plugins.library") - .key("30072") - .librarySectionID(2) - .librarySectionTitle("TV Shows") - .librarySectionUUID("4bb2521c-8ba9-459b-aaee-8ab8bc35eabd") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1701731894) - .nocache(true) - .parentIndex(1) - .parentTitle("Reacher") - .parentYear(2022) - .summary("When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.") - .theme("/library/metadata/30072/theme/1705739923") - .thumb("/library/metadata/30072/thumb/1705739923") - .title1("TV Shows") - .title2("Reacher") - .viewGroup("season") - .viewMode(65593) - .directory(List.of( - GetMetadataChildrenDirectory.builder() - .leafCount(16) - .thumb("/library/metadata/30072/thumb/1705739923") - .viewedLeafCount(16) - .key("/library/metadata/30072/allLeaves") - .title("All episodes") - .build())) - .metadata(List.of( - GetMetadataChildrenMetadata.builder() - .ratingKey("66488") - .key("/library/metadata/66488/children") - .parentRatingKey("30072") - .guid("plex://season/652aea6549508477c34c6000") - .parentGuid("plex://show/5d9c09190aaccd001f8f42f0") - .parentStudio("Amazon Studios") - .type("season") - .title("Season 2") - .parentKey("/library/metadata/30072") - .parentTitle("Reacher") - .summary("Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.") - .index(2) - .parentIndex(1) - .viewCount(11) - .lastViewedAt(1705646565) - .parentYear(2022) - .thumb("/library/metadata/66488/thumb/1703065033") - .art("/library/metadata/30072/art/1705739923") - .parentThumb("/library/metadata/30072/thumb/1705739923") - .parentTheme("/library/metadata/30072/theme/1705739923") - .leafCount(8) - .viewedLeafCount(8) - .addedAt(1702602021) - .updatedAt(1703065033) - .userRating(9) - .skipCount(1) - .lastRatedAt(1703881224) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetMetadataChildren_IncludeStreamOtheritem() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() - .ratingKey(3595.08d) - .includeElements("") - .call(); - - assertEquals( - GetMetadataChildrenResponseBody.builder() - .mediaContainer(GetMetadataChildrenMediaContainer.builder() - .size(3) - .allowSync(true) - .art("/library/metadata/30072/art/1705739923") - .identifier("com.plexapp.plugins.library") - .key("30072") - .librarySectionID(2) - .librarySectionTitle("TV Shows") - .librarySectionUUID("4bb2521c-8ba9-459b-aaee-8ab8bc35eabd") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1701731894) - .nocache(true) - .parentIndex(1) - .parentTitle("Reacher") - .parentYear(2022) - .summary("When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.") - .theme("/library/metadata/30072/theme/1705739923") - .thumb("/library/metadata/30072/thumb/1705739923") - .title1("TV Shows") - .title2("Reacher") - .viewGroup("season") - .viewMode(65593) - .directory(List.of( - GetMetadataChildrenDirectory.builder() - .leafCount(16) - .thumb("/library/metadata/30072/thumb/1705739923") - .viewedLeafCount(16) - .key("/library/metadata/30072/allLeaves") - .title("All episodes") - .build())) - .metadata(List.of( - GetMetadataChildrenMetadata.builder() - .ratingKey("66488") - .key("/library/metadata/66488/children") - .parentRatingKey("30072") - .guid("plex://season/652aea6549508477c34c6000") - .parentGuid("plex://show/5d9c09190aaccd001f8f42f0") - .parentStudio("Amazon Studios") - .type("season") - .title("Season 2") - .parentKey("/library/metadata/30072") - .parentTitle("Reacher") - .summary("Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.") - .index(2) - .parentIndex(1) - .viewCount(11) - .lastViewedAt(1705646565) - .parentYear(2022) - .thumb("/library/metadata/66488/thumb/1703065033") - .art("/library/metadata/30072/art/1705739923") - .parentThumb("/library/metadata/30072/thumb/1705739923") - .parentTheme("/library/metadata/30072/theme/1705739923") - .leafCount(8) - .viewedLeafCount(8) - .addedAt(1702602021) - .updatedAt(1703065033) - .userRating(9) - .skipCount(1) - .lastRatedAt(1703881224) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetMetadataChildren_IncludeStreamOtheritemAnotheritem() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() - .ratingKey(4370.32d) - .includeElements("") - .call(); - - assertEquals( - GetMetadataChildrenResponseBody.builder() - .mediaContainer(GetMetadataChildrenMediaContainer.builder() - .size(3) - .allowSync(true) - .art("/library/metadata/30072/art/1705739923") - .identifier("com.plexapp.plugins.library") - .key("30072") - .librarySectionID(2) - .librarySectionTitle("TV Shows") - .librarySectionUUID("4bb2521c-8ba9-459b-aaee-8ab8bc35eabd") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1701731894) - .nocache(true) - .parentIndex(1) - .parentTitle("Reacher") - .parentYear(2022) - .summary("When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.") - .theme("/library/metadata/30072/theme/1705739923") - .thumb("/library/metadata/30072/thumb/1705739923") - .title1("TV Shows") - .title2("Reacher") - .viewGroup("season") - .viewMode(65593) - .directory(List.of( - GetMetadataChildrenDirectory.builder() - .leafCount(16) - .thumb("/library/metadata/30072/thumb/1705739923") - .viewedLeafCount(16) - .key("/library/metadata/30072/allLeaves") - .title("All episodes") - .build())) - .metadata(List.of( - GetMetadataChildrenMetadata.builder() - .ratingKey("66488") - .key("/library/metadata/66488/children") - .parentRatingKey("30072") - .guid("plex://season/652aea6549508477c34c6000") - .parentGuid("plex://show/5d9c09190aaccd001f8f42f0") - .parentStudio("Amazon Studios") - .type("season") - .title("Season 2") - .parentKey("/library/metadata/30072") - .parentTitle("Reacher") - .summary("Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.") - .index(2) - .parentIndex(1) - .viewCount(11) - .lastViewedAt(1705646565) - .parentYear(2022) - .thumb("/library/metadata/66488/thumb/1703065033") - .art("/library/metadata/30072/art/1705739923") - .parentThumb("/library/metadata/30072/thumb/1705739923") - .parentTheme("/library/metadata/30072/theme/1705739923") - .leafCount(8) - .viewedLeafCount(8) - .addedAt(1702602021) - .updatedAt(1703065033) - .userRating(9) - .skipCount(1) - .lastRatedAt(1703881224) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetTopWatchedContent_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() - .type(GetTopWatchedContentQueryParamType.TvShow) - .includeGuids(1L) - .call(); - - assertEquals( - GetTopWatchedContentResponseBody.builder() - .mediaContainer(GetTopWatchedContentMediaContainer.builder() - .size(1) - .allowSync(true) - .identifier("com.plexapp.plugins.library") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1698860922) - .metadata(List.of( - GetTopWatchedContentMetadata.builder() - .ratingKey("17") - .key("/library/metadata/17") - .guid("plex://movie/5d77683f6f4521001ea9dc53") - .slug("waterloo-road") - .studio("Universal Pictures") - .type("movie") - .title("Serenity") - .librarySectionTitle("Movies") - .librarySectionID(1) - .librarySectionKey("/library/sections/1") - .contentRating("PG-13") - .summary("Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.") - .index(1L) - .audienceRating(9.1d) - .year(2005) - .tagline("They aim to misbehave.") - .thumb("/library/metadata/17/thumb/1705637165") - .art("/library/metadata/17/art/1705637165") - .duration(141417) - .originallyAvailableAt(LocalDate.parse("2005-09-29T00:00:00Z")) - .leafCount(222L) - .viewedLeafCount(100L) - .childCount(13L) - .addedAt(1705637164) - .updatedAt(1705637165) - .globalViewCount(80L) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .genre(List.of( - GetTopWatchedContentGenre.builder() - .id(184) - .filter("genre=184") - .tag("Thriller") - .build())) - .country(List.of( - GetTopWatchedContentCountry.builder() - .id(116) - .filter("country=116") - .tag("United States of America") - .build())) - .guids(List.of( - GetTopWatchedContentGuids.builder() - .id("tvdb://2337") - .build())) - .role(List.of( - GetTopWatchedContentRole.builder() - .id(220) - .filter("actor=220") - .tag("Dennis Keiffer") - .tagKey("5d77683554f42c001f8c4708") - .role("Bar Guy (uncredited)") - .thumb("https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg") - .build())) - .user(List.of( - User.builder() - .id(220) - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLibrary_GetOnDeck() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetOnDeckResponse res = sdk.library().getOnDeck() - .call(); - - assertEquals( - GetOnDeckResponseBody.builder() - .mediaContainer(GetOnDeckMediaContainer.builder() - .size(16d) - .identifier("com.plexapp.plugins.library") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1680021154d) - .metadata(List.of( - GetOnDeckMetadata.builder() - .librarySectionID(2d) - .librarySectionTitle("TV Shows") - .librarySectionUUID("4bb2521c-8ba9-459b-aaee-8ab8bc35eabd") - .ratingKey(49564d) - .key("/library/metadata/49564") - .parentRatingKey(49557d) - .grandparentRatingKey(49556d) - .guid("plex://episode/5ea7d7402e7ab10042e74d4f") - .parentGuid("plex://season/602e754d67f4c8002ce54b3d") - .grandparentGuid("plex://show/5d9c090e705e7a001e6e94d8") - .type("episode") - .title("Circus") - .grandparentKey("/library/metadata/49556") - .parentKey("/library/metadata/49557") - .librarySectionKey("/library/sections/2") - .grandparentTitle("Bluey (2018)") - .parentTitle("Season 2") - .contentRating("TV-Y") - .summary("Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.") - .index(33d) - .parentIndex(2d) - .lastViewedAt(1681908352d) - .year(2018d) - .thumb("/library/metadata/49564/thumb/1654258204") - .art("/library/metadata/49556/art/1680939546") - .parentThumb("/library/metadata/49557/thumb/1654258204") - .grandparentThumb("/library/metadata/49556/thumb/1680939546") - .grandparentArt("/library/metadata/49556/art/1680939546") - .grandparentTheme("/library/metadata/49556/theme/1680939546") - .duration(420080d) - .originallyAvailableAt(OffsetDateTime.parse("2020-10-31T00:00:00Z")) - .addedAt(1654258196d) - .updatedAt(1654258204d) - .media(List.of( - GetOnDeckMedia.builder() - .id(80994d) - .duration(420080d) - .bitrate(1046d) - .width(1920d) - .height(1080d) - .aspectRatio(1.78d) - .audioChannels(2d) - .audioCodec("aac") - .videoCodec("hevc") - .videoResolution("1080") - .container("mkv") - .videoFrameRate("PAL") - .audioProfile("lc") - .videoProfile("main") - .part(List.of( - GetOnDeckPart.builder() - .id(80994d) - .key("/library/parts/80994/1655007810/file.mkv") - .duration(420080d) - .file("/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv") - .size(55148931d) - .audioProfile("lc") - .container("mkv") - .videoProfile("main") - .stream(List.of( - GetOnDeckStream.builder() - .id(211234d) - .streamType(1d) - .codec("hevc") - .index(0d) - .bitrate(918d) - .language("English") - .languageTag("en") - .languageCode("eng") - .bitDepth(8d) - .chromaLocation("left") - .chromaSubsampling("4:2:0") - .codedHeight(1080d) - .codedWidth(1920d) - .colorRange("tv") - .frameRate(25d) - .height(1080d) - .level(120d) - .profile("main") - .refFrames(1d) - .width(1920d) - .displayTitle("1080p (HEVC Main)") - .extendedDisplayTitle("1080p (HEVC Main)") - .build())) - .build())) - .build())) - .guids(List.of( - GetOnDeckGuids.builder() - .id("imdb://tt13303712") - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/LogTests.java b/src/test/java/dev/plexapi/sdk/LogTests.java deleted file mode 100644 index 30d64778..00000000 --- a/src/test/java/dev/plexapi/sdk/LogTests.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import dev.plexapi.sdk.models.operations.EnablePaperTrailResponse; -import dev.plexapi.sdk.models.operations.Level; -import dev.plexapi.sdk.models.operations.LogLineResponse; -import dev.plexapi.sdk.models.operations.LogMultiLineResponse; -import java.lang.Exception; -import java.lang.String; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class LogTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLog_LogLine() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - LogLineResponse res = sdk.log().logLine() - .level(Level.ZERO) - .message("Test log message") - .source("Postman") - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLog_LogMultiLine() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman - level=1&message=Test%20message%203&source=postman"; - - LogMultiLineResponse res = sdk.log().logMultiLine() - .request(req) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testLog_EnablePaperTrail() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - EnablePaperTrailResponse res = sdk.log().enablePaperTrail() - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/MediaTests.java b/src/test/java/dev/plexapi/sdk/MediaTests.java deleted file mode 100644 index 7bf248ed..00000000 --- a/src/test/java/dev/plexapi/sdk/MediaTests.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import dev.plexapi.sdk.models.operations.GetBannerImageRequest; -import dev.plexapi.sdk.models.operations.GetBannerImageResponse; -import dev.plexapi.sdk.models.operations.GetThumbImageRequest; -import dev.plexapi.sdk.models.operations.GetThumbImageResponse; -import dev.plexapi.sdk.models.operations.MarkPlayedResponse; -import dev.plexapi.sdk.models.operations.MarkUnplayedResponse; -import dev.plexapi.sdk.models.operations.UpdatePlayProgressResponse; -import java.lang.Exception; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class MediaTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testMedia_MarkPlayed() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - MarkPlayedResponse res = sdk.media().markPlayed() - .key(59398d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testMedia_MarkUnplayed() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - MarkUnplayedResponse res = sdk.media().markUnplayed() - .key(59398d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testMedia_UpdatePlayProgress_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() - .key("") - .time(90000d) - .state("played") - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testMedia_GetBannerImage() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetBannerImageRequest req = GetBannerImageRequest.builder() - .ratingKey(9518L) - .width(396L) - .height(396L) - .minSize(1L) - .upscale(1L) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetBannerImageResponse res = sdk.media().getBannerImage() - .request(req) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testMedia_GetThumbImage() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetThumbImageRequest req = GetThumbImageRequest.builder() - .ratingKey(9518L) - .width(396L) - .height(396L) - .minSize(1L) - .upscale(1L) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .build(); - - GetThumbImageResponse res = sdk.media().getThumbImage() - .request(req) - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/PlaylistsTests.java b/src/test/java/dev/plexapi/sdk/PlaylistsTests.java deleted file mode 100644 index 5ec0d118..00000000 --- a/src/test/java/dev/plexapi/sdk/PlaylistsTests.java +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.AddPlaylistContentsMediaContainer; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsMetadata; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.AddPlaylistContentsResponseBody; -import dev.plexapi.sdk.models.operations.ClearPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.CreatePlaylistMediaContainer; -import dev.plexapi.sdk.models.operations.CreatePlaylistMetadata; -import dev.plexapi.sdk.models.operations.CreatePlaylistQueryParamType; -import dev.plexapi.sdk.models.operations.CreatePlaylistRequest; -import dev.plexapi.sdk.models.operations.CreatePlaylistResponse; -import dev.plexapi.sdk.models.operations.CreatePlaylistResponseBody; -import dev.plexapi.sdk.models.operations.DeletePlaylistResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsCountry; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsDirector; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsGenre; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsMedia; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsMediaContainer; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsMetadata; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsPart; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsQueryParamType; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsResponseBody; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsRole; -import dev.plexapi.sdk.models.operations.GetPlaylistContentsWriter; -import dev.plexapi.sdk.models.operations.GetPlaylistMediaContainer; -import dev.plexapi.sdk.models.operations.GetPlaylistMetadata; -import dev.plexapi.sdk.models.operations.GetPlaylistResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistResponseBody; -import dev.plexapi.sdk.models.operations.GetPlaylistsMediaContainer; -import dev.plexapi.sdk.models.operations.GetPlaylistsMetadata; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponse; -import dev.plexapi.sdk.models.operations.GetPlaylistsResponseBody; -import dev.plexapi.sdk.models.operations.PlaylistType; -import dev.plexapi.sdk.models.operations.QueryParamForce; -import dev.plexapi.sdk.models.operations.QueryParamSmart; -import dev.plexapi.sdk.models.operations.Smart; -import dev.plexapi.sdk.models.operations.UpdatePlaylistResponse; -import dev.plexapi.sdk.models.operations.UploadPlaylistResponse; -import java.lang.Exception; -import java.time.LocalDate; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class PlaylistsTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_CreatePlaylist() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - CreatePlaylistRequest req = CreatePlaylistRequest.builder() - .title("") - .type(CreatePlaylistQueryParamType.PHOTO) - .smart(Smart.ONE) - .uri("https://comfortable-eyebrow.info/") - .build(); - - CreatePlaylistResponse res = sdk.playlists().createPlaylist() - .request(req) - .call(); - - assertEquals( - CreatePlaylistResponseBody.builder() - .mediaContainer(CreatePlaylistMediaContainer.builder() - .size(7) - .metadata(List.of( - CreatePlaylistMetadata.builder() - .ratingKey("96") - .key("/playlists/96/items") - .guid("com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55") - .type("playlist") - .title("A Great Playlist") - .summary("What a great playlist") - .smart(false) - .playlistType("video") - .icon("playlist://image.smart") - .viewCount(1) - .lastViewedAt(1705719589) - .leafCount(1) - .addedAt(1705719589) - .updatedAt(1705724593) - .composite("/playlists/96/composite/1705724593") - .duration(141000) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_GetPlaylists() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetPlaylistsResponse res = sdk.playlists().getPlaylists() - .playlistType(PlaylistType.VIDEO) - .smart(QueryParamSmart.ZERO) - .call(); - - assertEquals( - GetPlaylistsResponseBody.builder() - .mediaContainer(GetPlaylistsMediaContainer.builder() - .size(4) - .metadata(List.of( - GetPlaylistsMetadata.builder() - .ratingKey("92") - .key("/playlists/92/items") - .guid("com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903") - .type("playlist") - .title("Static Playlist") - .summary("A Great Playlist") - .smart(false) - .playlistType("video") - .composite("/playlists/92/composite/1705716440") - .icon("playlist://image.smart") - .viewCount(1) - .lastViewedAt(1705716298) - .duration(7328000) - .leafCount(32) - .addedAt(1705716298) - .updatedAt(1705716440) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_GetPlaylist() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetPlaylistResponse res = sdk.playlists().getPlaylist() - .playlistID(9883.74d) - .call(); - - assertEquals( - GetPlaylistResponseBody.builder() - .mediaContainer(GetPlaylistMediaContainer.builder() - .size(1) - .metadata(List.of( - GetPlaylistMetadata.builder() - .content("library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1") - .ratingKey("95") - .key("/playlists/95/items") - .guid("com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91") - .type("playlist") - .title("Smart Movie Playlist") - .summary("") - .smart(true) - .playlistType("video") - .composite("/playlists/95/composite/1705717387") - .icon("playlist://image.smart") - .duration(282000) - .leafCount(2) - .addedAt(1705716493) - .updatedAt(1705717387) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_DeletePlaylist() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - DeletePlaylistResponse res = sdk.playlists().deletePlaylist() - .playlistID(1020.45d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_UpdatePlaylist() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() - .playlistID(2088.77d) - .title("") - .summary("") - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_GetPlaylistContents() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() - .playlistID(1613.10d) - .type(GetPlaylistContentsQueryParamType.TvShow) - .call(); - - assertEquals( - GetPlaylistContentsResponseBody.builder() - .mediaContainer(GetPlaylistContentsMediaContainer.builder() - .size(2) - .composite("/playlists/95/composite/1705717521") - .duration(282) - .leafCount(2) - .playlistType("video") - .ratingKey("95") - .smart(true) - .title("Smart Movie Playlist") - .metadata(List.of( - GetPlaylistContentsMetadata.builder() - .ratingKey("17") - .key("/library/metadata/17") - .guid("plex://movie/5d77683f6f4521001ea9dc53") - .studio("Universal Pictures") - .type("movie") - .title("Serenity") - .titleSort("Amazing Spider-Man 2") - .librarySectionTitle("Movies") - .librarySectionID(1) - .librarySectionKey("/library/sections/1") - .contentRating("PG-13") - .summary("Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.") - .rating(8.2d) - .audienceRating(9.1d) - .year(2005) - .tagline("They aim to misbehave.") - .thumb("/library/metadata/17/thumb/1705637165") - .art("/library/metadata/17/art/1705637165") - .duration(141416) - .originallyAvailableAt(LocalDate.parse("2005-09-29T00:00:00Z")) - .addedAt(1705637164) - .updatedAt(1705637165) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .hasPremiumExtras("1") - .hasPremiumPrimaryExtra("1") - .ratingImage("rottentomatoes://image.rating.ripe") - .media(List.of( - GetPlaylistContentsMedia.builder() - .id(15) - .duration(141416) - .bitrate(2273) - .width(1920) - .height(814) - .aspectRatio(2.35d) - .audioChannels(2) - .audioCodec("aac") - .videoCodec("h264") - .videoResolution("1080") - .container("mp4") - .videoFrameRate("24p") - .optimizedForStreaming(0) - .audioProfile("lc") - .has64bitOffsets(false) - .videoProfile("high") - .part(List.of( - GetPlaylistContentsPart.builder() - .id(15) - .key("/library/parts/15/1705637151/file.mp4") - .duration(141416) - .file("/movies/Serenity (2005)/Serenity (2005).mp4") - .size(40271948) - .audioProfile("lc") - .container("mp4") - .has64bitOffsets(false) - .optimizedForStreaming(false) - .videoProfile("high") - .build())) - .build())) - .genre(List.of( - GetPlaylistContentsGenre.builder() - .tag("Action") - .build())) - .country(List.of( - GetPlaylistContentsCountry.builder() - .tag("United States of America") - .build())) - .director(List.of( - GetPlaylistContentsDirector.builder() - .tag("Joss Whedon") - .build())) - .writer(List.of( - GetPlaylistContentsWriter.builder() - .tag("Joss Whedon") - .build())) - .role(List.of( - GetPlaylistContentsRole.builder() - .tag("Gina Torres") - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_ClearPlaylistContents() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() - .playlistID(6531.08d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_AddPlaylistContents() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() - .playlistID(2532.92d) - .uri("server://12345/com.plexapp.plugins.library/library/metadata/1") - .playQueueID(123d) - .call(); - - assertEquals( - AddPlaylistContentsResponseBody.builder() - .mediaContainer(AddPlaylistContentsMediaContainer.builder() - .size(1) - .leafCountAdded(1) - .leafCountRequested(1) - .metadata(List.of( - AddPlaylistContentsMetadata.builder() - .ratingKey("94") - .key("/playlists/94/items") - .guid("com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2") - .type("playlist") - .title("A great playlist") - .summary("One of my great playlists") - .smart(false) - .playlistType("video") - .composite("/playlists/94/composite/1705800070") - .duration(423000) - .leafCount(3) - .addedAt(1705716458) - .updatedAt(1705800070) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlaylists_UploadPlaylist() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() - .path("/home/barkley/playlist.m3u") - .force(QueryParamForce.ZERO) - .sectionID(1L) - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/PlexTests.java b/src/test/java/dev/plexapi/sdk/PlexTests.java deleted file mode 100644 index 2ccca64a..00000000 --- a/src/test/java/dev/plexapi/sdk/PlexTests.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.Connections; -import dev.plexapi.sdk.models.operations.Friend; -import dev.plexapi.sdk.models.operations.GeoData; -import dev.plexapi.sdk.models.operations.GetCompanionsDataResponse; -import dev.plexapi.sdk.models.operations.GetGeoDataGeoData; -import dev.plexapi.sdk.models.operations.GetGeoDataResponse; -import dev.plexapi.sdk.models.operations.GetHomeDataResponse; -import dev.plexapi.sdk.models.operations.GetHomeDataResponseBody; -import dev.plexapi.sdk.models.operations.GetPinAuthPinContainer; -import dev.plexapi.sdk.models.operations.GetPinRequest; -import dev.plexapi.sdk.models.operations.GetPinResponse; -import dev.plexapi.sdk.models.operations.GetServerResourcesResponse; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdAuthPinContainer; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdGeoData; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdRequest; -import dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse; -import dev.plexapi.sdk.models.operations.GetUserFriendsResponse; -import dev.plexapi.sdk.models.operations.IncludeHttps; -import dev.plexapi.sdk.models.operations.IncludeIPv6; -import dev.plexapi.sdk.models.operations.IncludeRelay; -import dev.plexapi.sdk.models.operations.PlexDevice; -import dev.plexapi.sdk.models.operations.Protocol; -import dev.plexapi.sdk.models.operations.ResponseBody; -import dev.plexapi.sdk.models.operations.SharedServers; -import dev.plexapi.sdk.models.operations.SharedSources; -import dev.plexapi.sdk.models.operations.Status; -import java.lang.Exception; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Optional; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PlexTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetCompanionsData() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetCompanionsDataResponse res = sdk.plex().getCompanionsData() - .call(); - - assertEquals( - List.of( - ResponseBody.builder() - .identifier("tv.plex.sonos") - .baseURL("https://sonos.plex.tv") - .title("Sonos") - .linkURL("https://sonos.plex.tv/link") - .provides("client,player") - .token("") - .build()), - res.responseBodies().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetUserFriends() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetUserFriendsResponse res = sdk.plex().getUserFriends() - .call(); - - assertEquals( - List.of( - Friend.builder() - .email("username@email.com") - .friendlyName(Optional.empty()) - .home(false) - .id(437587) - .sharedServers(List.of( - SharedServers.builder() - .build())) - .sharedSources(List.of( - SharedSources.builder() - .build())) - .status(Status.ACCEPTED) - .thumb("https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578") - .title("username123") - .username("username123") - .uuid("7d1916e0d8f6e76b") - .restricted(false) - .build()), - res.friends().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetGeoData() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetGeoDataResponse res = sdk.plex().getGeoData() - .call(); - - assertEquals( - GetGeoDataGeoData.builder() - .code("VI") - .continentCode("NA") - .country("United States Virgin Islands") - .city("Amsterdam") - .timeZone("America/St_Thomas") - .postalCode("802") - .subdivisions("Saint Thomas") - .coordinates("18.3381, -64.8941") - .europeanUnionMember(true) - .inPrivacyRestrictedCountry(true) - .inPrivacyRestrictedRegion(true) - .build(), - res.geoData().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetHomeData() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetHomeDataResponse res = sdk.plex().getHomeData() - .call(); - - assertEquals( - GetHomeDataResponseBody.builder() - .id(1841489d) - .name("Blindkitty38's home") - .guestUserID(58815432d) - .guestUserUUID("f3df4e01bfca0787") - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetServerResources() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetServerResourcesResponse res = sdk.plex().getServerResources() - .includeHttps(IncludeHttps.Enable) - .includeRelay(IncludeRelay.Enable) - .includeIPv6(IncludeIPv6.Enable) - .clientID("gcgzw5rz2xovp84b4vha3a40") - .call(); - - assertEquals( - List.of( - PlexDevice.builder() - .name("") - .product("Small Wooden Fish") - .productVersion("") - .platform("") - .platformVersion("") - .device("Mobile") - .clientIdentifier("") - .createdAt(OffsetDateTime.parse("2019-06-24T11:38:02Z")) - .lastSeenAt(OffsetDateTime.parse("2019-06-24T11:38:02Z")) - .provides("") - .ownerId(528895L) - .sourceTitle("") - .publicAddress("") - .accessToken("") - .owned(false) - .home(false) - .synced(false) - .relay(false) - .presence(false) - .httpsRequired(false) - .publicAddressMatches(false) - .dnsRebindingProtection(false) - .natLoopbackSupported(false) - .connections(List.of( - Connections.builder() - .protocol(Protocol.HTTP) - .address("9000 Station Road") - .port(57017) - .uri("https://steep-independence.net") - .local(false) - .relay(false) - .iPv6(false) - .build())) - .build()), - res.plexDevices().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetPin_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetPinRequest req = GetPinRequest.builder() - .build(); - - GetPinResponse res = sdk.plex().getPin() - .request(req) - .call(); - - assertEquals( - GetPinAuthPinContainer.builder() - .id(308667304L) - .code("7RQZ") - .product("Tautulli") - .qr("https://plex.tv/api/v2/pins/qr/7RQZ") - .clientIdentifier("Tautulli") - .location(GeoData.builder() - .code("VI") - .continentCode("NA") - .country("United States Virgin Islands") - .city("Amsterdam") - .timeZone("America/St_Thomas") - .postalCode("802") - .subdivisions("Saint Thomas") - .coordinates("18.3381, -64.8941") - .europeanUnionMember(true) - .inPrivacyRestrictedCountry(true) - .inPrivacyRestrictedRegion(true) - .build()) - .createdAt(OffsetDateTime.parse("2024-07-16T17:03:05Z")) - .expiresAt(OffsetDateTime.parse("2024-07-16T17:18:05Z")) - .trusted(false) - .expiresIn(876L) - .authToken(JsonNullable.of(null)) - .newRegistration(JsonNullable.of(null)) - .build(), - res.authPinContainer().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testPlex_GetTokenByPinId_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetTokenByPinIdRequest req = GetTokenByPinIdRequest.builder() - .pinID(118274L) - .build(); - - GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() - .request(req) - .call(); - - assertEquals( - GetTokenByPinIdAuthPinContainer.builder() - .id(308667304L) - .code("7RQZ") - .product("Tautulli") - .qr("https://plex.tv/api/v2/pins/qr/7RQZ") - .clientIdentifier("Tautulli") - .location(GetTokenByPinIdGeoData.builder() - .code("VI") - .continentCode("NA") - .country("United States Virgin Islands") - .city("Amsterdam") - .timeZone("America/St_Thomas") - .postalCode("802") - .subdivisions("Saint Thomas") - .coordinates("18.3381, -64.8941") - .europeanUnionMember(true) - .inPrivacyRestrictedCountry(true) - .inPrivacyRestrictedRegion(true) - .build()) - .createdAt(OffsetDateTime.parse("2024-07-16T17:03:05Z")) - .expiresAt(OffsetDateTime.parse("2024-07-16T17:18:05Z")) - .trusted(false) - .expiresIn(876L) - .authToken(JsonNullable.of(null)) - .newRegistration(JsonNullable.of(null)) - .build(), - res.authPinContainer().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/SearchTests.java b/src/test/java/dev/plexapi/sdk/SearchTests.java deleted file mode 100644 index 77dda751..00000000 --- a/src/test/java/dev/plexapi/sdk/SearchTests.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.GetSearchResultsCountry; -import dev.plexapi.sdk.models.operations.GetSearchResultsDirector; -import dev.plexapi.sdk.models.operations.GetSearchResultsGenre; -import dev.plexapi.sdk.models.operations.GetSearchResultsMedia; -import dev.plexapi.sdk.models.operations.GetSearchResultsMediaContainer; -import dev.plexapi.sdk.models.operations.GetSearchResultsMetadata; -import dev.plexapi.sdk.models.operations.GetSearchResultsPart; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponse; -import dev.plexapi.sdk.models.operations.GetSearchResultsResponseBody; -import dev.plexapi.sdk.models.operations.GetSearchResultsRole; -import dev.plexapi.sdk.models.operations.GetSearchResultsWriter; -import dev.plexapi.sdk.models.operations.PerformSearchResponse; -import dev.plexapi.sdk.models.operations.PerformVoiceSearchResponse; -import dev.plexapi.sdk.models.operations.Provider; -import java.lang.Exception; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class SearchTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSearch_PerformSearch() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - PerformSearchResponse res = sdk.search().performSearch() - .query("dylan") - .sectionId(4561.50d) - .limit(5d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSearch_PerformVoiceSearch() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() - .query("dead+poop") - .sectionId(5684.34d) - .limit(5d) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSearch_GetSearchResults() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSearchResultsResponse res = sdk.search().getSearchResults() - .query("110") - .call(); - - assertEquals( - GetSearchResultsResponseBody.builder() - .mediaContainer(GetSearchResultsMediaContainer.builder() - .size(26d) - .identifier("com.plexapp.plugins.library") - .mediaTagPrefix("/system/bundle/media/flags/") - .mediaTagVersion(1680021154d) - .metadata(List.of( - GetSearchResultsMetadata.builder() - .librarySectionID(1d) - .librarySectionTitle("Movies") - .librarySectionUUID("322a231a-b7f7-49f5-920f-14c61199cd30") - .sourceTitle("Hera") - .ratingKey(10398d) - .key("/library/metadata/10398") - .guid("plex://movie/5d7768284de0ee001fcc8f52") - .studio("Paramount") - .type("movie") - .title("Mission: Impossible") - .contentRating("PG-13") - .summary("When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.") - .rating(6.6d) - .audienceRating(7.1d) - .year(1996d) - .tagline("Expect the impossible.") - .thumb("/library/metadata/10398/thumb/1679505055") - .art("/library/metadata/10398/art/1679505055") - .duration(6612628d) - .originallyAvailableAt(OffsetDateTime.parse("1996-05-22T00:00:00Z")) - .addedAt(1589234571d) - .updatedAt(1679505055d) - .audienceRatingImage("rottentomatoes://image.rating.upright") - .chapterSource("media") - .primaryExtraKey("/library/metadata/10501") - .ratingImage("rottentomatoes://image.rating.ripe") - .media(List.of( - GetSearchResultsMedia.builder() - .id(26610d) - .duration(6612628d) - .bitrate(4751d) - .width(1916d) - .height(796d) - .aspectRatio(2.35d) - .audioChannels(6d) - .audioCodec("aac") - .videoCodec("hevc") - .videoResolution(1080d) - .container("mkv") - .videoFrameRate("24p") - .audioProfile("lc") - .videoProfile("main 10") - .part(List.of( - GetSearchResultsPart.builder() - .id(26610d) - .key("/library/parts/26610/1589234571/file.mkv") - .duration(6612628d) - .file("/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv") - .size(3926903851d) - .audioProfile("lc") - .container("mkv") - .videoProfile("main 10") - .build())) - .build())) - .genre(List.of( - GetSearchResultsGenre.builder() - .tag("Action") - .build())) - .director(List.of( - GetSearchResultsDirector.builder() - .tag("Brian De Palma") - .build())) - .writer(List.of( - GetSearchResultsWriter.builder() - .tag("David Koepp") - .build())) - .country(List.of( - GetSearchResultsCountry.builder() - .tag("United States of America") - .build())) - .role(List.of( - GetSearchResultsRole.builder() - .tag("Tom Cruise") - .build())) - .build())) - .provider(List.of( - Provider.builder() - .key("/system/search") - .title("Local Network") - .type("mixed") - .build())) - .build()) - .build(), - res.object().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/ServerTests.java b/src/test/java/dev/plexapi/sdk/ServerTests.java deleted file mode 100644 index c7552cd4..00000000 --- a/src/test/java/dev/plexapi/sdk/ServerTests.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.Action; -import dev.plexapi.sdk.models.operations.Device; -import dev.plexapi.sdk.models.operations.Feature; -import dev.plexapi.sdk.models.operations.GetAvailableClientsMediaContainer; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponse; -import dev.plexapi.sdk.models.operations.GetAvailableClientsResponseBody; -import dev.plexapi.sdk.models.operations.GetDevicesMediaContainer; -import dev.plexapi.sdk.models.operations.GetDevicesResponse; -import dev.plexapi.sdk.models.operations.GetDevicesResponseBody; -import dev.plexapi.sdk.models.operations.GetMediaProvidersMediaContainer; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponse; -import dev.plexapi.sdk.models.operations.GetMediaProvidersResponseBody; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponse; -import dev.plexapi.sdk.models.operations.GetMyPlexAccountResponseBody; -import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest; -import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse; -import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse; -import dev.plexapi.sdk.models.operations.GetServerIdentityMediaContainer; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponse; -import dev.plexapi.sdk.models.operations.GetServerIdentityResponseBody; -import dev.plexapi.sdk.models.operations.GetServerListMediaContainer; -import dev.plexapi.sdk.models.operations.GetServerListResponse; -import dev.plexapi.sdk.models.operations.GetServerListResponseBody; -import dev.plexapi.sdk.models.operations.GetServerListServer; -import dev.plexapi.sdk.models.operations.GetServerPreferencesMediaContainer; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponse; -import dev.plexapi.sdk.models.operations.GetServerPreferencesResponseBody; -import dev.plexapi.sdk.models.operations.MediaProvider; -import dev.plexapi.sdk.models.operations.MinSize; -import dev.plexapi.sdk.models.operations.MyPlex; -import dev.plexapi.sdk.models.operations.Server; -import dev.plexapi.sdk.models.operations.Setting; -import dev.plexapi.sdk.models.operations.Upscale; -import java.lang.Exception; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class ServerTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetServerCapabilities() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetServerPreferences() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetServerPreferencesResponse res = sdk.server().getServerPreferences() - .call(); - - assertEquals( - GetServerPreferencesResponseBody.builder() - .mediaContainer(GetServerPreferencesMediaContainer.builder() - .size(161) - .setting(List.of( - Setting.builder() - .id("EnableDatabaseTrace") - .label("") - .summary("") - .type("bool") - .default_(false) - .value(false) - .hidden(true) - .advanced(false) - .group("") - .enumValues("1:admin only|2:everyone") - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetAvailableClients() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetAvailableClientsResponse res = sdk.server().getAvailableClients() - .call(); - - assertEquals( - GetAvailableClientsResponseBody.builder() - .mediaContainer(GetAvailableClientsMediaContainer.builder() - .size(1d) - .server(List.of( - Server.builder() - .name("iPad") - .host("10.10.10.102") - .address("10.10.10.102") - .port(32500d) - .machineIdentifier("A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05") - .version("8.17") - .protocol("plex") - .product("Plex for iOS") - .deviceClass("tablet") - .protocolVersion(2d) - .protocolCapabilities("playback,playqueues,timeline,provider-playback") - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetDevices() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetDevicesResponse res = sdk.server().getDevices() - .call(); - - assertEquals( - GetDevicesResponseBody.builder() - .mediaContainer(GetDevicesMediaContainer.builder() - .size(151d) - .identifier("com.plexapp.system.devices") - .device(List.of( - Device.builder() - .id(1d) - .name("iPhone") - .platform("iOS") - .createdAt(1654131230d) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetServerIdentity() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetServerIdentityResponse res = sdk.server().getServerIdentity() - .call(); - - assertEquals( - GetServerIdentityResponseBody.builder() - .mediaContainer(GetServerIdentityMediaContainer.builder() - .size(0d) - .machineIdentifier("96f2fe7a78c9dc1f16a16bedbe90f98149be16b4") - .version("1.31.3.6868-28fc46b27") - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetMyPlexAccount() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() - .call(); - - assertEquals( - GetMyPlexAccountResponseBody.builder() - .myPlex(MyPlex.builder() - .authToken("Z5v-PrNASDFpsaCi3CPK7") - .username("example.email@mail.com") - .mappingState("mapped") - .signInState("ok") - .publicAddress("140.20.68.140") - .publicPort(32400d) - .privateAddress("10.10.10.47") - .privatePort(32400d) - .subscriptionFeatures("federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks") - .subscriptionState("Active") - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetResizedPhoto() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() - .width(110d) - .height(165d) - .opacity(100L) - .blur(20d) - .minSize(MinSize.ONE) - .upscale(Upscale.ONE) - .url("/library/metadata/49564/thumb/1654258204") - .build(); - - GetResizedPhotoResponse res = sdk.server().getResizedPhoto() - .request(req) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetMediaProviders() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetMediaProvidersResponse res = sdk.server().getMediaProviders() - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .call(); - - assertEquals( - GetMediaProvidersResponseBody.builder() - .mediaContainer(GetMediaProvidersMediaContainer.builder() - .mediaProvider(List.of( - MediaProvider.builder() - .feature(List.of( - Feature.builder() - .type("") - .flavor("global") - .scrobbleKey("/:/scrobble/new") - .unscrobbleKey("/:/unscrobble/new") - .action(List.of( - Action.builder() - .id("addToContinueWatching") - .key("/actions/addToContinueWatching") - .build())) - .build(), - Feature.builder() - .type("") - .flavor("global") - .scrobbleKey("/:/scrobble/new") - .unscrobbleKey("/:/unscrobble/new") - .action(List.of( - Action.builder() - .id("addToContinueWatching") - .key("/actions/addToContinueWatching") - .build(), - Action.builder() - .id("addToContinueWatching") - .key("/actions/addToContinueWatching") - .build())) - .build(), - Feature.builder() - .type("") - .flavor("global") - .scrobbleKey("/:/scrobble/new") - .unscrobbleKey("/:/unscrobble/new") - .action(List.of( - Action.builder() - .id("addToContinueWatching") - .key("/actions/addToContinueWatching") - .build(), - Action.builder() - .id("addToContinueWatching") - .key("/actions/addToContinueWatching") - .build())) - .build())) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testServer_GetServerList() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetServerListResponse res = sdk.server().getServerList() - .call(); - - assertEquals( - GetServerListResponseBody.builder() - .mediaContainer(GetServerListMediaContainer.builder() - .size(1d) - .server(List.of( - GetServerListServer.builder() - .name("Hera") - .host("10.10.10.47") - .address("10.10.10.47") - .port(32400d) - .machineIdentifier("96f2fe7a78c9dc1f16a16bedbe90f98149be16b4") - .version("1.31.3.6868-28fc46b27") - .build())) - .build()) - .build(), - res.object().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/SessionsTests.java b/src/test/java/dev/plexapi/sdk/SessionsTests.java deleted file mode 100644 index 5fab149b..00000000 --- a/src/test/java/dev/plexapi/sdk/SessionsTests.java +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.GetSessionHistoryMediaContainer; -import dev.plexapi.sdk.models.operations.GetSessionHistoryMetadata; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponse; -import dev.plexapi.sdk.models.operations.GetSessionHistoryResponseBody; -import dev.plexapi.sdk.models.operations.GetSessionsMedia; -import dev.plexapi.sdk.models.operations.GetSessionsMediaContainer; -import dev.plexapi.sdk.models.operations.GetSessionsMetadata; -import dev.plexapi.sdk.models.operations.GetSessionsPart; -import dev.plexapi.sdk.models.operations.GetSessionsResponse; -import dev.plexapi.sdk.models.operations.GetSessionsResponseBody; -import dev.plexapi.sdk.models.operations.GetSessionsStream; -import dev.plexapi.sdk.models.operations.GetSessionsUser; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsMediaContainer; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponse; -import dev.plexapi.sdk.models.operations.GetTranscodeSessionsResponseBody; -import dev.plexapi.sdk.models.operations.Player; -import dev.plexapi.sdk.models.operations.QueryParamFilter; -import dev.plexapi.sdk.models.operations.Session; -import dev.plexapi.sdk.models.operations.StopTranscodeSessionResponse; -import dev.plexapi.sdk.models.operations.TranscodeSession; -import java.lang.Exception; -import java.time.LocalDate; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class SessionsTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessions() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionsResponse res = sdk.sessions().getSessions() - .call(); - - assertEquals( - GetSessionsResponseBody.builder() - .mediaContainer(GetSessionsMediaContainer.builder() - .size(1) - .metadata(List.of( - GetSessionsMetadata.builder() - .addedAt(1705543312) - .art("/library/metadata/39904/art/1705310687") - .duration(186240) - .grandparentArt("/library/metadata/39904/art/1705310687") - .grandparentGuid("plex://artist/5d07bbfd403c6402904a6480") - .grandparentKey("/library/metadata/39904") - .grandparentRatingKey("39904") - .grandparentThumb("/library/metadata/39904/thumb/1705310687") - .grandparentTitle("Green Day") - .guid("plex://track/6535834f71f22f36f71a8e8f") - .index(1) - .key("/library/metadata/67085") - .librarySectionID("3") - .librarySectionKey("/library/sections/3") - .librarySectionTitle("Music") - .musicAnalysisVersion("1") - .parentGuid("plex://album/65394d6d472b8ab03ef47f12") - .parentIndex(1) - .parentKey("/library/metadata/67084") - .parentRatingKey("67084") - .parentStudio("Reprise Records") - .parentThumb("/library/metadata/67084/thumb/1705543314") - .parentTitle("Saviors") - .parentYear(2024) - .ratingCount(45885) - .ratingKey("67085") - .sessionKey("203") - .thumb("/library/metadata/67084/thumb/1705543314") - .title("The American Dream Is Killing Me") - .titleSort("American Dream Is Killing Me") - .type("track") - .updatedAt(1705543314) - .viewOffset(1000) - .media(List.of( - GetSessionsMedia.builder() - .audioChannels(2) - .audioCodec("flac") - .bitrate(1014) - .container("flac") - .duration(186240) - .id("130355") - .selected(true) - .part(List.of( - GetSessionsPart.builder() - .container("flac") - .duration(186240) - .file("/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac") - .hasThumbnail("1") - .id("130625") - .key("/library/parts/130625/1705543268/file.flac") - .size(23644000) - .decision("directplay") - .selected(true) - .stream(List.of( - GetSessionsStream.builder() - .albumGain("-12.94") - .albumPeak("1.000000") - .albumRange("4.751014") - .audioChannelLayout("stereo") - .bitDepth(16) - .bitrate(1014) - .channels(2) - .codec("flac") - .displayTitle("FLAC (Stereo)") - .extendedDisplayTitle("FLAC (Stereo)") - .gain("-12.94") - .id("352487") - .index(0) - .loudness("-5.94") - .lra("1.74") - .peak("1.000000") - .samplingRate(44100) - .selected(true) - .streamType(2) - .location("direct") - .build())) - .build())) - .build())) - .user(GetSessionsUser.builder() - .id("1") - .thumb("https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661") - .title("Blindkitty38") - .build()) - .player(Player.builder() - .address("10.10.10.171") - .machineIdentifier("3tsdzir85m2onc3qyr255aq1") - .model("standalone") - .platform("windows") - .platformVersion("10.0.22621") - .product("Plex for Windows") - .profile("Plex Desktop") - .remotePublicAddress("68.248.140.20") - .state("playing") - .title("DESKTOP-BL80MTD") - .version("1.85.0.4071-21128b56") - .local(true) - .relayed(false) - .secure(true) - .userID(1) - .build()) - .session(Session.builder() - .id("93h7e00ncblxncqw9lkfaoxi") - .bandwidth(1050) - .location("lan") - .build()) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessionHistory_ViewedAtDescending() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - assertEquals( - GetSessionHistoryResponseBody.builder() - .mediaContainer(GetSessionHistoryMediaContainer.builder() - .size(10855) - .metadata(List.of( - GetSessionHistoryMetadata.builder() - .historyKey("/status/sessions/history/1") - .key("/library/metadata/32171") - .ratingKey("32171") - .librarySectionID("2") - .parentKey("/library/metadata/32170") - .grandparentKey("/library/metadata/32132") - .title("The Noise That Blue Makes") - .grandparentTitle("Taskmaster") - .type("episode") - .thumb("/library/metadata/32171/thumb/-1") - .parentThumb("/library/metadata/32170/thumb/1654134301") - .grandparentThumb("/library/metadata/32132/thumb/1703933346") - .grandparentArt("/library/metadata/32132/art/1703933346") - .index(1) - .parentIndex(13) - .originallyAvailableAt(LocalDate.parse("2022-04-14T00:00:00Z")) - .viewedAt(1654139223) - .accountID(1) - .deviceID(5) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessionHistory_ViewedAtAscending() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - assertEquals( - GetSessionHistoryResponseBody.builder() - .mediaContainer(GetSessionHistoryMediaContainer.builder() - .size(10855) - .metadata(List.of( - GetSessionHistoryMetadata.builder() - .historyKey("/status/sessions/history/1") - .key("/library/metadata/32171") - .ratingKey("32171") - .librarySectionID("2") - .parentKey("/library/metadata/32170") - .grandparentKey("/library/metadata/32132") - .title("The Noise That Blue Makes") - .grandparentTitle("Taskmaster") - .type("episode") - .thumb("/library/metadata/32171/thumb/-1") - .parentThumb("/library/metadata/32170/thumb/1654134301") - .grandparentThumb("/library/metadata/32132/thumb/1703933346") - .grandparentArt("/library/metadata/32132/art/1703933346") - .index(1) - .parentIndex(13) - .originallyAvailableAt(LocalDate.parse("2022-04-14T00:00:00Z")) - .viewedAt(1654139223) - .accountID(1) - .deviceID(5) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessionHistory_RatingDescending() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - assertEquals( - GetSessionHistoryResponseBody.builder() - .mediaContainer(GetSessionHistoryMediaContainer.builder() - .size(10855) - .metadata(List.of( - GetSessionHistoryMetadata.builder() - .historyKey("/status/sessions/history/1") - .key("/library/metadata/32171") - .ratingKey("32171") - .librarySectionID("2") - .parentKey("/library/metadata/32170") - .grandparentKey("/library/metadata/32132") - .title("The Noise That Blue Makes") - .grandparentTitle("Taskmaster") - .type("episode") - .thumb("/library/metadata/32171/thumb/-1") - .parentThumb("/library/metadata/32170/thumb/1654134301") - .grandparentThumb("/library/metadata/32132/thumb/1703933346") - .grandparentArt("/library/metadata/32132/art/1703933346") - .index(1) - .parentIndex(13) - .originallyAvailableAt(LocalDate.parse("2022-04-14T00:00:00Z")) - .viewedAt(1654139223) - .accountID(1) - .deviceID(5) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessionHistory_RatingAscending() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - assertEquals( - GetSessionHistoryResponseBody.builder() - .mediaContainer(GetSessionHistoryMediaContainer.builder() - .size(10855) - .metadata(List.of( - GetSessionHistoryMetadata.builder() - .historyKey("/status/sessions/history/1") - .key("/library/metadata/32171") - .ratingKey("32171") - .librarySectionID("2") - .parentKey("/library/metadata/32170") - .grandparentKey("/library/metadata/32132") - .title("The Noise That Blue Makes") - .grandparentTitle("Taskmaster") - .type("episode") - .thumb("/library/metadata/32171/thumb/-1") - .parentThumb("/library/metadata/32170/thumb/1654134301") - .grandparentThumb("/library/metadata/32132/thumb/1703933346") - .grandparentArt("/library/metadata/32132/art/1703933346") - .index(1) - .parentIndex(13) - .originallyAvailableAt(LocalDate.parse("2022-04-14T00:00:00Z")) - .viewedAt(1654139223) - .accountID(1) - .deviceID(5) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessionHistory_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - assertEquals( - GetSessionHistoryResponseBody.builder() - .mediaContainer(GetSessionHistoryMediaContainer.builder() - .size(10855) - .metadata(List.of( - GetSessionHistoryMetadata.builder() - .historyKey("/status/sessions/history/1") - .key("/library/metadata/32171") - .ratingKey("32171") - .librarySectionID("2") - .parentKey("/library/metadata/32170") - .grandparentKey("/library/metadata/32132") - .title("The Noise That Blue Makes") - .grandparentTitle("Taskmaster") - .type("episode") - .thumb("/library/metadata/32171/thumb/-1") - .parentThumb("/library/metadata/32170/thumb/1654134301") - .grandparentThumb("/library/metadata/32132/thumb/1703933346") - .grandparentArt("/library/metadata/32132/art/1703933346") - .index(1) - .parentIndex(13) - .originallyAvailableAt(LocalDate.parse("2022-04-14T00:00:00Z")) - .viewedAt(1654139223) - .accountID(1) - .deviceID(5) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetSessionHistory_ViewedAt() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() - .sort("") - .accountId(1L) - .filter(QueryParamFilter.builder() - .build()) - .librarySectionID(12L) - .call(); - - assertEquals( - GetSessionHistoryResponseBody.builder() - .mediaContainer(GetSessionHistoryMediaContainer.builder() - .size(10855) - .metadata(List.of( - GetSessionHistoryMetadata.builder() - .historyKey("/status/sessions/history/1") - .key("/library/metadata/32171") - .ratingKey("32171") - .librarySectionID("2") - .parentKey("/library/metadata/32170") - .grandparentKey("/library/metadata/32132") - .title("The Noise That Blue Makes") - .grandparentTitle("Taskmaster") - .type("episode") - .thumb("/library/metadata/32171/thumb/-1") - .parentThumb("/library/metadata/32170/thumb/1654134301") - .grandparentThumb("/library/metadata/32132/thumb/1703933346") - .grandparentArt("/library/metadata/32132/art/1703933346") - .index(1) - .parentIndex(13) - .originallyAvailableAt(LocalDate.parse("2022-04-14T00:00:00Z")) - .viewedAt(1654139223) - .accountID(1) - .deviceID(5) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_GetTranscodeSessions() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() - .call(); - - assertEquals( - GetTranscodeSessionsResponseBody.builder() - .mediaContainer(GetTranscodeSessionsMediaContainer.builder() - .size(1) - .transcodeSession(List.of( - TranscodeSession.builder() - .key("vv3i2q2lax92qlzul1hbd4bx") - .throttled(false) - .complete(false) - .progress(1.7999999523162842d) - .size(-22) - .speed(25.100000381469727d) - .error(false) - .duration(1445695) - .remaining(53) - .context("streaming") - .sourceVideoCodec("h264") - .sourceAudioCodec("aac") - .videoDecision("transcode") - .audioDecision("transcode") - .subtitleDecision("burn") - .protocol("http") - .container("mkv") - .videoCodec("h264") - .audioCodec("opus") - .audioChannels(1) - .transcodeHwRequested(true) - .timeStamp(1705895805.4919229d) - .maxOffsetAvailable(29.53d) - .minOffsetAvailable(3.003000020980835d) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testSessions_StopTranscodeSession() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() - .sessionKey("zz7llzqlx8w9vnrsbnwhbmep") - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/StatisticsTests.java b/src/test/java/dev/plexapi/sdk/StatisticsTests.java deleted file mode 100644 index cbdc6fab..00000000 --- a/src/test/java/dev/plexapi/sdk/StatisticsTests.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.Account; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsAccount; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsDevice; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsMediaContainer; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetBandwidthStatisticsResponseBody; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsMediaContainer; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetResourcesStatisticsResponseBody; -import dev.plexapi.sdk.models.operations.GetStatisticsDevice; -import dev.plexapi.sdk.models.operations.GetStatisticsMediaContainer; -import dev.plexapi.sdk.models.operations.GetStatisticsResponse; -import dev.plexapi.sdk.models.operations.GetStatisticsResponseBody; -import dev.plexapi.sdk.models.operations.StatisticsBandwidth; -import dev.plexapi.sdk.models.operations.StatisticsMedia; -import dev.plexapi.sdk.models.operations.StatisticsResources; -import java.lang.Exception; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class StatisticsTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testStatistics_GetStatistics_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetStatisticsResponse res = sdk.statistics().getStatistics() - .timespan(4L) - .call(); - - assertEquals( - GetStatisticsResponseBody.builder() - .mediaContainer(GetStatisticsMediaContainer.builder() - .size(5497) - .device(List.of( - GetStatisticsDevice.builder() - .id(208) - .name("Roku Express") - .platform("Roku") - .clientIdentifier("793095d235660625108ef785cc7646e9") - .createdAt(1706470556) - .build())) - .account(List.of( - Account.builder() - .id(238960586) - .key("/accounts/238960586") - .name("Diane") - .defaultAudioLanguage("en") - .autoSelectAudio(true) - .defaultSubtitleLanguage("en") - .subtitleMode(1) - .thumb("https://plex.tv/users/50d83634246da1de/avatar?c=1707110967") - .build())) - .statisticsMedia(List.of( - StatisticsMedia.builder() - .accountID(1) - .deviceID(13) - .timespan(4) - .at(1707141600) - .metadataType(4) - .count(1) - .duration(1555) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testStatistics_GetResourcesStatistics_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() - .timespan(4L) - .call(); - - assertEquals( - GetResourcesStatisticsResponseBody.builder() - .mediaContainer(GetResourcesStatisticsMediaContainer.builder() - .size(5497) - .statisticsResources(List.of( - StatisticsResources.builder() - .timespan(6L) - .at(1718384427L) - .hostCpuUtilization(1.276f) - .processCpuUtilization(0.025f) - .hostMemoryUtilization(17.026f) - .processMemoryUtilization(0.493f) - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testStatistics_GetBandwidthStatistics_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() - .timespan(4L) - .call(); - - assertEquals( - GetBandwidthStatisticsResponseBody.builder() - .mediaContainer(GetBandwidthStatisticsMediaContainer.builder() - .size(5497) - .device(List.of( - GetBandwidthStatisticsDevice.builder() - .id(208) - .name("Roku Express") - .platform("Roku") - .clientIdentifier("793095d235660625108ef785cc7646e9") - .createdAt(1706470556) - .build())) - .account(List.of( - GetBandwidthStatisticsAccount.builder() - .id(238960586) - .key("/accounts/238960586") - .name("Diane") - .defaultAudioLanguage("en") - .autoSelectAudio(true) - .defaultSubtitleLanguage("en") - .subtitleMode(1) - .thumb("https://plex.tv/users/50d83634246da1de/avatar?c=1707110967") - .build())) - .statisticsBandwidth(List.of( - StatisticsBandwidth.builder() - .accountID(238960586) - .deviceID(208) - .timespan(6L) - .at(1718387650) - .lan(true) - .bytes(22L) - .build())) - .build()) - .build(), - res.object().get()); - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/UpdaterTests.java b/src/test/java/dev/plexapi/sdk/UpdaterTests.java deleted file mode 100644 index 3426cf38..00000000 --- a/src/test/java/dev/plexapi/sdk/UpdaterTests.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse; -import dev.plexapi.sdk.models.operations.CheckForUpdatesResponse; -import dev.plexapi.sdk.models.operations.Download; -import dev.plexapi.sdk.models.operations.GetUpdateStatusMediaContainer; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponse; -import dev.plexapi.sdk.models.operations.GetUpdateStatusResponseBody; -import dev.plexapi.sdk.models.operations.Release; -import dev.plexapi.sdk.models.operations.Skip; -import dev.plexapi.sdk.models.operations.Tonight; -import java.lang.Exception; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class UpdaterTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testUpdater_GetUpdateStatus() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() - .call(); - - assertEquals( - GetUpdateStatusResponseBody.builder() - .mediaContainer(GetUpdateStatusMediaContainer.builder() - .size(1) - .canInstall(false) - .checkedAt(1705801232) - .downloadURL("https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx") - .status(0) - .release(List.of( - Release.builder() - .key("https://plex.tv/updater/releases/5136") - .version("1.40.0.7775-456fbaf97") - .added("(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793) - (Music) Store track genres and add filtering options (#14653) - (Music) Support ID3v2.4 null-separated tags for genres and release type (#14653) - (View History) No longer create a view history entry for items marked as played (#10888) - (Web) Updated to 4.118.0") - .fixed("(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654) - (Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667) - (Collection) Server could become unresponsive when collection membership changes (#14612) - (DVR) Previously watched recordings could be deleted without being watched again (#13779) - (Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501) - (Library) The Content Rating not equal to None filter does not work (#14620) - (Search) Album search results could contain all the album's tracks too (#14486) - (Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674) - (Transcoder) HW encoding would fail on devices with no rate control (#14222) - (Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)") - .downloadURL("https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx") - .state("notify") - .build())) - .build()) - .build(), - res.object().get()); - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testUpdater_CheckForUpdates_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - CheckForUpdatesResponse res = sdk.updater().checkForUpdates() - .download(Download.ONE) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testUpdater_ApplyUpdates_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - ApplyUpdatesResponse res = sdk.updater().applyUpdates() - .tonight(Tonight.ONE) - .skip(Skip.ONE) - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/VideoTests.java b/src/test/java/dev/plexapi/sdk/VideoTests.java deleted file mode 100644 index c76bba50..00000000 --- a/src/test/java/dev/plexapi/sdk/VideoTests.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import dev.plexapi.sdk.models.operations.GetTimelineRequest; -import dev.plexapi.sdk.models.operations.GetTimelineResponse; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeRequest; -import dev.plexapi.sdk.models.operations.StartUniversalTranscodeResponse; -import dev.plexapi.sdk.models.operations.State; -import java.lang.Exception; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class VideoTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testVideo_GetTimeline_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetTimelineRequest req = GetTimelineRequest.builder() - .ratingKey(23409d) - .key("/library/metadata/23409") - .state(State.PLAYING) - .hasMDE(1d) - .time(2000d) - .duration(10000d) - .context("home:hub.continueWatching") - .playQueueItemID(1d) - .playBackTime(2000d) - .row(1d) - .build(); - - GetTimelineResponse res = sdk.video().getTimeline() - .request(req) - .call(); - - - } - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testVideo_StartUniversalTranscode_() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() - .hasMDE(1d) - .path("/library/metadata/23409") - .mediaIndex(0d) - .partIndex(0d) - .protocol("hls") - .fastSeek(0d) - .directPlay(0d) - .directStream(0d) - .subtitleSize(100d) - .subtites("burn") - .audioBoost(100d) - .location("lan") - .mediaBufferSize(102400d) - .session("zvcage8b7rkioqcm8f4uns4c") - .addDebugOverlay(0d) - .autoAdjustQuality(0d) - .build(); - - StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode() - .request(req) - .call(); - - - } - -} \ No newline at end of file diff --git a/src/test/java/dev/plexapi/sdk/WatchlistTests.java b/src/test/java/dev/plexapi/sdk/WatchlistTests.java deleted file mode 100644 index 5ee7b024..00000000 --- a/src/test/java/dev/plexapi/sdk/WatchlistTests.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package dev.plexapi.sdk; - -import dev.plexapi.sdk.models.operations.Filter; -import dev.plexapi.sdk.models.operations.GetWatchListRequest; -import dev.plexapi.sdk.models.operations.GetWatchListResponse; -import java.lang.Exception; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class WatchlistTests { - - @Disabled // test marked as skipped for java or generated unit tests not production ready yet - @Test - public void testWatchlist_GetWatchList() throws Exception { - - - PlexAPI sdk = PlexAPI.builder() - .accessToken("") - .clientID("gcgzw5rz2xovp84b4vha3a40") - .clientName("Plex Web") - .clientVersion("4.133.0") - .clientPlatform("Chrome") - .deviceName("Linux") - .build(); - - GetWatchListRequest req = GetWatchListRequest.builder() - .filter(Filter.RELEASED) - .xPlexToken("CV5xoxjTpFKUzBTShsaf") - .xPlexContainerStart(0) - .xPlexContainerSize(50) - .build(); - - GetWatchListResponse res = sdk.watchlist().getWatchList() - .request(req) - .call(); - - - } - -} \ No newline at end of file