diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 3310e58f..db373ce2 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 1732900d-e173-47c1-a90d-d45182eb35d9 management: - docChecksum: a6fee1797b2da7ccbaf7743772a40b56 + docChecksum: 5bf578a672589649d8ed83c3927c50a6 docVersion: 0.0.3 - speakeasyVersion: 1.397.3 - generationVersion: 2.415.8 - releaseVersion: 0.3.5 - configChecksum: 4c3849409a619a08ad17d85569b6ab77 + speakeasyVersion: 1.399.2 + generationVersion: 2.416.6 + releaseVersion: 0.3.6 + configChecksum: 106e80c4c09cf1eee551ea41f14701cc repoURL: https://github.com/LukeHagar/plexjava.git published: true features: @@ -1843,7 +1843,7 @@ examples: speakeasy-default-get-geo-data: responses: "200": - application/json: {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"} + application/json: {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"} "401": application/json: {"errors": []} "400": @@ -1876,12 +1876,17 @@ examples: "": parameters: query: - X-Plex-Product: "Plex Web" + X-Plex-Product: Plex Web + X-Plex-Device: Linux + X-Plex-Version: 4.133.0 + X-Plex-Platform: Chrome responses: "200": application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": 802, "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} "400": application/json: {"errors": []} + "201": + application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null} getTokenByPinId: "": parameters: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 42f99dc9..e8b63701 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 0.3.5 + version: 0.3.6 additionalDependencies: [] additionalPlugins: [] artifactID: plexapi diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c480fa3f..e920667d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.397.3 +speakeasyVersion: 1.399.2 sources: my-source: sourceNamespace: my-source @@ -8,8 +8,8 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f - sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9 + sourceRevisionDigest: sha256:31e943dab53dd0133fcd12a24e04d511637bd7f37b78fd71efded53c650bf729 + sourceBlobDigest: sha256:a652fa39754f0c22a1454f628fe84983b34662ee8a153a3461d50b833f8bc5c2 tags: - latest - main @@ -17,10 +17,10 @@ targets: plexjava: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:533fe97486e3fe2d84e890b7bbcdba4543d415e45181386154e011861f6da36f - sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9 + sourceRevisionDigest: sha256:31e943dab53dd0133fcd12a24e04d511637bd7f37b78fd71efded53c650bf729 + sourceBlobDigest: sha256:a652fa39754f0c22a1454f628fe84983b34662ee8a153a3461d50b833f8bc5c2 codeSamplesNamespace: code-samples-java-plexjava - codeSamplesRevisionDigest: sha256:03bbcd874f602bc3c4399006b5786cf79cc602609d21aeb38a332f69e03fde9e + codeSamplesRevisionDigest: sha256:573447c09306bdcc7cfddf7a74130c0bc1d3596050a8108ad85819c2afd5efb6 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index d8cacfb4..c523487d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.plexapi:plexapi:0.3.5' +implementation 'dev.plexapi:plexapi:0.3.6' ``` Maven: @@ -45,7 +45,7 @@ Maven: dev.plexapi plexapi - 0.3.5 + 0.3.6 ``` @@ -83,7 +83,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -246,21 +250,25 @@ public class Application { ## Global Parameters -A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed. +Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed. -For example, you can set `X-Plex-Client-Identifier` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. +For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `getServerResources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. ### Available Globals -The following global parameter is available. +The following global parameters are available. | Name | Type | Required | Description | | ---- | ---- |:--------:| ----------- | -| xPlexClientIdentifier | java.lang.String | | The unique identifier for the client application +| 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. | +| deviceName | java.lang.String | | The deviceName parameter. | ### Example @@ -282,11 +290,15 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerResourcesResponse res = sdk.plex().getServerResources() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .includeHttps(IncludeHttps.ONE) .includeRelay(IncludeRelay.ONE) .includeIPv6(IncludeIPv6.ONE) @@ -341,7 +353,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -397,7 +413,11 @@ public class Application { PlexAPI sdk = PlexAPI.builder() .serverIndex(0) .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -449,7 +469,11 @@ public class Application { PlexAPI sdk = PlexAPI.builder() .serverURL("{protocol}://{ip}:{port}") .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -493,7 +517,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetCompanionsDataResponse res = sdk.plex().getCompanionsData() @@ -548,7 +576,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() diff --git a/RELEASES.md b/RELEASES.md index a94abe7a..3c2d7df3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -58,4 +58,14 @@ Based on: ### Generated - [java v0.3.5] . ### Releases -- [Maven Central v0.3.5] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.5 - . \ No newline at end of file +- [Maven Central v0.3.5] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.5 - . + +## 2024-09-19 00:24:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.399.2 (2.416.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.3.6] . +### Releases +- [Maven Central v0.3.6] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.3.6 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index b2550550..57dd044d 100644 --- a/USAGE.md +++ b/USAGE.md @@ -13,7 +13,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() diff --git a/build.gradle b/build.gradle index 2e9c1786..4d5325a4 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "dev.plexapi" -version = "0.3.5" +version = "0.3.6" sourcesJar { archiveBaseName = "plexapi" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'dev.plexapi' artifactId = 'plexapi' - version = '0.3.5' + version = '0.3.6' from components.java diff --git a/codeSamples.yaml b/codeSamples.yaml index f405c80a..82499a53 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -22,7 +22,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -66,7 +70,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerPreferencesResponse res = sdk.server().getServerPreferences() @@ -110,7 +118,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() @@ -155,7 +167,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); MarkPlayedResponse res = sdk.media().markPlayed() @@ -200,7 +216,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTimelineRequest req = GetTimelineRequest.builder() @@ -256,7 +276,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); MarkUnplayedResponse res = sdk.media().markUnplayed() @@ -299,7 +323,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerActivitiesResponse res = sdk.activities().getServerActivities() @@ -343,7 +371,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() @@ -386,7 +418,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StopAllTasksResponse res = sdk.butler().stopAllTasks() @@ -428,7 +464,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetButlerTasksResponse res = sdk.butler().getButlerTasks() @@ -472,7 +512,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StartAllTasksResponse res = sdk.butler().startAllTasks() @@ -515,7 +559,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StopTaskResponse res = sdk.butler().stopTask() @@ -559,7 +607,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StartTaskResponse res = sdk.butler().startTask() @@ -602,7 +654,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetAvailableClientsResponse res = sdk.server().getAvailableClients() @@ -646,7 +702,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetCompanionsDataResponse res = sdk.plex().getCompanionsData() @@ -690,7 +750,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetDevicesResponse res = sdk.server().getDevices() @@ -734,7 +798,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetUserFriendsResponse res = sdk.plex().getUserFriends() @@ -777,7 +845,11 @@ actions: public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetGeoDataResponse res = sdk.plex().getGeoData() @@ -821,7 +893,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetHomeDataResponse res = sdk.plex().getHomeData() @@ -866,7 +942,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() @@ -912,7 +992,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); PerformSearchResponse res = sdk.search().performSearch() @@ -957,7 +1041,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() @@ -1003,7 +1091,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() @@ -1049,7 +1141,11 @@ actions: public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerIdentityResponse res = sdk.server().getServerIdentity() @@ -1091,7 +1187,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() @@ -1137,7 +1237,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetFileHashResponse res = sdk.library().getFileHash() @@ -1181,7 +1285,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey() @@ -1227,7 +1335,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetBannerImageRequest req = GetBannerImageRequest.builder() @@ -1281,7 +1393,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() @@ -1328,7 +1444,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetThumbImageRequest req = GetThumbImageRequest.builder() @@ -1382,7 +1502,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetOnDeckResponse res = sdk.library().getOnDeck() @@ -1426,7 +1550,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded() @@ -1472,7 +1600,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetAllLibrariesResponse res = sdk.library().getAllLibraries() @@ -1518,7 +1650,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetWatchListRequest req = GetWatchListRequest.builder() @@ -1570,7 +1706,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); DeleteLibraryResponse res = sdk.library().deleteLibrary() @@ -1614,7 +1754,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() @@ -1661,7 +1805,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() @@ -1706,7 +1854,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSearchLibraryResponse res = sdk.library().getSearchLibrary() @@ -1757,7 +1909,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() @@ -1813,7 +1969,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); LogLineResponse res = sdk.log().logLine() @@ -1859,7 +2019,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .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 @@ -1905,7 +2069,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); EnablePaperTrailResponse res = sdk.log().enablePaperTrail() @@ -1947,7 +2115,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMediaProvidersResponse res = sdk.server().getMediaProviders() @@ -1992,7 +2164,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() @@ -2039,7 +2215,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() @@ -2083,6 +2263,7 @@ actions: import dev.plexapi.plexapi.PlexAPI; import dev.plexapi.plexapi.models.errors.SDKError; + import dev.plexapi.plexapi.models.operations.GetPinRequest; import dev.plexapi.plexapi.models.operations.GetPinResponse; import java.lang.Exception; @@ -2091,13 +2272,18 @@ actions: public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") + .build(); + + GetPinRequest req = GetPinRequest.builder() .build(); GetPinResponse res = sdk.plex().getPin() - .strong(false) - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") - .xPlexProduct("Plex Web") + .request(req) .call(); if (res.authPinContainer().isPresent()) { @@ -2134,11 +2320,15 @@ actions: public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .pinID(408895L) .call(); @@ -2182,7 +2372,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetPlaylistsResponse res = sdk.playlists().getPlaylists() @@ -2231,7 +2425,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); CreatePlaylistRequest req = CreatePlaylistRequest.builder() @@ -2284,7 +2482,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() @@ -2328,7 +2530,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); DeletePlaylistResponse res = sdk.playlists().deletePlaylist() @@ -2371,7 +2577,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetPlaylistResponse res = sdk.playlists().getPlaylist() @@ -2416,7 +2626,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() @@ -2461,7 +2675,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() @@ -2505,7 +2723,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() @@ -2551,7 +2773,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() @@ -2601,11 +2827,15 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerResourcesResponse res = sdk.plex().getServerResources() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .includeHttps(IncludeHttps.ONE) .includeRelay(IncludeRelay.ONE) .includeIPv6(IncludeIPv6.ONE) @@ -2649,7 +2879,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSearchResultsResponse res = sdk.search().getSearchResults() @@ -2694,7 +2928,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() @@ -2739,7 +2977,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTransientTokenResponse res = sdk.authentication().getTransientToken() @@ -2783,7 +3025,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerListResponse res = sdk.server().getServerList() @@ -2827,7 +3073,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() @@ -2872,7 +3122,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetStatisticsResponse res = sdk.statistics().getStatistics() @@ -2917,7 +3171,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() @@ -2962,7 +3220,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSessionsResponse res = sdk.sessions().getSessions() @@ -3007,7 +3269,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() @@ -3056,7 +3322,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() @@ -3100,7 +3370,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() @@ -3145,7 +3419,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); ApplyUpdatesResponse res = sdk.updater().applyUpdates() @@ -3190,7 +3468,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); CheckForUpdatesResponse res = sdk.updater().checkForUpdates() @@ -3233,7 +3515,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() @@ -3277,7 +3563,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() @@ -3321,11 +3611,15 @@ actions: public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .requestBody(PostUsersSignInDataRequestBody.builder() .login("username@email.com") .password("password123") @@ -3372,7 +3666,11 @@ actions: try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() diff --git a/docs/models/operations/GeoData.md b/docs/models/operations/GeoData.md index 6bf8520e..2a5102f8 100644 --- a/docs/models/operations/GeoData.md +++ b/docs/models/operations/GeoData.md @@ -13,7 +13,7 @@ Geo location data | `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam | | `europeanUnionMember` | *Optional* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | | `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *long* | :heavy_check_mark: | The postal code of the location. | 802 | +| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 | | `inPrivacyRestrictedCountry` | *Optional* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | | `inPrivacyRestrictedRegion` | *Optional* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | | `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | diff --git a/docs/models/operations/GetGeoDataGeoData.md b/docs/models/operations/GetGeoDataGeoData.md index 3850fbb7..84383cbc 100644 --- a/docs/models/operations/GetGeoDataGeoData.md +++ b/docs/models/operations/GetGeoDataGeoData.md @@ -13,7 +13,7 @@ Geo location data | `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam | | `europeanUnionMember` | *Optional* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | | `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *long* | :heavy_check_mark: | The postal code of the location. | 802 | +| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 | | `inPrivacyRestrictedCountry` | *Optional* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | | `inPrivacyRestrictedRegion` | *Optional* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | | `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | diff --git a/docs/models/operations/GetPinAuthPinContainer.md b/docs/models/operations/GetPinAuthPinContainer.md index 42e2e111..26d015f4 100644 --- a/docs/models/operations/GetPinAuthPinContainer.md +++ b/docs/models/operations/GetPinAuthPinContainer.md @@ -9,13 +9,13 @@ Requests a new pin id used in the authentication flow | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *long* | :heavy_check_mark: | N/A | 308667304 | | `code` | *String* | :heavy_check_mark: | N/A | 7RQZ | -| `product` | *String* | :heavy_check_mark: | N/A | 0 | +| `product` | *String* | :heavy_check_mark: | N/A | Tautulli | | `trusted` | *Optional* | :heavy_minus_sign: | N/A | | | `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | -| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | | +| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli | | `location` | [GeoData](../../models/operations/GeoData.md) | :heavy_check_mark: | Geo location data | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | | `expiresIn` | *Optional* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | | `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | | `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | -| `authToken` | *JsonNullable* | :heavy_minus_sign: | N/A | | +| `authToken` | *JsonNullable* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 | | `newRegistration` | *JsonNullable* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetPinRequest.md b/docs/models/operations/GetPinRequest.md index c7d56801..6ea26022 100644 --- a/docs/models/operations/GetPinRequest.md +++ b/docs/models/operations/GetPinRequest.md @@ -6,5 +6,8 @@ | 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`
| | -| `xPlexClientIdentifier` | *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 | -| `xPlexProduct` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | \ No newline at end of file +| `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 e93d4dab..7c673bec 100644 --- a/docs/models/operations/GetServerResourcesRequest.md +++ b/docs/models/operations/GetServerResourcesRequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexClientIdentifier` | *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 | +| `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 | | `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 | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdAuthPinContainer.md b/docs/models/operations/GetTokenByPinIdAuthPinContainer.md index 865f9373..e85915f0 100644 --- a/docs/models/operations/GetTokenByPinIdAuthPinContainer.md +++ b/docs/models/operations/GetTokenByPinIdAuthPinContainer.md @@ -9,13 +9,13 @@ The Pin with a non-null authToken when it has been verified by the user | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *long* | :heavy_check_mark: | N/A | 308667304 | | `code` | *String* | :heavy_check_mark: | N/A | 7RQZ | -| `product` | *String* | :heavy_check_mark: | N/A | 0 | +| `product` | *String* | :heavy_check_mark: | N/A | Tautulli | | `trusted` | *Optional* | :heavy_minus_sign: | N/A | | | `qr` | *String* | :heavy_check_mark: | N/A | https://plex.tv/api/v2/pins/qr/7RQZ | -| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | | +| `clientIdentifier` | *String* | :heavy_check_mark: | The X-Client-Identifier used in the request | Tautulli | | `location` | [GetTokenByPinIdGeoData](../../models/operations/GetTokenByPinIdGeoData.md) | :heavy_check_mark: | Geo location data | {
"code": "VI",
"continent_code": "NA",
"country": "United States Virgin Islands",
"city": "Amsterdam",
"european_union_member": true,
"time_zone": "America/St_Thomas",
"postal_code": 802,
"in_privacy_restricted_country": true,
"in_privacy_restricted_region": true,
"subdivisions": "Saint Thomas",
"coordinates": "18.3381, -64.8941"
} | | `expiresIn` | *Optional* | :heavy_minus_sign: | The number of seconds this pin expires, by default 900 seconds | 876 | | `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:03:05Z | | `expiresAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | 2024-07-16T17:18:05Z | -| `authToken` | *JsonNullable* | :heavy_minus_sign: | N/A | | +| `authToken` | *JsonNullable* | :heavy_minus_sign: | N/A | gcgzw5rz2xovp84b4vha3a40 | | `newRegistration` | *JsonNullable* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/GetTokenByPinIdGeoData.md b/docs/models/operations/GetTokenByPinIdGeoData.md index 3be40170..c2394fa1 100644 --- a/docs/models/operations/GetTokenByPinIdGeoData.md +++ b/docs/models/operations/GetTokenByPinIdGeoData.md @@ -13,7 +13,7 @@ Geo location data | `city` | *String* | :heavy_check_mark: | The name of the city. | Amsterdam | | `europeanUnionMember` | *Optional* | :heavy_minus_sign: | Indicates if the country is a member of the European Union. | true | | `timeZone` | *String* | :heavy_check_mark: | The time zone of the country. | America/St_Thomas | -| `postalCode` | *long* | :heavy_check_mark: | The postal code of the location. | 802 | +| `postalCode` | *String* | :heavy_check_mark: | The postal code of the location. | 802 | | `inPrivacyRestrictedCountry` | *Optional* | :heavy_minus_sign: | Indicates if the country has privacy restrictions. | true | | `inPrivacyRestrictedRegion` | *Optional* | :heavy_minus_sign: | Indicates if the region has privacy restrictions. | true | | `subdivisions` | *String* | :heavy_check_mark: | The name of the primary administrative subdivision. | Saint Thomas | diff --git a/docs/models/operations/GetTokenByPinIdRequest.md b/docs/models/operations/GetTokenByPinIdRequest.md index 12289cdc..784bd919 100644 --- a/docs/models/operations/GetTokenByPinIdRequest.md +++ b/docs/models/operations/GetTokenByPinIdRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexClientIdentifier` | *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 | +| `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 | | `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | \ No newline at end of file diff --git a/docs/models/operations/PostUsersSignInDataRequest.md b/docs/models/operations/PostUsersSignInDataRequest.md index 6cf466bb..5f103a7f 100644 --- a/docs/models/operations/PostUsersSignInDataRequest.md +++ b/docs/models/operations/PostUsersSignInDataRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexClientIdentifier` | *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 | +| `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 | | `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 12216892..c3aa6570 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -37,7 +37,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerActivitiesResponse res = sdk.activities().getServerActivities() @@ -97,7 +101,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities() diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index cd3e88ee..fd437398 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -36,7 +36,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTransientTokenResponse res = sdk.authentication().getTransientToken() @@ -105,7 +109,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation() @@ -170,7 +178,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTokenDetailsResponse res = sdk.authentication().getTokenDetails() @@ -236,11 +248,15 @@ public class Application { public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); PostUsersSignInDataResponse res = sdk.authentication().postUsersSignInData() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .requestBody(PostUsersSignInDataRequestBody.builder() .login("username@email.com") .password("password123") @@ -273,7 +289,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexClientIdentifier` | *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 | +| `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 | | `requestBody` | [Optional](../../models/operations/PostUsersSignInDataRequestBody.md) | :heavy_minus_sign: | Login credentials | | | `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 49b94b10..e51242de 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -34,7 +34,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetButlerTasksResponse res = sdk.butler().getButlerTasks() @@ -99,7 +103,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StartAllTasksResponse res = sdk.butler().startAllTasks() @@ -158,7 +166,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StopAllTasksResponse res = sdk.butler().stopAllTasks() @@ -222,7 +234,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StartTaskResponse res = sdk.butler().startTask() @@ -289,7 +305,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StopTaskResponse res = sdk.butler().stopTask() diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index b036e748..ceb5667b 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -32,7 +32,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs() @@ -103,7 +107,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs() diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index 1ed64fa6..d1c88de8 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -41,7 +41,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetFileHashResponse res = sdk.library().getFileHash() @@ -109,7 +113,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetRecentlyAddedResponse res = sdk.library().getRecentlyAdded() @@ -184,7 +192,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetAllLibrariesResponse res = sdk.library().getAllLibraries() @@ -284,7 +296,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetLibraryDetailsResponse res = sdk.library().getLibraryDetails() @@ -353,7 +369,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); DeleteLibraryResponse res = sdk.library().deleteLibrary() @@ -443,7 +463,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetLibraryItemsRequest req = GetLibraryItemsRequest.builder() @@ -522,7 +546,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata() @@ -608,7 +636,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSearchLibraryResponse res = sdk.library().getSearchLibrary() @@ -678,7 +710,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey() @@ -746,7 +782,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMetadataChildrenResponse res = sdk.library().getMetadataChildren() @@ -817,7 +857,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent() @@ -887,7 +931,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetOnDeckResponse res = sdk.library().getOnDeck() diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index 5f3d5de0..96fe7bd1 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -34,7 +34,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); LogLineResponse res = sdk.log().logLine() @@ -125,7 +129,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .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 @@ -194,7 +202,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); EnablePaperTrailResponse res = sdk.log().enablePaperTrail() diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 4477283a..6f9453f4 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -34,7 +34,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); MarkPlayedResponse res = sdk.media().markPlayed() @@ -99,7 +103,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); MarkUnplayedResponse res = sdk.media().markUnplayed() @@ -165,7 +173,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); UpdatePlayProgressResponse res = sdk.media().updatePlayProgress() @@ -235,7 +247,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetBannerImageRequest req = GetBannerImageRequest.builder() @@ -312,7 +328,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetThumbImageRequest req = GetThumbImageRequest.builder() diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 08c9779c..9c5f4caa 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -47,7 +47,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); CreatePlaylistRequest req = CreatePlaylistRequest.builder() @@ -123,7 +127,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetPlaylistsResponse res = sdk.playlists().getPlaylists() @@ -194,7 +202,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetPlaylistResponse res = sdk.playlists().getPlaylist() @@ -262,7 +274,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); DeletePlaylistResponse res = sdk.playlists().deletePlaylist() @@ -328,7 +344,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); UpdatePlaylistResponse res = sdk.playlists().updatePlaylist() @@ -402,7 +422,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents() @@ -472,7 +496,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents() @@ -539,7 +567,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents() @@ -612,7 +644,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); UploadPlaylistResponse res = sdk.playlists().uploadPlaylist() diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 1510b412..834f941b 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -36,7 +36,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetCompanionsDataResponse res = sdk.plex().getCompanionsData() @@ -102,7 +106,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetUserFriendsResponse res = sdk.plex().getUserFriends() @@ -167,7 +175,11 @@ public class Application { public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetGeoDataResponse res = sdk.plex().getGeoData() @@ -233,7 +245,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetHomeDataResponse res = sdk.plex().getHomeData() @@ -296,11 +312,15 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerResourcesResponse res = sdk.plex().getServerResources() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .includeHttps(IncludeHttps.ONE) .includeRelay(IncludeRelay.ONE) .includeIPv6(IncludeIPv6.ONE) @@ -331,7 +351,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexClientIdentifier` | *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 | +| `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 | | `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 | @@ -352,7 +372,7 @@ public class Application { ## getPin -Retrieve a Pin from Plex.tv for authentication flows +Retrieve a Pin ID from Plex.tv to use for authentication flows ### Example Usage @@ -361,6 +381,7 @@ package hello.world; import dev.plexapi.sdk.PlexAPI; import dev.plexapi.sdk.models.errors.SDKError; +import dev.plexapi.sdk.models.operations.GetPinRequest; import dev.plexapi.sdk.models.operations.GetPinResponse; import java.lang.Exception; @@ -369,13 +390,18 @@ public class Application { public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") + .build(); + + GetPinRequest req = GetPinRequest.builder() .build(); GetPinResponse res = sdk.plex().getPin() - .strong(false) - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") - .xPlexProduct("Plex Web") + .request(req) .call(); if (res.authPinContainer().isPresent()) { @@ -398,12 +424,10 @@ public class Application { ### Parameters -| Parameter | 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`
| | -| `xPlexClientIdentifier` | *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 | -| `xPlexProduct` | *Optional* | :heavy_minus_sign: | N/A | Plex Web | -| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `request` | [GetPinRequest](../../models/operations/GetPinRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | ### Response @@ -436,11 +460,15 @@ public class Application { public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") .pinID(408895L) .call(); @@ -469,7 +497,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `xPlexClientIdentifier` | *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 | +| `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 | | `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | | | `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index d6cf5e80..ebe49944 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -44,7 +44,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); PerformSearchResponse res = sdk.search().performSearch() @@ -117,7 +121,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); PerformVoiceSearchResponse res = sdk.search().performVoiceSearch() @@ -186,7 +194,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSearchResultsResponse res = sdk.search().getSearchResults() diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index d29eb22f..d345cf25 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -38,7 +38,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities() @@ -98,7 +102,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerPreferencesResponse res = sdk.server().getServerPreferences() @@ -158,7 +166,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetAvailableClientsResponse res = sdk.server().getAvailableClients() @@ -218,7 +230,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetDevicesResponse res = sdk.server().getDevices() @@ -277,7 +293,11 @@ public class Application { public static void main(String[] args) throws Exception { try { PlexAPI sdk = PlexAPI.builder() - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerIdentityResponse res = sdk.server().getServerIdentity() @@ -333,7 +353,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount() @@ -397,7 +421,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetResizedPhotoRequest req = GetResizedPhotoRequest.builder() @@ -472,7 +500,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetMediaProvidersResponse res = sdk.server().getMediaProviders() @@ -539,7 +571,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetServerListResponse res = sdk.server().getServerList() diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index b029ca70..37c96a8b 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -33,7 +33,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSessionsResponse res = sdk.sessions().getSessions() @@ -94,7 +98,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetSessionHistoryResponse res = sdk.sessions().getSessionHistory() @@ -168,7 +176,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions() @@ -228,7 +240,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession() diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index 2d9ba02d..31eb176a 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -32,7 +32,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetStatisticsResponse res = sdk.statistics().getStatistics() @@ -99,7 +103,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics() @@ -166,7 +174,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics() diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index cab21ca7..799055d8 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -33,7 +33,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetUpdateStatusResponse res = sdk.updater().getUpdateStatus() @@ -94,7 +98,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); CheckForUpdatesResponse res = sdk.updater().checkForUpdates() @@ -162,7 +170,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); ApplyUpdatesResponse res = sdk.updater().applyUpdates() diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 2591bd06..377fcc82 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -33,7 +33,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetTimelineRequest req = GetTimelineRequest.builder() @@ -112,7 +116,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder() diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 2719b72b..7a030a5f 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -32,7 +32,11 @@ public class Application { try { PlexAPI sdk = PlexAPI.builder() .accessToken("") - .xPlexClientIdentifier("gcgzw5rz2xovp84b4vha3a40") + .clientID("gcgzw5rz2xovp84b4vha3a40") + .clientName("Plex Web") + .clientVersion("4.133.0") + .clientPlatform("Chrome") + .deviceName("Linux") .build(); GetWatchListRequest req = GetWatchListRequest.builder() diff --git a/src/main/java/dev/plexapi/sdk/Authentication.java b/src/main/java/dev/plexapi/sdk/Authentication.java index d8bd9e54..4a40f2d9 100644 --- a/src/main/java/dev/plexapi/sdk/Authentication.java +++ b/src/main/java/dev/plexapi/sdk/Authentication.java @@ -570,7 +570,7 @@ public class Authentication implements /** * Get User Sign In Data * Sign in user with username and password and return user data with Plex authentication token - * @param xPlexClientIdentifier The unique identifier for the client application + * @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) @@ -580,13 +580,13 @@ public class Authentication implements * @throws Exception if the API call fails */ public PostUsersSignInDataResponse postUsersSignInData( - Optional xPlexClientIdentifier, + Optional clientID, Optional requestBody, Optional serverURL) throws Exception { PostUsersSignInDataRequest request = PostUsersSignInDataRequest .builder() - .xPlexClientIdentifier(xPlexClientIdentifier) + .clientID(clientID) .requestBody(requestBody) .build(); diff --git a/src/main/java/dev/plexapi/sdk/Plex.java b/src/main/java/dev/plexapi/sdk/Plex.java index 4ba00aab..8706df44 100644 --- a/src/main/java/dev/plexapi/sdk/Plex.java +++ b/src/main/java/dev/plexapi/sdk/Plex.java @@ -54,7 +54,6 @@ import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl; import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl; import dev.plexapi.sdk.utils.Utils; import java.io.InputStream; -import java.lang.Boolean; import java.lang.Exception; import java.lang.String; import java.net.http.HttpRequest; @@ -774,7 +773,7 @@ public class Plex implements /** * Get Server Resources * Get Plex server access tokens and server connections - * @param xPlexClientIdentifier The unique identifier for the client application + * @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) @@ -788,7 +787,7 @@ public class Plex implements * @throws Exception if the API call fails */ public GetServerResourcesResponse getServerResources( - Optional xPlexClientIdentifier, + Optional clientID, Optional includeHttps, Optional includeRelay, Optional includeIPv6, @@ -796,7 +795,7 @@ public class Plex implements GetServerResourcesRequest request = GetServerResourcesRequest .builder() - .xPlexClientIdentifier(xPlexClientIdentifier) + .clientID(clientID) .includeHttps(includeHttps) .includeRelay(includeRelay) .includeIPv6(includeIPv6) @@ -942,7 +941,7 @@ public class Plex implements /** * Get a Pin - * Retrieve a Pin from Plex.tv for authentication flows + * Retrieve a Pin ID from Plex.tv to use for authentication flows * @return The call builder */ public GetPinRequestBuilder getPin() { @@ -951,43 +950,27 @@ public class Plex implements /** * Get a Pin - * Retrieve a Pin from Plex.tv for authentication flows + * Retrieve a Pin ID from Plex.tv to use for authentication flows + * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails */ - public GetPinResponse getPinDirect() throws Exception { - return getPin(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + public GetPinResponse getPin( + GetPinRequest request) throws Exception { + return getPin(request, Optional.empty()); } /** * Get a Pin - * Retrieve a Pin from Plex.tv for authentication flows - * @param strong 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` - - * @param xPlexClientIdentifier 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 xPlexProduct + * Retrieve a Pin ID from Plex.tv to use for authentication flows + * @param request The request object containing all of the parameters for the API call. * @param serverURL Overrides the server URL. * @return The response from the API call * @throws Exception if the API call fails */ public GetPinResponse getPin( - Optional strong, - Optional xPlexClientIdentifier, - Optional xPlexProduct, + GetPinRequest request, Optional serverURL) throws Exception { - GetPinRequest request = - GetPinRequest - .builder() - .strong(strong) - .xPlexClientIdentifier(xPlexClientIdentifier) - .xPlexProduct(xPlexProduct) - .build(); - String _baseUrl = Utils.templateUrl(GET_PIN_SERVERS[0], new HashMap()); if (serverURL.isPresent() && !serverURL.get().isBlank()) { _baseUrl = serverURL.get(); @@ -1059,7 +1042,7 @@ public class Plex implements GetPinResponse _res = _resBuilder.build(); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "201")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { GetPinAuthPinContainer _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -1131,7 +1114,7 @@ public class Plex implements /** * Get Access Token by PinId * Retrieve an Access Token from Plex.tv after the Pin has been authenticated - * @param xPlexClientIdentifier The unique identifier for the client application + * @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) @@ -1141,13 +1124,13 @@ public class Plex implements * @throws Exception if the API call fails */ public GetTokenByPinIdResponse getTokenByPinId( - Optional xPlexClientIdentifier, + Optional clientID, long pinID, Optional serverURL) throws Exception { GetTokenByPinIdRequest request = GetTokenByPinIdRequest .builder() - .xPlexClientIdentifier(xPlexClientIdentifier) + .clientID(clientID) .pinID(pinID) .build(); diff --git a/src/main/java/dev/plexapi/sdk/PlexAPI.java b/src/main/java/dev/plexapi/sdk/PlexAPI.java index d628b630..377c5f30 100644 --- a/src/main/java/dev/plexapi/sdk/PlexAPI.java +++ b/src/main/java/dev/plexapi/sdk/PlexAPI.java @@ -433,17 +433,81 @@ public class PlexAPI { } /** - * Allows setting the xPlexClientIdentifier parameter for all supported operations. + * Allows setting the clientID parameter for all supported operations. * - * @param xPlexClientIdentifier The value to set. + * @param clientID The value to set. * @return The builder instance. */ - public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { + public Builder clientID(String clientID) { if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) { this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>()); } - this.sdkConfiguration.globals.get("parameters").get("queryParam").put("xPlexClientIdentifier", xPlexClientIdentifier); + this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientID", clientID); + + return this; + } + + /** + * Allows setting the clientName parameter for all supported operations. + * + * @param clientName The value to set. + * @return The builder instance. + */ + public Builder clientName(String clientName) { + if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) { + this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>()); + } + + this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientName", clientName); + + return this; + } + + /** + * Allows setting the clientVersion parameter for all supported operations. + * + * @param clientVersion The value to set. + * @return The builder instance. + */ + public Builder clientVersion(String clientVersion) { + if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) { + this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>()); + } + + this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientVersion", clientVersion); + + return this; + } + + /** + * Allows setting the clientPlatform parameter for all supported operations. + * + * @param clientPlatform The value to set. + * @return The builder instance. + */ + public Builder clientPlatform(String clientPlatform) { + if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) { + this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>()); + } + + this.sdkConfiguration.globals.get("parameters").get("queryParam").put("clientPlatform", clientPlatform); + + return this; + } + + /** + * Allows setting the deviceName parameter for all supported operations. + * + * @param deviceName The value to set. + * @return The builder instance. + */ + public Builder deviceName(String deviceName) { + if (!this.sdkConfiguration.globals.get("parameters").containsKey("queryParam")) { + this.sdkConfiguration.globals.get("parameters").put("queryParam", new java.util.HashMap<>()); + } + + this.sdkConfiguration.globals.get("parameters").get("queryParam").put("deviceName", deviceName); return this; } diff --git a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java index e7925acd..3138266e 100644 --- a/src/main/java/dev/plexapi/sdk/SDKConfiguration.java +++ b/src/main/java/dev/plexapi/sdk/SDKConfiguration.java @@ -36,9 +36,9 @@ class SDKConfiguration { } }; public String language = "java"; public String openapiDocVersion = "0.0.3"; - public String sdkVersion = "0.3.5"; - public String genVersion = "2.415.8"; - public String userAgent = "speakeasy-sdk/java 0.3.5 2.415.8 0.0.3 dev.plexapi.sdk"; + public String sdkVersion = "0.3.6"; + public String genVersion = "2.416.6"; + public String userAgent = "speakeasy-sdk/java 0.3.6 2.416.6 0.0.3 dev.plexapi.sdk"; private Hooks _hooks = createHooks(); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java b/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java index aa46f55b..c424506b 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GeoData.java @@ -14,7 +14,6 @@ import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; -import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -67,7 +66,7 @@ public class GeoData { * The postal code of the location. */ @JsonProperty("postal_code") - private long postalCode; + private String postalCode; /** * Indicates if the country has privacy restrictions. @@ -103,7 +102,7 @@ public class GeoData { @JsonProperty("city") String city, @JsonProperty("european_union_member") Optional europeanUnionMember, @JsonProperty("time_zone") String timeZone, - @JsonProperty("postal_code") long postalCode, + @JsonProperty("postal_code") String postalCode, @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, @JsonProperty("in_privacy_restricted_region") Optional inPrivacyRestrictedRegion, @JsonProperty("subdivisions") String subdivisions, @@ -138,7 +137,7 @@ public class GeoData { String country, String city, String timeZone, - long postalCode, + String postalCode, String subdivisions, String coordinates) { this(code, continentCode, country, city, Optional.empty(), timeZone, postalCode, Optional.empty(), Optional.empty(), subdivisions, coordinates); @@ -196,7 +195,7 @@ public class GeoData { * The postal code of the location. */ @JsonIgnore - public long postalCode() { + public String postalCode() { return postalCode; } @@ -302,7 +301,7 @@ public class GeoData { /** * The postal code of the location. */ - public GeoData withPostalCode(long postalCode) { + public GeoData withPostalCode(String postalCode) { Utils.checkNotNull(postalCode, "postalCode"); this.postalCode = postalCode; return this; @@ -431,7 +430,7 @@ public class GeoData { private String timeZone; - private Long postalCode; + private String postalCode; private Optional inPrivacyRestrictedCountry; @@ -511,7 +510,7 @@ public class GeoData { /** * The postal code of the location. */ - public Builder postalCode(long postalCode) { + public Builder postalCode(String postalCode) { Utils.checkNotNull(postalCode, "postalCode"); this.postalCode = postalCode; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java b/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java index 37431de2..78378b0d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetGeoDataGeoData.java @@ -14,7 +14,6 @@ import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; -import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -67,7 +66,7 @@ public class GetGeoDataGeoData { * The postal code of the location. */ @JsonProperty("postal_code") - private long postalCode; + private String postalCode; /** * Indicates if the country has privacy restrictions. @@ -103,7 +102,7 @@ public class GetGeoDataGeoData { @JsonProperty("city") String city, @JsonProperty("european_union_member") Optional europeanUnionMember, @JsonProperty("time_zone") String timeZone, - @JsonProperty("postal_code") long postalCode, + @JsonProperty("postal_code") String postalCode, @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, @JsonProperty("in_privacy_restricted_region") Optional inPrivacyRestrictedRegion, @JsonProperty("subdivisions") String subdivisions, @@ -138,7 +137,7 @@ public class GetGeoDataGeoData { String country, String city, String timeZone, - long postalCode, + String postalCode, String subdivisions, String coordinates) { this(code, continentCode, country, city, Optional.empty(), timeZone, postalCode, Optional.empty(), Optional.empty(), subdivisions, coordinates); @@ -196,7 +195,7 @@ public class GetGeoDataGeoData { * The postal code of the location. */ @JsonIgnore - public long postalCode() { + public String postalCode() { return postalCode; } @@ -302,7 +301,7 @@ public class GetGeoDataGeoData { /** * The postal code of the location. */ - public GetGeoDataGeoData withPostalCode(long postalCode) { + public GetGeoDataGeoData withPostalCode(String postalCode) { Utils.checkNotNull(postalCode, "postalCode"); this.postalCode = postalCode; return this; @@ -431,7 +430,7 @@ public class GetGeoDataGeoData { private String timeZone; - private Long postalCode; + private String postalCode; private Optional inPrivacyRestrictedCountry; @@ -511,7 +510,7 @@ public class GetGeoDataGeoData { /** * The postal code of the location. */ - public Builder postalCode(long postalCode) { + public Builder postalCode(String postalCode) { Utils.checkNotNull(postalCode, "postalCode"); this.postalCode = postalCode; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java index 2c8b3bd9..81d88404 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPinAuthPinContainer.java @@ -73,7 +73,7 @@ public class GetPinAuthPinContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("authToken") - private JsonNullable authToken; + private JsonNullable authToken; @JsonInclude(Include.NON_ABSENT) @JsonProperty("newRegistration") @@ -91,7 +91,7 @@ public class GetPinAuthPinContainer { @JsonProperty("expiresIn") Optional expiresIn, @JsonProperty("createdAt") OffsetDateTime createdAt, @JsonProperty("expiresAt") OffsetDateTime expiresAt, - @JsonProperty("authToken") JsonNullable authToken, + @JsonProperty("authToken") JsonNullable authToken, @JsonProperty("newRegistration") JsonNullable newRegistration) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(code, "code"); @@ -190,10 +190,9 @@ public class GetPinAuthPinContainer { return expiresAt; } - @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable authToken() { - return (JsonNullable) authToken; + public JsonNullable authToken() { + return authToken; } @SuppressWarnings("unchecked") @@ -290,13 +289,13 @@ public class GetPinAuthPinContainer { return this; } - public GetPinAuthPinContainer withAuthToken(Object authToken) { + public GetPinAuthPinContainer withAuthToken(String authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = JsonNullable.of(authToken); return this; } - public GetPinAuthPinContainer withAuthToken(JsonNullable authToken) { + public GetPinAuthPinContainer withAuthToken(JsonNullable authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = authToken; return this; @@ -394,7 +393,7 @@ public class GetPinAuthPinContainer { private OffsetDateTime expiresAt; - private JsonNullable authToken = JsonNullable.undefined(); + private JsonNullable authToken = JsonNullable.undefined(); private JsonNullable newRegistration = JsonNullable.undefined(); @@ -486,13 +485,13 @@ public class GetPinAuthPinContainer { return this; } - public Builder authToken(Object authToken) { + public Builder authToken(String authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = JsonNullable.of(authToken); return this; } - public Builder authToken(JsonNullable authToken) { + public Builder authToken(JsonNullable authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = authToken; return this; 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 66486670..62d2f9cd 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequest.java @@ -36,26 +36,44 @@ public class GetPinRequest { * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") - private Optional xPlexClientIdentifier; + private Optional clientID; @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Product") - private Optional xPlexProduct; + private Optional clientName; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Device") + private Optional deviceName; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Version") + private Optional clientVersion; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Platform") + private Optional clientPlatform; @JsonCreator public GetPinRequest( Optional strong, - Optional xPlexClientIdentifier, - Optional xPlexProduct) { + Optional clientID, + Optional clientName, + Optional deviceName, + Optional clientVersion, + Optional clientPlatform) { Utils.checkNotNull(strong, "strong"); - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); + Utils.checkNotNull(clientID, "clientID"); + Utils.checkNotNull(clientName, "clientName"); + Utils.checkNotNull(deviceName, "deviceName"); + Utils.checkNotNull(clientVersion, "clientVersion"); + Utils.checkNotNull(clientPlatform, "clientPlatform"); this.strong = strong; - this.xPlexClientIdentifier = xPlexClientIdentifier; - this.xPlexProduct = xPlexProduct; + this.clientID = clientID; + this.clientName = clientName; + this.deviceName = deviceName; + this.clientVersion = clientVersion; + this.clientPlatform = clientPlatform; } public GetPinRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -76,13 +94,28 @@ public class GetPinRequest { * */ @JsonIgnore - public Optional xPlexClientIdentifier() { - return xPlexClientIdentifier; + public Optional clientID() { + return clientID; } @JsonIgnore - public Optional xPlexProduct() { - return xPlexProduct; + public Optional clientName() { + return clientName; + } + + @JsonIgnore + public Optional deviceName() { + return deviceName; + } + + @JsonIgnore + public Optional clientVersion() { + return clientVersion; + } + + @JsonIgnore + public Optional clientPlatform() { + return clientPlatform; } public final static Builder builder() { @@ -119,9 +152,9 @@ public class GetPinRequest { * (UUID, serial number, or other number unique per device) * */ - public GetPinRequest withXPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public GetPinRequest withClientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -131,21 +164,57 @@ public class GetPinRequest { * (UUID, serial number, or other number unique per device) * */ - public GetPinRequest withXPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public GetPinRequest withClientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } - public GetPinRequest withXPlexProduct(String xPlexProduct) { - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); - this.xPlexProduct = Optional.ofNullable(xPlexProduct); + public GetPinRequest withClientName(String clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = Optional.ofNullable(clientName); return this; } - public GetPinRequest withXPlexProduct(Optional xPlexProduct) { - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); - this.xPlexProduct = xPlexProduct; + public GetPinRequest withClientName(Optional clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = clientName; + return this; + } + + public GetPinRequest withDeviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + public GetPinRequest withDeviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + public GetPinRequest withClientVersion(String clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = Optional.ofNullable(clientVersion); + return this; + } + + public GetPinRequest withClientVersion(Optional clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = clientVersion; + return this; + } + + public GetPinRequest withClientPlatform(String clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = Optional.ofNullable(clientPlatform); + return this; + } + + public GetPinRequest withClientPlatform(Optional clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = clientPlatform; return this; } @@ -160,33 +229,48 @@ public class GetPinRequest { GetPinRequest other = (GetPinRequest) o; return Objects.deepEquals(this.strong, other.strong) && - Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier) && - Objects.deepEquals(this.xPlexProduct, other.xPlexProduct); + Objects.deepEquals(this.clientID, other.clientID) && + Objects.deepEquals(this.clientName, other.clientName) && + Objects.deepEquals(this.deviceName, other.deviceName) && + Objects.deepEquals(this.clientVersion, other.clientVersion) && + Objects.deepEquals(this.clientPlatform, other.clientPlatform); } @Override public int hashCode() { return Objects.hash( strong, - xPlexClientIdentifier, - xPlexProduct); + clientID, + clientName, + deviceName, + clientVersion, + clientPlatform); } @Override public String toString() { return Utils.toString(GetPinRequest.class, "strong", strong, - "xPlexClientIdentifier", xPlexClientIdentifier, - "xPlexProduct", xPlexProduct); + "clientID", clientID, + "clientName", clientName, + "deviceName", deviceName, + "clientVersion", clientVersion, + "clientPlatform", clientPlatform); } public final static class Builder { private Optional strong; - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); - private Optional xPlexProduct = Optional.empty(); + private Optional clientName = Optional.empty(); + + private Optional deviceName = Optional.empty(); + + private Optional clientVersion = Optional.empty(); + + private Optional clientPlatform = Optional.empty(); private Builder() { // force use of static builder() method @@ -222,9 +306,9 @@ public class GetPinRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public Builder clientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -234,21 +318,57 @@ public class GetPinRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public Builder clientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } - public Builder xPlexProduct(String xPlexProduct) { - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); - this.xPlexProduct = Optional.ofNullable(xPlexProduct); + public Builder clientName(String clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = Optional.ofNullable(clientName); return this; } - public Builder xPlexProduct(Optional xPlexProduct) { - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); - this.xPlexProduct = xPlexProduct; + public Builder clientName(Optional clientName) { + Utils.checkNotNull(clientName, "clientName"); + this.clientName = clientName; + return this; + } + + public Builder deviceName(String deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = Optional.ofNullable(deviceName); + return this; + } + + public Builder deviceName(Optional deviceName) { + Utils.checkNotNull(deviceName, "deviceName"); + this.deviceName = deviceName; + return this; + } + + public Builder clientVersion(String clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = Optional.ofNullable(clientVersion); + return this; + } + + public Builder clientVersion(Optional clientVersion) { + Utils.checkNotNull(clientVersion, "clientVersion"); + this.clientVersion = clientVersion; + return this; + } + + public Builder clientPlatform(String clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = Optional.ofNullable(clientPlatform); + return this; + } + + public Builder clientPlatform(Optional clientPlatform) { + Utils.checkNotNull(clientPlatform, "clientPlatform"); + this.clientPlatform = clientPlatform; return this; } @@ -257,8 +377,11 @@ public class GetPinRequest { strong = _SINGLETON_VALUE_Strong.value(); } return new GetPinRequest( strong, - xPlexClientIdentifier, - xPlexProduct); + clientID, + clientName, + deviceName, + clientVersion, + clientPlatform); } private static final LazySingletonValue> _SINGLETON_VALUE_Strong = diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java index f6aa69fe..45d3b037 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetPinRequestBuilder.java @@ -4,61 +4,23 @@ package dev.plexapi.sdk.models.operations; -import com.fasterxml.jackson.core.type.TypeReference; -import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; -import java.lang.Boolean; import java.lang.String; import java.util.Optional; public class GetPinRequestBuilder { - private Optional strong = Utils.readDefaultOrConstValue( - "strong", - "false", - new TypeReference>() {}); - private Optional xPlexClientIdentifier = Optional.empty(); - private Optional xPlexProduct = Optional.empty(); + private GetPinRequest request; private Optional serverURL = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetPin sdk; public GetPinRequestBuilder(SDKMethodInterfaces.MethodCallGetPin sdk) { this.sdk = sdk; } - - public GetPinRequestBuilder strong(boolean strong) { - Utils.checkNotNull(strong, "strong"); - this.strong = Optional.of(strong); - return this; - } - public GetPinRequestBuilder strong(java.util.Optional strong) { - Utils.checkNotNull(strong, "strong"); - this.strong = strong; - return this; - } - - public GetPinRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier); - return this; - } - - public GetPinRequestBuilder xPlexClientIdentifier(java.util.Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; - return this; - } - - public GetPinRequestBuilder xPlexProduct(java.lang.String xPlexProduct) { - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); - this.xPlexProduct = Optional.of(xPlexProduct); - return this; - } - - public GetPinRequestBuilder xPlexProduct(java.util.Optional xPlexProduct) { - Utils.checkNotNull(xPlexProduct, "xPlexProduct"); - this.xPlexProduct = xPlexProduct; + public GetPinRequestBuilder request(dev.plexapi.sdk.models.operations.GetPinRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; return this; } @@ -75,19 +37,9 @@ public class GetPinRequestBuilder { } public GetPinResponse call() throws Exception { - if (strong == null) { - strong = _SINGLETON_VALUE_Strong.value(); - } + return sdk.getPin( - strong, - xPlexClientIdentifier, - xPlexProduct, + request, serverURL); } - - private static final LazySingletonValue> _SINGLETON_VALUE_Strong = - new LazySingletonValue<>( - "strong", - "false", - new TypeReference>() {}); } 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 59c43485..30d96a32 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequest.java @@ -27,7 +27,7 @@ public class GetServerResourcesRequest { * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") - private Optional xPlexClientIdentifier; + private Optional clientID; /** * Include Https entries in the results @@ -51,15 +51,15 @@ public class GetServerResourcesRequest { @JsonCreator public GetServerResourcesRequest( - Optional xPlexClientIdentifier, + Optional clientID, Optional includeHttps, Optional includeRelay, Optional includeIPv6) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + Utils.checkNotNull(clientID, "clientID"); Utils.checkNotNull(includeHttps, "includeHttps"); Utils.checkNotNull(includeRelay, "includeRelay"); Utils.checkNotNull(includeIPv6, "includeIPv6"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + this.clientID = clientID; this.includeHttps = includeHttps; this.includeRelay = includeRelay; this.includeIPv6 = includeIPv6; @@ -76,8 +76,8 @@ public class GetServerResourcesRequest { * */ @JsonIgnore - public Optional xPlexClientIdentifier() { - return xPlexClientIdentifier; + public Optional clientID() { + return clientID; } /** @@ -119,9 +119,9 @@ public class GetServerResourcesRequest { * (UUID, serial number, or other number unique per device) * */ - public GetServerResourcesRequest withXPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public GetServerResourcesRequest withClientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -131,9 +131,9 @@ public class GetServerResourcesRequest { * (UUID, serial number, or other number unique per device) * */ - public GetServerResourcesRequest withXPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public GetServerResourcesRequest withClientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -205,7 +205,7 @@ public class GetServerResourcesRequest { } GetServerResourcesRequest other = (GetServerResourcesRequest) o; return - Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier) && + Objects.deepEquals(this.clientID, other.clientID) && Objects.deepEquals(this.includeHttps, other.includeHttps) && Objects.deepEquals(this.includeRelay, other.includeRelay) && Objects.deepEquals(this.includeIPv6, other.includeIPv6); @@ -214,7 +214,7 @@ public class GetServerResourcesRequest { @Override public int hashCode() { return Objects.hash( - xPlexClientIdentifier, + clientID, includeHttps, includeRelay, includeIPv6); @@ -223,7 +223,7 @@ public class GetServerResourcesRequest { @Override public String toString() { return Utils.toString(GetServerResourcesRequest.class, - "xPlexClientIdentifier", xPlexClientIdentifier, + "clientID", clientID, "includeHttps", includeHttps, "includeRelay", includeRelay, "includeIPv6", includeIPv6); @@ -231,7 +231,7 @@ public class GetServerResourcesRequest { public final static class Builder { - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); private Optional includeHttps; @@ -249,9 +249,9 @@ public class GetServerResourcesRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public Builder clientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -261,9 +261,9 @@ public class GetServerResourcesRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public Builder clientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -335,7 +335,7 @@ public class GetServerResourcesRequest { if (includeIPv6 == null) { includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value(); } return new GetServerResourcesRequest( - xPlexClientIdentifier, + clientID, includeHttps, includeRelay, includeIPv6); diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java index 4990eeb0..d9123f43 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetServerResourcesRequestBuilder.java @@ -12,7 +12,7 @@ import java.util.Optional; public class GetServerResourcesRequestBuilder { - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); private Optional includeHttps = Utils.readDefaultOrConstValue( "includeHttps", "0", @@ -32,15 +32,15 @@ public class GetServerResourcesRequestBuilder { this.sdk = sdk; } - public GetServerResourcesRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier); + public GetServerResourcesRequestBuilder clientID(java.lang.String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.of(clientID); return this; } - public GetServerResourcesRequestBuilder xPlexClientIdentifier(java.util.Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public GetServerResourcesRequestBuilder clientID(java.util.Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -103,7 +103,7 @@ public class GetServerResourcesRequestBuilder { includeIPv6 = _SINGLETON_VALUE_IncludeIPv6.value(); } return sdk.getServerResources( - xPlexClientIdentifier, + clientID, includeHttps, includeRelay, includeIPv6, diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java index 97b06ed4..781540de 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdAuthPinContainer.java @@ -73,7 +73,7 @@ public class GetTokenByPinIdAuthPinContainer { @JsonInclude(Include.NON_ABSENT) @JsonProperty("authToken") - private JsonNullable authToken; + private JsonNullable authToken; @JsonInclude(Include.NON_ABSENT) @JsonProperty("newRegistration") @@ -91,7 +91,7 @@ public class GetTokenByPinIdAuthPinContainer { @JsonProperty("expiresIn") Optional expiresIn, @JsonProperty("createdAt") OffsetDateTime createdAt, @JsonProperty("expiresAt") OffsetDateTime expiresAt, - @JsonProperty("authToken") JsonNullable authToken, + @JsonProperty("authToken") JsonNullable authToken, @JsonProperty("newRegistration") JsonNullable newRegistration) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(code, "code"); @@ -190,10 +190,9 @@ public class GetTokenByPinIdAuthPinContainer { return expiresAt; } - @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable authToken() { - return (JsonNullable) authToken; + public JsonNullable authToken() { + return authToken; } @SuppressWarnings("unchecked") @@ -290,13 +289,13 @@ public class GetTokenByPinIdAuthPinContainer { return this; } - public GetTokenByPinIdAuthPinContainer withAuthToken(Object authToken) { + public GetTokenByPinIdAuthPinContainer withAuthToken(String authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = JsonNullable.of(authToken); return this; } - public GetTokenByPinIdAuthPinContainer withAuthToken(JsonNullable authToken) { + public GetTokenByPinIdAuthPinContainer withAuthToken(JsonNullable authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = authToken; return this; @@ -394,7 +393,7 @@ public class GetTokenByPinIdAuthPinContainer { private OffsetDateTime expiresAt; - private JsonNullable authToken = JsonNullable.undefined(); + private JsonNullable authToken = JsonNullable.undefined(); private JsonNullable newRegistration = JsonNullable.undefined(); @@ -486,13 +485,13 @@ public class GetTokenByPinIdAuthPinContainer { return this; } - public Builder authToken(Object authToken) { + public Builder authToken(String authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = JsonNullable.of(authToken); return this; } - public Builder authToken(JsonNullable authToken) { + public Builder authToken(JsonNullable authToken) { Utils.checkNotNull(authToken, "authToken"); this.authToken = authToken; return this; diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java index d654b380..1b6d4615 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdGeoData.java @@ -14,7 +14,6 @@ import com.fasterxml.jackson.core.type.TypeReference; import dev.plexapi.sdk.utils.LazySingletonValue; import dev.plexapi.sdk.utils.Utils; import java.lang.Boolean; -import java.lang.Long; import java.lang.Override; import java.lang.String; import java.util.Objects; @@ -67,7 +66,7 @@ public class GetTokenByPinIdGeoData { * The postal code of the location. */ @JsonProperty("postal_code") - private long postalCode; + private String postalCode; /** * Indicates if the country has privacy restrictions. @@ -103,7 +102,7 @@ public class GetTokenByPinIdGeoData { @JsonProperty("city") String city, @JsonProperty("european_union_member") Optional europeanUnionMember, @JsonProperty("time_zone") String timeZone, - @JsonProperty("postal_code") long postalCode, + @JsonProperty("postal_code") String postalCode, @JsonProperty("in_privacy_restricted_country") Optional inPrivacyRestrictedCountry, @JsonProperty("in_privacy_restricted_region") Optional inPrivacyRestrictedRegion, @JsonProperty("subdivisions") String subdivisions, @@ -138,7 +137,7 @@ public class GetTokenByPinIdGeoData { String country, String city, String timeZone, - long postalCode, + String postalCode, String subdivisions, String coordinates) { this(code, continentCode, country, city, Optional.empty(), timeZone, postalCode, Optional.empty(), Optional.empty(), subdivisions, coordinates); @@ -196,7 +195,7 @@ public class GetTokenByPinIdGeoData { * The postal code of the location. */ @JsonIgnore - public long postalCode() { + public String postalCode() { return postalCode; } @@ -302,7 +301,7 @@ public class GetTokenByPinIdGeoData { /** * The postal code of the location. */ - public GetTokenByPinIdGeoData withPostalCode(long postalCode) { + public GetTokenByPinIdGeoData withPostalCode(String postalCode) { Utils.checkNotNull(postalCode, "postalCode"); this.postalCode = postalCode; return this; @@ -431,7 +430,7 @@ public class GetTokenByPinIdGeoData { private String timeZone; - private Long postalCode; + private String postalCode; private Optional inPrivacyRestrictedCountry; @@ -511,7 +510,7 @@ public class GetTokenByPinIdGeoData { /** * The postal code of the location. */ - public Builder postalCode(long postalCode) { + public Builder postalCode(String postalCode) { Utils.checkNotNull(postalCode, "postalCode"); this.postalCode = postalCode; return this; 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 9e6128c6..0d482c91 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequest.java @@ -25,7 +25,7 @@ public class GetTokenByPinIdRequest { * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") - private Optional xPlexClientIdentifier; + private Optional clientID; /** * The PinID to retrieve an access token for @@ -35,11 +35,11 @@ public class GetTokenByPinIdRequest { @JsonCreator public GetTokenByPinIdRequest( - Optional xPlexClientIdentifier, + Optional clientID, long pinID) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + Utils.checkNotNull(clientID, "clientID"); Utils.checkNotNull(pinID, "pinID"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + this.clientID = clientID; this.pinID = pinID; } @@ -55,8 +55,8 @@ public class GetTokenByPinIdRequest { * */ @JsonIgnore - public Optional xPlexClientIdentifier() { - return xPlexClientIdentifier; + public Optional clientID() { + return clientID; } /** @@ -77,9 +77,9 @@ public class GetTokenByPinIdRequest { * (UUID, serial number, or other number unique per device) * */ - public GetTokenByPinIdRequest withXPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public GetTokenByPinIdRequest withClientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -89,9 +89,9 @@ public class GetTokenByPinIdRequest { * (UUID, serial number, or other number unique per device) * */ - public GetTokenByPinIdRequest withXPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public GetTokenByPinIdRequest withClientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -114,27 +114,27 @@ public class GetTokenByPinIdRequest { } GetTokenByPinIdRequest other = (GetTokenByPinIdRequest) o; return - Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier) && + Objects.deepEquals(this.clientID, other.clientID) && Objects.deepEquals(this.pinID, other.pinID); } @Override public int hashCode() { return Objects.hash( - xPlexClientIdentifier, + clientID, pinID); } @Override public String toString() { return Utils.toString(GetTokenByPinIdRequest.class, - "xPlexClientIdentifier", xPlexClientIdentifier, + "clientID", clientID, "pinID", pinID); } public final static class Builder { - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); private Long pinID; @@ -148,9 +148,9 @@ public class GetTokenByPinIdRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public Builder clientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -160,9 +160,9 @@ public class GetTokenByPinIdRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public Builder clientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -177,7 +177,7 @@ public class GetTokenByPinIdRequest { public GetTokenByPinIdRequest build() { return new GetTokenByPinIdRequest( - xPlexClientIdentifier, + clientID, pinID); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java index f1a3bd43..f7004bfa 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/GetTokenByPinIdRequestBuilder.java @@ -11,7 +11,7 @@ import java.util.Optional; public class GetTokenByPinIdRequestBuilder { - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); private Long pinID; private Optional serverURL = Optional.empty(); private final SDKMethodInterfaces.MethodCallGetTokenByPinId sdk; @@ -20,15 +20,15 @@ public class GetTokenByPinIdRequestBuilder { this.sdk = sdk; } - public GetTokenByPinIdRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier); + public GetTokenByPinIdRequestBuilder clientID(java.lang.String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.of(clientID); return this; } - public GetTokenByPinIdRequestBuilder xPlexClientIdentifier(java.util.Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public GetTokenByPinIdRequestBuilder clientID(java.util.Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -53,7 +53,7 @@ public class GetTokenByPinIdRequestBuilder { public GetTokenByPinIdResponse call() throws Exception { return sdk.getTokenByPinId( - xPlexClientIdentifier, + clientID, pinID, serverURL); } 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 7d46844b..c1756f63 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequest.java @@ -25,7 +25,7 @@ public class PostUsersSignInDataRequest { * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=X-Plex-Client-Identifier") - private Optional xPlexClientIdentifier; + private Optional clientID; /** * Login credentials @@ -35,11 +35,11 @@ public class PostUsersSignInDataRequest { @JsonCreator public PostUsersSignInDataRequest( - Optional xPlexClientIdentifier, + Optional clientID, Optional requestBody) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); + Utils.checkNotNull(clientID, "clientID"); Utils.checkNotNull(requestBody, "requestBody"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + this.clientID = clientID; this.requestBody = requestBody; } @@ -54,8 +54,8 @@ public class PostUsersSignInDataRequest { * */ @JsonIgnore - public Optional xPlexClientIdentifier() { - return xPlexClientIdentifier; + public Optional clientID() { + return clientID; } /** @@ -77,9 +77,9 @@ public class PostUsersSignInDataRequest { * (UUID, serial number, or other number unique per device) * */ - public PostUsersSignInDataRequest withXPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public PostUsersSignInDataRequest withClientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -89,9 +89,9 @@ public class PostUsersSignInDataRequest { * (UUID, serial number, or other number unique per device) * */ - public PostUsersSignInDataRequest withXPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public PostUsersSignInDataRequest withClientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -123,27 +123,27 @@ public class PostUsersSignInDataRequest { } PostUsersSignInDataRequest other = (PostUsersSignInDataRequest) o; return - Objects.deepEquals(this.xPlexClientIdentifier, other.xPlexClientIdentifier) && + Objects.deepEquals(this.clientID, other.clientID) && Objects.deepEquals(this.requestBody, other.requestBody); } @Override public int hashCode() { return Objects.hash( - xPlexClientIdentifier, + clientID, requestBody); } @Override public String toString() { return Utils.toString(PostUsersSignInDataRequest.class, - "xPlexClientIdentifier", xPlexClientIdentifier, + "clientID", clientID, "requestBody", requestBody); } public final static class Builder { - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); private Optional requestBody = Optional.empty(); @@ -157,9 +157,9 @@ public class PostUsersSignInDataRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.ofNullable(xPlexClientIdentifier); + public Builder clientID(String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.ofNullable(clientID); return this; } @@ -169,9 +169,9 @@ public class PostUsersSignInDataRequest { * (UUID, serial number, or other number unique per device) * */ - public Builder xPlexClientIdentifier(Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public Builder clientID(Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -195,7 +195,7 @@ public class PostUsersSignInDataRequest { public PostUsersSignInDataRequest build() { return new PostUsersSignInDataRequest( - xPlexClientIdentifier, + clientID, requestBody); } } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java index 3033a847..ccb8694d 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/PostUsersSignInDataRequestBuilder.java @@ -10,7 +10,7 @@ import java.util.Optional; public class PostUsersSignInDataRequestBuilder { - private Optional xPlexClientIdentifier = Optional.empty(); + private Optional clientID = Optional.empty(); private Optional requestBody = Optional.empty(); private Optional serverURL = Optional.empty(); private final SDKMethodInterfaces.MethodCallPostUsersSignInData sdk; @@ -19,15 +19,15 @@ public class PostUsersSignInDataRequestBuilder { this.sdk = sdk; } - public PostUsersSignInDataRequestBuilder xPlexClientIdentifier(java.lang.String xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = Optional.of(xPlexClientIdentifier); + public PostUsersSignInDataRequestBuilder clientID(java.lang.String clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = Optional.of(clientID); return this; } - public PostUsersSignInDataRequestBuilder xPlexClientIdentifier(java.util.Optional xPlexClientIdentifier) { - Utils.checkNotNull(xPlexClientIdentifier, "xPlexClientIdentifier"); - this.xPlexClientIdentifier = xPlexClientIdentifier; + public PostUsersSignInDataRequestBuilder clientID(java.util.Optional clientID) { + Utils.checkNotNull(clientID, "clientID"); + this.clientID = clientID; return this; } @@ -58,7 +58,7 @@ public class PostUsersSignInDataRequestBuilder { public PostUsersSignInDataResponse call() throws Exception { return sdk.postUsersSignInData( - xPlexClientIdentifier, + clientID, requestBody, serverURL); } diff --git a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java index 0a38f2a9..937ab924 100644 --- a/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/dev/plexapi/sdk/models/operations/SDKMethodInterfaces.java @@ -4,7 +4,6 @@ package dev.plexapi.sdk.models.operations; -import java.lang.Boolean; import java.lang.Double; import java.lang.Integer; import java.lang.Long; @@ -168,7 +167,7 @@ public class SDKMethodInterfaces { public interface MethodCallGetServerResources { dev.plexapi.sdk.models.operations.GetServerResourcesResponse getServerResources( - Optional xPlexClientIdentifier, + Optional clientID, Optional includeHttps, Optional includeRelay, Optional includeIPv6, @@ -178,16 +177,14 @@ public class SDKMethodInterfaces { public interface MethodCallGetPin { dev.plexapi.sdk.models.operations.GetPinResponse getPin( - Optional strong, - Optional xPlexClientIdentifier, - Optional xPlexProduct, + GetPinRequest request, Optional serverURL) throws Exception; } public interface MethodCallGetTokenByPinId { dev.plexapi.sdk.models.operations.GetTokenByPinIdResponse getTokenByPinId( - Optional xPlexClientIdentifier, + Optional clientID, long pinID, Optional serverURL) throws Exception; } @@ -415,7 +412,7 @@ public class SDKMethodInterfaces { public interface MethodCallPostUsersSignInData { dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse postUsersSignInData( - Optional xPlexClientIdentifier, + Optional clientID, Optional requestBody, Optional serverURL) throws Exception; }