Compare commits

..

5 Commits

Author SHA1 Message Date
speakeasybot
a4a2130978 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1 2025-02-06 00:27:45 +00:00
speakeasybot
f33408b177 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.484.1 2025-02-05 00:27:30 +00:00
speakeasybot
22654201f5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.476.1 2025-01-27 00:28:08 +00:00
speakeasybot
9dc8821b31 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.474.0 2025-01-24 00:27:12 +00:00
speakeasybot
412b27f162 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2 2024-12-22 00:30:11 +00:00
154 changed files with 12117 additions and 1187 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.speakeasy/reports
# Ignore Gradle project-specific cache directory
.gradle
# Ignore Gradle build output directory

File diff suppressed because one or more lines are too long

View File

@@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
java:
version: 0.11.0
version: 0.11.5
additionalDependencies: []
additionalPlugins: []
artifactID: plexapi

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.459.2
speakeasyVersion: 1.484.1
sources:
my-source:
sourceNamespace: my-source
@@ -8,19 +8,19 @@ sources:
- latest
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:ccba0c42f1644923e2209e28da7a78195a843e48da1aeaaedbf8759f1a8a0fe0
sourceBlobDigest: sha256:b362c110ef633288220a55ab50627374b996c64f2d9b8e020944e84ea2840332
sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae
sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9
tags:
- latest
- speakeasy-sdk-regen-1734740746
- speakeasy-sdk-regen-1738801581
targets:
plexjava:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:ccba0c42f1644923e2209e28da7a78195a843e48da1aeaaedbf8759f1a8a0fe0
sourceBlobDigest: sha256:b362c110ef633288220a55ab50627374b996c64f2d9b8e020944e84ea2840332
sourceRevisionDigest: sha256:e6ab335dd91a4165f4510e4a3af8a55819c6310b7e66251266d2384376f3ccae
sourceBlobDigest: sha256:89d1b1133e400c89f0d06efe5e5168f5ba25a413e1ab8380d442d6b233e2e5a9
codeSamplesNamespace: code-samples-java-plexjava
codeSamplesRevisionDigest: sha256:0612fff80a5399294636de519c9d3e8c24207624718af53454fe4d57a0a714e0
codeSamplesRevisionDigest: sha256:85b9a83c615e20272177b4b49152c959df250bf45bc141a4652d71090ec72db7
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest

View File

@@ -69,7 +69,7 @@ The samples below show how a published SDK artifact is used:
Gradle:
```groovy
implementation 'dev.plexapi:plexapi:0.11.0'
implementation 'dev.plexapi:plexapi:0.11.5'
```
Maven:
@@ -77,7 +77,7 @@ Maven:
<dependency>
<groupId>dev.plexapi</groupId>
<artifactId>plexapi</artifactId>
<version>0.11.0</version>
<version>0.11.5</version>
</dependency>
```
@@ -171,6 +171,8 @@ public class Application {
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library
* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
* [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
* [getMetaDataByRatingKey](docs/sdks/library/README.md#getmetadatabyratingkey) - Get Metadata by RatingKey
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
@@ -251,6 +253,10 @@ public class Application {
* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates
* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates
### [users()](docs/sdks/users/README.md)
* [getUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users
### [video()](docs/sdks/video/README.md)
* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item

View File

@@ -188,4 +188,54 @@ Based on:
### Generated
- [java v0.11.0] .
### Releases
- [Maven Central v0.11.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.0 - .
- [Maven Central v0.11.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.0 - .
## 2024-12-22 00:28:49
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.11.1] .
### Releases
- [Maven Central v0.11.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.1 - .
## 2025-01-24 00:25:37
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.474.0 (2.495.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.11.2] .
### Releases
- [Maven Central v0.11.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.2 - .
## 2025-01-27 00:26:34
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.476.1 (2.495.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.11.3] .
### Releases
- [Maven Central v0.11.3] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.3 - .
## 2025-02-05 00:25:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.11.4] .
### Releases
- [Maven Central v0.11.4] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.4 - .
## 2025-02-06 00:26:06
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.11.5] .
### Releases
- [Maven Central v0.11.5] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.11.5 - .

View File

@@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
}
group = "dev.plexapi"
version = "0.11.0"
version = "0.11.5"
sourcesJar {
archiveBaseName = "plexapi"
@@ -101,7 +101,7 @@ publishing {
maven(MavenPublication) {
groupId = 'dev.plexapi'
artifactId = 'plexapi'
version = '0.11.0'
version = '0.11.5'
from components.java
@@ -144,6 +144,8 @@ if (!project.hasProperty('skip.signing')) {
}
}
dependencies {
api 'com.fasterxml.jackson.core:jackson-annotations:2.18.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
@@ -154,6 +156,4 @@ dependencies {
implementation 'commons-io:commons-io:2.18.0'
}
apply from: 'build-extras.gradle'

View File

@@ -624,7 +624,6 @@ actions:
import dev.plexapi.plexapi.PlexAPI;
import dev.plexapi.plexapi.models.operations.GetRecentlyAddedRequest;
import dev.plexapi.plexapi.models.operations.GetRecentlyAddedResponse;
import dev.plexapi.plexapi.models.operations.IncludeMeta;
import dev.plexapi.plexapi.models.operations.Type;
import java.lang.Exception;
@@ -640,9 +639,6 @@ actions:
.contentDirectoryID(470161L)
.type(Type.TvShow)
.sectionID(2L)
.includeMeta(IncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded()
@@ -678,7 +674,7 @@ actions:
PerformSearchResponse res = sdk.search().performSearch()
.query("dylan")
.sectionId(9487.87d)
.sectionId(9487.88d)
.limit(5d)
.call();
@@ -709,7 +705,7 @@ actions:
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
.query("dead+poop")
.sectionId(4094.80d)
.sectionId(4094.8d)
.limit(5d)
.call();
@@ -936,7 +932,7 @@ actions:
.build();
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
.ratingKey(1539.15d)
.ratingKey(1539.14d)
.includeElements("Stream")
.call();
@@ -1029,7 +1025,6 @@ actions:
import dev.plexapi.plexapi.models.errors.GetRecentlyAddedLibraryUnauthorized;
import dev.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryRequest;
import dev.plexapi.plexapi.models.operations.GetRecentlyAddedLibraryResponse;
import dev.plexapi.plexapi.models.operations.QueryParamIncludeMeta;
import dev.plexapi.plexapi.models.operations.QueryParamType;
import java.lang.Exception;
import java.util.List;
@@ -1059,9 +1054,6 @@ actions:
16L,
17L))
.sectionID(2L)
.includeMeta(QueryParamIncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary()
@@ -1086,8 +1078,6 @@ actions:
import dev.plexapi.plexapi.models.errors.GetSearchAllLibrariesUnauthorized;
import dev.plexapi.plexapi.models.operations.GetSearchAllLibrariesRequest;
import dev.plexapi.plexapi.models.operations.GetSearchAllLibrariesResponse;
import dev.plexapi.plexapi.models.operations.QueryParamIncludeCollections;
import dev.plexapi.plexapi.models.operations.QueryParamIncludeExternalMedia;
import dev.plexapi.plexapi.models.operations.SearchTypes;
import java.lang.Exception;
import java.util.List;
@@ -1105,8 +1095,6 @@ actions:
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
.searchTypes(List.of(
SearchTypes.PEOPLE))
.includeCollections(QueryParamIncludeCollections.Enable)
.includeExternalMedia(QueryParamIncludeExternalMedia.Enable)
.build();
GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries()
@@ -1175,8 +1163,6 @@ actions:
GetWatchListRequest req = GetWatchListRequest.builder()
.filter(Filter.AVAILABLE)
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetWatchListResponse res = sdk.watchlist().getWatchList()
@@ -1245,6 +1231,68 @@ actions:
.sectionKey(9518)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}
- target: $["paths"]["/library/sections/{sectionKey}/country"]["get"]
update:
x-codeSamples:
- lang: java
label: library
source: |-
package hello.world;
import dev.plexapi.plexapi.PlexAPI;
import dev.plexapi.plexapi.models.errors.GetCountriesLibraryBadRequest;
import dev.plexapi.plexapi.models.errors.GetCountriesLibraryUnauthorized;
import dev.plexapi.plexapi.models.operations.GetCountriesLibraryResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary()
.sectionKey(9518)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}
- target: $["paths"]["/library/sections/{sectionKey}/genre"]["get"]
update:
x-codeSamples:
- lang: java
label: library
source: |-
package hello.world;
import dev.plexapi.plexapi.PlexAPI;
import dev.plexapi.plexapi.models.errors.GetGenresLibraryBadRequest;
import dev.plexapi.plexapi.models.errors.GetGenresLibraryUnauthorized;
import dev.plexapi.plexapi.models.operations.GetGenresLibraryResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
GetGenresLibraryResponse res = sdk.library().getGenresLibrary()
.sectionKey(9518)
.call();
if (res.object().isPresent()) {
// handle response
}
@@ -1325,11 +1373,9 @@ actions:
import dev.plexapi.plexapi.PlexAPI;
import dev.plexapi.plexapi.models.errors.GetLibraryItemsBadRequest;
import dev.plexapi.plexapi.models.errors.GetLibraryItemsUnauthorized;
import dev.plexapi.plexapi.models.operations.GetLibraryItemsQueryParamIncludeMeta;
import dev.plexapi.plexapi.models.operations.GetLibraryItemsQueryParamType;
import dev.plexapi.plexapi.models.operations.GetLibraryItemsRequest;
import dev.plexapi.plexapi.models.operations.GetLibraryItemsResponse;
import dev.plexapi.plexapi.models.operations.IncludeGuids;
import dev.plexapi.plexapi.models.operations.Tag;
import java.lang.Exception;
@@ -1344,11 +1390,7 @@ actions:
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
.tag(Tag.EDITION)
.sectionKey(9518)
.includeGuids(IncludeGuids.Enable)
.type(GetLibraryItemsQueryParamType.TvShow)
.includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
@@ -1823,7 +1865,7 @@ actions:
.build();
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
.playlistID(3915.00d)
.playlistID(3915d)
.title("<value>")
.summary("<value>")
.call();
@@ -1916,7 +1958,7 @@ actions:
.build();
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
.playlistID(8502.00d)
.playlistID(8502.01d)
.uri("server://12345/com.plexapp.plugins.library/library/metadata/1")
.playQueueID(123d)
.call();
@@ -2425,6 +2467,53 @@ actions:
}
}
}
- target: $["paths"]["/users"]["get"]
update:
x-codeSamples:
- lang: java
label: users
source: |-
package hello.world;
import dev.plexapi.plexapi.PlexAPI;
import dev.plexapi.plexapi.models.errors.GetUsersBadRequest;
import dev.plexapi.plexapi.models.errors.GetUsersUnauthorized;
import dev.plexapi.plexapi.models.operations.GetUsersRequest;
import dev.plexapi.plexapi.models.operations.GetUsersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GetUsersBadRequest, GetUsersUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.build();
GetUsersRequest req = GetUsersRequest.builder()
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.clientName("Plex for Roku")
.deviceNickname("Roku 3")
.deviceName("Chrome")
.deviceScreenResolution("1487x1165,2560x1440")
.clientVersion("2.4.1")
.platform("Roku")
.clientFeatures("external-media,indirect-media,hub-style-list")
.model("4200X")
.xPlexSessionId("97e136ef-4ddd-4ff3-89a7-a5820c96c2ca")
.xPlexLanguage("en")
.platformVersion("4.3 build 1057")
.build();
GetUsersResponse res = sdk.users().getUsers()
.request(req)
.call();
if (res.body().isPresent()) {
// handle response
}
}
}
- target: $["paths"]["/users/signin"]["post"]
update:
x-codeSamples:

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `errors` | List\<[GetCountriesLibraryErrors](../../models/errors/GetCountriesLibraryErrors.md)> | :heavy_minus_sign: | N/A |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *Optional\<String>* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *Optional\<String>* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `errors` | List\<[GetCountriesLibraryLibraryErrors](../../models/errors/GetCountriesLibraryLibraryErrors.md)> | :heavy_minus_sign: | N/A |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `errors` | List\<[GetGenresLibraryErrors](../../models/errors/GetGenresLibraryErrors.md)> | :heavy_minus_sign: | N/A |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *Optional\<String>* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryLibraryErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *Optional\<String>* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `errors` | List\<[GetGenresLibraryLibraryErrors](../../models/errors/GetGenresLibraryLibraryErrors.md)> | :heavy_minus_sign: | N/A |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,11 @@
# GetUsersBadRequest
Bad Request - A parameter was not specified, or was specified incorrectly.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `errors` | List\<[GetUsersErrors](../../models/errors/GetUsersErrors.md)> | :heavy_minus_sign: | N/A |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetUsersErrors
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `code` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1000 |
| `message` | *Optional\<String>* | :heavy_minus_sign: | N/A | X-Plex-Client-Identifier is missing |
| `status` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 400 |

View File

@@ -0,0 +1,11 @@
# GetUsersUnauthorized
Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `errors` | List\<[GetUsersUsersErrors](../../models/errors/GetUsersUsersErrors.md)> | :heavy_minus_sign: | N/A |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |

View File

@@ -0,0 +1,10 @@
# GetUsersUsersErrors
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `code` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1001 |
| `message` | *Optional\<String>* | :heavy_minus_sign: | N/A | User could not be authenticated |
| `status` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 401 |

View File

@@ -0,0 +1,11 @@
# AllLibraries
Indicates if the user has access to all libraries.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowCameraUpload
Indicates if the user is allowed to upload from a camera.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowChannels
Indicates if the user has access to channels.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowSubtitleAdmin
Indicates if the user can manage subtitles.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowSync
Indicates if the user is allowed to sync media.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# AllowTuners
Indicates if the user is allowed to use tuners.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# EnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |

View File

@@ -0,0 +1,12 @@
# EpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |

View File

@@ -1,9 +1,12 @@
# FlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Values
| Name | Value |
| ------- | ------- |
| `False` | 0 |
| `True` | 1 |
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `fastKey` | *String* | :heavy_check_mark: | N/A | /library/sections/2/all?country=15491 |
| `key` | *String* | :heavy_check_mark: | N/A | 15491 |
| `title` | *String* | :heavy_check_mark: | N/A | Japan |

View File

@@ -0,0 +1,22 @@
# GetCountriesLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `size` | *double* | :heavy_check_mark: | N/A | 50 |
| `offset` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | |
| `totalSize` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | |
| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `content` | *String* | :heavy_check_mark: | N/A | secondary |
| `mediaTagPrefix` | *String* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `mediaTagVersion` | *long* | :heavy_check_mark: | N/A | 1734362201 |
| `nocache` | *boolean* | :heavy_check_mark: | N/A | true |
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `title1` | *String* | :heavy_check_mark: | N/A | TV Series |
| `title2` | *String* | :heavy_check_mark: | N/A | By Country |
| `viewGroup` | *String* | :heavy_check_mark: | N/A | secondary |
| `directory` | List\<[GetCountriesLibraryDirectory](../../models/operations/GetCountriesLibraryDirectory.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetCountriesLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetCountriesLibraryResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [Optional\<GetCountriesLibraryResponseBody>](../../models/operations/GetCountriesLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetCountriesLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `mediaContainer` | [Optional\<GetCountriesLibraryMediaContainer>](../../models/operations/GetCountriesLibraryMediaContainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryDirectory
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `fastKey` | *String* | :heavy_check_mark: | N/A | /library/sections/10/all?genre=89 |
| `key` | *String* | :heavy_check_mark: | N/A | 89 |
| `title` | *String* | :heavy_check_mark: | N/A | Action |
| `type` | *String* | :heavy_check_mark: | N/A | genre |

View File

@@ -0,0 +1,22 @@
# GetGenresLibraryMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `size` | *double* | :heavy_check_mark: | N/A | 50 |
| `offset` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | |
| `totalSize` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | |
| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.library |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/show-fanart.jpg |
| `content` | *String* | :heavy_check_mark: | N/A | secondary |
| `mediaTagPrefix` | *String* | :heavy_check_mark: | N/A | /system/bundle/media/flags/ |
| `mediaTagVersion` | *long* | :heavy_check_mark: | N/A | 1734362201 |
| `nocache` | *boolean* | :heavy_check_mark: | N/A | true |
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/show.png |
| `title1` | *String* | :heavy_check_mark: | N/A | TV Shows (Reality) |
| `title2` | *String* | :heavy_check_mark: | N/A | By Genre |
| `viewGroup` | *String* | :heavy_check_mark: | N/A | secondary |
| `directory` | List\<[GetGenresLibraryDirectory](../../models/operations/GetGenresLibraryDirectory.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetGenresLibraryRequest
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,11 @@
# GetGenresLibraryResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [Optional\<GetGenresLibraryResponseBody>](../../models/operations/GetGenresLibraryResponseBody.md) | :heavy_minus_sign: | Successful response containing media container data. |

View File

@@ -0,0 +1,10 @@
# GetGenresLibraryResponseBody
Successful response containing media container data.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `mediaContainer` | [Optional\<GetGenresLibraryMediaContainer>](../../models/operations/GetGenresLibraryMediaContainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# GetLibraryItemsEnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |

View File

@@ -0,0 +1,12 @@
# GetLibraryItemsEpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |

View File

@@ -1,9 +1,12 @@
# GetLibraryItemsFlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Values
| Name | Value |
| ------- | ------- |
| `False` | 0 |
| `True` | 1 |
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |

View File

@@ -23,8 +23,10 @@
| `year` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `seasonCount` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `tagline` | *Optional\<String>* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `flattenSeasons` | [Optional\<GetLibraryItemsFlattenSeasons>](../../models/operations/GetLibraryItemsFlattenSeasons.md) | :heavy_minus_sign: | N/A | 1 |
| `showOrdering` | [Optional\<GetLibraryItemsShowOrdering>](../../models/operations/GetLibraryItemsShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `flattenSeasons` | [Optional\<GetLibraryItemsFlattenSeasons>](../../models/operations/GetLibraryItemsFlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `episodeSort` | [Optional\<GetLibraryItemsEpisodeSort>](../../models/operations/GetLibraryItemsEpisodeSort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `enableCreditsMarkerGeneration` | [Optional\<GetLibraryItemsEnableCreditsMarkerGeneration>](../../models/operations/GetLibraryItemsEnableCreditsMarkerGeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `showOrdering` | [Optional\<GetLibraryItemsShowOrdering>](../../models/operations/GetLibraryItemsShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>aired = TheTVDB (Aired),<br/>dvd = TheTVDB (DVD),<br/>absolute = TheTVDB (Absolute)).<br/> | absolute |
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `banner` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -1,11 +1,11 @@
# GetLibraryItemsShowOrdering
Setting that indicates the episode ordering for the show
Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
@@ -15,6 +15,6 @@ tvdbAbsolute = TheTVDB (Absolute)).
| -------------- | -------------- |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `TvdbAiring` | tvdbAiring |
| `TvdbDvd` | tvdbDvd |
| `TvdbAbsolute` | tvdbAbsolute |
| `TvdbAired` | aired |
| `TvdbDvd` | dvd |
| `TvdbAbsolute` | absolute |

View File

@@ -9,6 +9,6 @@
| `offset` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | |
| `totalSize` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | |
| `identifier` | *Optional\<String>* | :heavy_minus_sign: | N/A | com.plexapp.plugins.library |
| `allowSync` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | |
| `allowSync` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
| `meta` | [Optional\<Meta>](../../models/operations/Meta.md) | :heavy_minus_sign: | The Meta object is only included in the response if the `includeMeta` parameter is set to `1`.<br/> | |
| `metadata` | List\<[GetRecentlyAddedMetadata](../../models/operations/GetRecentlyAddedMetadata.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -23,8 +23,10 @@
| `year` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `seasonCount` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `tagline` | *Optional\<String>* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `flattenSeasons` | [Optional\<FlattenSeasons>](../../models/operations/FlattenSeasons.md) | :heavy_minus_sign: | N/A | 1 |
| `showOrdering` | [Optional\<ShowOrdering>](../../models/operations/ShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `flattenSeasons` | [Optional\<FlattenSeasons>](../../models/operations/FlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `episodeSort` | [Optional\<EpisodeSort>](../../models/operations/EpisodeSort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `enableCreditsMarkerGeneration` | [Optional\<EnableCreditsMarkerGeneration>](../../models/operations/EnableCreditsMarkerGeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `showOrdering` | [Optional\<ShowOrdering>](../../models/operations/ShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>aired = TheTVDB (Aired),<br/>dvd = TheTVDB (DVD),<br/>absolute = TheTVDB (Absolute)).<br/> | absolute |
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `banner` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -0,0 +1,11 @@
# GetSearchAllLibrariesEnableCreditsMarkerGeneration
Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Disabled` | 0 |

View File

@@ -0,0 +1,12 @@
# GetSearchAllLibrariesEpisodeSort
Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
## Values
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `OldestFirst` | 0 |
| `NewestFirst` | 1 |

View File

@@ -1,9 +1,12 @@
# GetSearchAllLibrariesFlattenSeasons
Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
## Values
| Name | Value |
| ------- | ------- |
| `False` | 0 |
| `True` | 1 |
| Name | Value |
| ---------------- | ---------------- |
| `LibraryDefault` | -1 |
| `Hide` | 0 |
| `Show` | 1 |

View File

@@ -23,8 +23,10 @@
| `year` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `seasonCount` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2022 |
| `tagline` | *Optional\<String>* | :heavy_minus_sign: | N/A | Return to Pandora. |
| `flattenSeasons` | [Optional\<GetSearchAllLibrariesFlattenSeasons>](../../models/operations/GetSearchAllLibrariesFlattenSeasons.md) | :heavy_minus_sign: | N/A | 1 |
| `showOrdering` | [Optional\<GetSearchAllLibrariesShowOrdering>](../../models/operations/GetSearchAllLibrariesShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>tvdbAiring = TheTVDB (Aired),<br/>tvdbDvd = TheTVDB (DVD),<br/>tvdbAbsolute = TheTVDB (Absolute)).<br/> | tvdbDvd |
| `flattenSeasons` | [Optional\<GetSearchAllLibrariesFlattenSeasons>](../../models/operations/GetSearchAllLibrariesFlattenSeasons.md) | :heavy_minus_sign: | Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show). | 1 |
| `episodeSort` | [Optional\<GetSearchAllLibrariesEpisodeSort>](../../models/operations/GetSearchAllLibrariesEpisodeSort.md) | :heavy_minus_sign: | Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first). | 0 |
| `enableCreditsMarkerGeneration` | [Optional\<GetSearchAllLibrariesEnableCreditsMarkerGeneration>](../../models/operations/GetSearchAllLibrariesEnableCreditsMarkerGeneration.md) | :heavy_minus_sign: | Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled). | -1 |
| `showOrdering` | [Optional\<GetSearchAllLibrariesShowOrdering>](../../models/operations/GetSearchAllLibrariesShowOrdering.md) | :heavy_minus_sign: | Setting that indicates the episode ordering for the show.<br/>None = Library default,<br/>tmdbAiring = The Movie Database (Aired),<br/>aired = TheTVDB (Aired),<br/>dvd = TheTVDB (DVD),<br/>absolute = TheTVDB (Absolute)).<br/> | absolute |
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/thumb/1703239236 |
| `art` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/art/1703239236 |
| `banner` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/58683/banner/1703239236 |

View File

@@ -1,11 +1,11 @@
# GetSearchAllLibrariesShowOrdering
Setting that indicates the episode ordering for the show
Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
@@ -15,6 +15,6 @@ tvdbAbsolute = TheTVDB (Absolute)).
| -------------- | -------------- |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `TvdbAiring` | tvdbAiring |
| `TvdbDvd` | tvdbDvd |
| `TvdbAbsolute` | tvdbAbsolute |
| `TvdbAired` | aired |
| `TvdbDvd` | dvd |
| `TvdbAbsolute` | absolute |

View File

@@ -3,42 +3,43 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `addedAt` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1705543312 |
| `art` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `duration` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 186240 |
| `grandparentArt` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `grandparentGuid` | *Optional\<String>* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 |
| `grandparentKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904 |
| `grandparentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 39904 |
| `grandparentThumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 |
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Green Day |
| `guid` | *Optional\<String>* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f |
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1 |
| `key` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67085 |
| `librarySectionID` | *Optional\<String>* | :heavy_minus_sign: | N/A | 3 |
| `librarySectionKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/sections/3 |
| `librarySectionTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Music |
| `musicAnalysisVersion` | *Optional\<String>* | :heavy_minus_sign: | N/A | 1 |
| `parentGuid` | *Optional\<String>* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 |
| `parentIndex` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1 |
| `parentKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67084 |
| `parentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 67084 |
| `parentStudio` | *Optional\<String>* | :heavy_minus_sign: | N/A | Reprise Records |
| `parentThumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Saviors |
| `parentYear` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2024 |
| `ratingCount` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 45885 |
| `ratingKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 67085 |
| `sessionKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 203 |
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `title` | *Optional\<String>* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me |
| `titleSort` | *Optional\<String>* | :heavy_minus_sign: | N/A | American Dream Is Killing Me |
| `type` | *Optional\<String>* | :heavy_minus_sign: | N/A | track |
| `updatedAt` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1705543314 |
| `viewOffset` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1000 |
| `media` | List\<[GetSessionsMedia](../../models/operations/GetSessionsMedia.md)> | :heavy_minus_sign: | N/A | |
| `user` | [Optional\<GetSessionsUser>](../../models/operations/GetSessionsUser.md) | :heavy_minus_sign: | N/A | |
| `player` | [Optional\<Player>](../../models/operations/Player.md) | :heavy_minus_sign: | N/A | |
| `session` | [Optional\<Session>](../../models/operations/Session.md) | :heavy_minus_sign: | N/A | |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `addedAt` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1705543312 |
| `art` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `duration` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 186240 |
| `grandparentArt` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904/art/1705310687 |
| `grandparentGuid` | *Optional\<String>* | :heavy_minus_sign: | N/A | plex://artist/5d07bbfd403c6402904a6480 |
| `grandparentKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904 |
| `grandparentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 39904 |
| `grandparentThumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/39904/thumb/1705310687 |
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Green Day |
| `guid` | *Optional\<String>* | :heavy_minus_sign: | N/A | plex://track/6535834f71f22f36f71a8e8f |
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1 |
| `key` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67085 |
| `librarySectionID` | *Optional\<String>* | :heavy_minus_sign: | N/A | 3 |
| `librarySectionKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/sections/3 |
| `librarySectionTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Music |
| `musicAnalysisVersion` | *Optional\<String>* | :heavy_minus_sign: | N/A | 1 |
| `originalTitle` | *Optional\<String>* | :heavy_minus_sign: | The original untranslated name of the media item when non-english, or the track artist if an audio Item has an album artist | The American Dream Is Killing Me |
| `parentGuid` | *Optional\<String>* | :heavy_minus_sign: | N/A | plex://album/65394d6d472b8ab03ef47f12 |
| `parentIndex` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1 |
| `parentKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67084 |
| `parentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 67084 |
| `parentStudio` | *Optional\<String>* | :heavy_minus_sign: | N/A | Reprise Records |
| `parentThumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Saviors |
| `parentYear` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 2024 |
| `ratingCount` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 45885 |
| `ratingKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 67085 |
| `sessionKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | 203 |
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/67084/thumb/1705543314 |
| `title` | *Optional\<String>* | :heavy_minus_sign: | N/A | The American Dream Is Killing Me |
| `titleSort` | *Optional\<String>* | :heavy_minus_sign: | N/A | American Dream Is Killing Me |
| `type` | *Optional\<String>* | :heavy_minus_sign: | N/A | track |
| `updatedAt` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1705543314 |
| `viewOffset` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1000 |
| `media` | List\<[GetSessionsMedia](../../models/operations/GetSessionsMedia.md)> | :heavy_minus_sign: | N/A | |
| `user` | [Optional\<GetSessionsUser>](../../models/operations/GetSessionsUser.md) | :heavy_minus_sign: | N/A | |
| `player` | [Optional\<Player>](../../models/operations/Player.md) | :heavy_minus_sign: | N/A | |
| `session` | [Optional\<Session>](../../models/operations/Session.md) | :heavy_minus_sign: | N/A | |

View File

@@ -36,4 +36,4 @@
| `country` | List\<[GetTopWatchedContentCountry](../../models/operations/GetTopWatchedContentCountry.md)> | :heavy_minus_sign: | N/A | |
| `guids` | List\<[GetTopWatchedContentGuids](../../models/operations/GetTopWatchedContentGuids.md)> | :heavy_minus_sign: | N/A | |
| `role` | List\<[GetTopWatchedContentRole](../../models/operations/GetTopWatchedContentRole.md)> | :heavy_minus_sign: | N/A | |
| `user` | List\<[User](../../models/operations/User.md)> | :heavy_minus_sign: | N/A | |
| `user` | List\<[GetTopWatchedContentUser](../../models/operations/GetTopWatchedContentUser.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -0,0 +1,8 @@
# GetTopWatchedContentUser
## Fields
| Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
| `id` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 220 |

View File

@@ -0,0 +1,15 @@
# GetUsersMediaContainer
Container holding user and server details.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `friendlyName` | *String* | :heavy_check_mark: | The friendly name of the Plex instance. | myPlex |
| `identifier` | *String* | :heavy_check_mark: | N/A | com.plexapp.plugins.myplex |
| `machineIdentifier` | *String* | :heavy_check_mark: | Unique Machine identifier of the Plex server. | 3dff4c4da3b1229a649aa574a9e2b419a684a20e |
| `totalSize` | *long* | :heavy_check_mark: | Total number of users. | 30 |
| `size` | *long* | :heavy_check_mark: | Number of users in the current response. | 30 |
| `user` | List\<[User](../../models/operations/User.md)> | :heavy_check_mark: | List of users with access to the Plex server. | |

View File

@@ -0,0 +1,20 @@
# GetUsersRequest
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientID` | *String* | :heavy_check_mark: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
| `clientName` | *Optional\<String>* | :heavy_minus_sign: | The name of the client application. (Plex Web, Plex Media Server, etc.) | Plex for Roku |
| `deviceNickname` | *Optional\<String>* | :heavy_minus_sign: | A relatively friendly name for the client device | Roku 3 |
| `deviceName` | *Optional\<String>* | :heavy_minus_sign: | The name of the device the client application is running on. This is used to track the client application and its usage. (Chrome, Safari, etc.) | Chrome |
| `deviceScreenResolution` | *Optional\<String>* | :heavy_minus_sign: | The resolution of the device the client application is running on. This is used to track the client application and its usage. (1487x1165,2560x1440) | 1487x1165,2560x1440 |
| `clientVersion` | *Optional\<String>* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
| `platform` | *Optional\<String>* | :heavy_minus_sign: | The platform of the client application. | Roku |
| `clientFeatures` | *Optional\<String>* | :heavy_minus_sign: | The features of the client application. This is used to track the client application and its usage. (external-media,indirect-media,hub-style-list) | external-media,indirect-media,hub-style-list |
| `model` | *Optional\<String>* | :heavy_minus_sign: | A potentially less friendly identifier for the device model | 4200X |
| `xPlexSessionId` | *Optional\<String>* | :heavy_minus_sign: | The session ID of the client application. This is used to track the client application and its usage. (97e136ef-4ddd-4ff3-89a7-a5820c96c2ca) | 97e136ef-4ddd-4ff3-89a7-a5820c96c2ca |
| `xPlexLanguage` | *Optional\<String>* | :heavy_minus_sign: | The language of the client application. | en |
| `platformVersion` | *Optional\<String>* | :heavy_minus_sign: | The version of the platform | 4.3 build 1057 |
| `xPlexToken` | *String* | :heavy_check_mark: | An authentication token, obtained from plex.tv | CV5xoxjTpFKUzBTShsaf |

View File

@@ -0,0 +1,11 @@
# GetUsersResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `body` | *Optional\<byte[]>* | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,10 @@
# GetUsersResponseBody
Successful response with media container data in XML
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `mediaContainer` | [Optional\<GetUsersMediaContainer>](../../models/operations/GetUsersMediaContainer.md) | :heavy_minus_sign: | Container holding user and server details. |

View File

@@ -0,0 +1,16 @@
# GetUsersServer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `id` | *long* | :heavy_check_mark: | Unique ID of the server of the connected user | 907759180 |
| `serverId` | *long* | :heavy_check_mark: | ID of the actual Plex server. | 9999999 |
| `machineIdentifier` | *String* | :heavy_check_mark: | Machine identifier of the Plex server. | fbb8aa6be6e0c997c6268bc2b4431c8807f70a3 |
| `name` | *String* | :heavy_check_mark: | Name of the Plex server of the connected user. | ConnectedUserFlix |
| `lastSeenAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
| `numLibraries` | *long* | :heavy_check_mark: | Number of libraries in the server this user has access to. | 16 |
| `allLibraries` | [Optional\<AllLibraries>](../../models/operations/AllLibraries.md) | :heavy_minus_sign: | N/A | 1 |
| `owned` | [Optional\<Owned>](../../models/operations/Owned.md) | :heavy_minus_sign: | N/A | 1 |
| `pending` | [Optional\<Pending>](../../models/operations/Pending.md) | :heavy_minus_sign: | N/A | 1 |

View File

@@ -0,0 +1,11 @@
# Home
Indicates if the user is part of a home group.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# Owned
Indicates if the user owns the server.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# Pending
Indicates if the server is pending approval.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# Protected
Indicates whether the account is protected.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -0,0 +1,11 @@
# Restricted
Indicates if the user has restricted access.
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -1,11 +1,11 @@
# ShowOrdering
Setting that indicates the episode ordering for the show
Setting that indicates the episode ordering for the show.
None = Library default,
tmdbAiring = The Movie Database (Aired),
tvdbAiring = TheTVDB (Aired),
tvdbDvd = TheTVDB (DVD),
tvdbAbsolute = TheTVDB (Absolute)).
aired = TheTVDB (Aired),
dvd = TheTVDB (DVD),
absolute = TheTVDB (Absolute)).
@@ -15,6 +15,6 @@ tvdbAbsolute = TheTVDB (Absolute)).
| -------------- | -------------- |
| `None` | None |
| `TmdbAiring` | tmdbAiring |
| `TvdbAiring` | tvdbAiring |
| `TvdbDvd` | tvdbDvd |
| `TvdbAbsolute` | tvdbAbsolute |
| `TvdbAired` | aired |
| `TvdbDvd` | dvd |
| `TvdbAbsolute` | absolute |

View File

@@ -3,6 +3,25 @@
## Fields
| Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
| `id` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 220 |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `id` | *long* | :heavy_check_mark: | User's unique ID. | 22526914 |
| `title` | *String* | :heavy_check_mark: | User's display name. | Plex User |
| `username` | *String* | :heavy_check_mark: | User's username. | zgfuc7krcqfimrmb9lsl5j |
| `email` | *String* | :heavy_check_mark: | User's email address. | zgfuc7krcqfimrmb9lsl5j@protonmail.com |
| `recommendationsPlaylistId` | *JsonNullable\<String>* | :heavy_minus_sign: | ID of the user's recommendation playlist. | |
| `thumb` | *String* | :heavy_check_mark: | URL to the user's avatar image. | https://plex.tv/users/3346028014e93acd/avatar?c=1731605021 |
| `protected_` | [Optional\<Protected>](../../models/operations/Protected.md) | :heavy_minus_sign: | N/A | 1 |
| `home` | [Optional\<Home>](../../models/operations/Home.md) | :heavy_minus_sign: | N/A | 1 |
| `allowTuners` | [Optional\<AllowTuners>](../../models/operations/AllowTuners.md) | :heavy_minus_sign: | N/A | 1 |
| `allowSync` | [Optional\<AllowSync>](../../models/operations/AllowSync.md) | :heavy_minus_sign: | N/A | 1 |
| `allowCameraUpload` | [Optional\<AllowCameraUpload>](../../models/operations/AllowCameraUpload.md) | :heavy_minus_sign: | N/A | 1 |
| `allowChannels` | [Optional\<AllowChannels>](../../models/operations/AllowChannels.md) | :heavy_minus_sign: | N/A | 1 |
| `allowSubtitleAdmin` | [Optional\<AllowSubtitleAdmin>](../../models/operations/AllowSubtitleAdmin.md) | :heavy_minus_sign: | N/A | 1 |
| `filterAll` | *JsonNullable\<String>* | :heavy_minus_sign: | Filters applied for all content. | |
| `filterMovies` | *JsonNullable\<String>* | :heavy_minus_sign: | Filters applied for movies. | |
| `filterMusic` | *JsonNullable\<String>* | :heavy_minus_sign: | Filters applied for music. | |
| `filterPhotos` | *JsonNullable\<String>* | :heavy_minus_sign: | Filters applied for photos. | |
| `filterTelevision` | *Optional\<String>* | :heavy_minus_sign: | Filters applied for television. | |
| `restricted` | [Optional\<Restricted>](../../models/operations/Restricted.md) | :heavy_minus_sign: | N/A | 1 |
| `server` | List\<[GetUsersServer](../../models/operations/GetUsersServer.md)> | :heavy_check_mark: | List of servers owned by the user. | |

View File

@@ -80,7 +80,6 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedRequest;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedResponse;
import dev.plexapi.sdk.models.operations.IncludeMeta;
import dev.plexapi.sdk.models.operations.Type;
import java.lang.Exception;
@@ -96,9 +95,6 @@ public class Application {
.contentDirectoryID(470161L)
.type(Type.TvShow)
.sectionID(2L)
.includeMeta(IncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded()

View File

@@ -16,6 +16,8 @@ API Calls interacting with Plex Media Server Libraries
* [getLibraryItems](#getlibraryitems) - Get Library Items
* [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [getSearchLibrary](#getsearchlibrary) - Search Library
* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media
* [getCountriesLibrary](#getcountrieslibrary) - Get Countries of library media
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
* [getMetaDataByRatingKey](#getmetadatabyratingkey) - Get Metadata by RatingKey
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
@@ -89,7 +91,6 @@ import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetRecentlyAddedLibraryUnauthorized;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryRequest;
import dev.plexapi.sdk.models.operations.GetRecentlyAddedLibraryResponse;
import dev.plexapi.sdk.models.operations.QueryParamIncludeMeta;
import dev.plexapi.sdk.models.operations.QueryParamType;
import java.lang.Exception;
import java.util.List;
@@ -119,9 +120,6 @@ public class Application {
16L,
17L))
.sectionID(2L)
.includeMeta(QueryParamIncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary()
@@ -381,11 +379,9 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryItemsUnauthorized;
import dev.plexapi.sdk.models.operations.GetLibraryItemsQueryParamIncludeMeta;
import dev.plexapi.sdk.models.operations.GetLibraryItemsQueryParamType;
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest;
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
import dev.plexapi.sdk.models.operations.IncludeGuids;
import dev.plexapi.sdk.models.operations.Tag;
import java.lang.Exception;
@@ -400,11 +396,7 @@ public class Application {
GetLibraryItemsRequest req = GetLibraryItemsRequest.builder()
.tag(Tag.EDITION)
.sectionKey(9518)
.includeGuids(IncludeGuids.Enable)
.type(GetLibraryItemsQueryParamType.TvShow)
.includeMeta(GetLibraryItemsQueryParamIncludeMeta.Enable)
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetLibraryItemsResponse res = sdk.library().getLibraryItems()
@@ -563,6 +555,112 @@ public class Application {
| models/errors/GetSearchLibraryUnauthorized | 401 | application/json |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## getGenresLibrary
Retrieves a list of all the genres that are found for the media in this library.
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetGenresLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetGenresLibraryUnauthorized;
import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GetGenresLibraryBadRequest, GetGenresLibraryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
GetGenresLibraryResponse res = sdk.library().getGenresLibrary()
.sectionKey(9518)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
### Response
**[GetGenresLibraryResponse](../../models/operations/GetGenresLibraryResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
| models/errors/GetGenresLibraryBadRequest | 400 | application/json |
| models/errors/GetGenresLibraryUnauthorized | 401 | application/json |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## getCountriesLibrary
Retrieves a list of all the countries that are found for the media in this library.
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GetCountriesLibraryBadRequest, GetCountriesLibraryUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
GetCountriesLibraryResponse res = sdk.library().getCountriesLibrary()
.sectionKey(9518)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
### Response
**[GetCountriesLibraryResponse](../../models/operations/GetCountriesLibraryResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
| models/errors/GetCountriesLibraryBadRequest | 400 | application/json |
| models/errors/GetCountriesLibraryUnauthorized | 401 | application/json |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## getSearchAllLibraries
Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
@@ -578,8 +676,6 @@ import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesBadRequest;
import dev.plexapi.sdk.models.errors.GetSearchAllLibrariesUnauthorized;
import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesRequest;
import dev.plexapi.sdk.models.operations.GetSearchAllLibrariesResponse;
import dev.plexapi.sdk.models.operations.QueryParamIncludeCollections;
import dev.plexapi.sdk.models.operations.QueryParamIncludeExternalMedia;
import dev.plexapi.sdk.models.operations.SearchTypes;
import java.lang.Exception;
import java.util.List;
@@ -597,8 +693,6 @@ public class Application {
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
.searchTypes(List.of(
SearchTypes.PEOPLE))
.includeCollections(QueryParamIncludeCollections.Enable)
.includeExternalMedia(QueryParamIncludeExternalMedia.Enable)
.build();
GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries()

View File

@@ -54,7 +54,7 @@ public class Application {
.title("<value>")
.type(CreatePlaylistQueryParamType.PHOTO)
.smart(Smart.ONE)
.uri("https://inborn-brochure.biz")
.uri("https://hoarse-testing.info/")
.build();
CreatePlaylistResponse res = sdk.playlists().createPlaylist()

View File

@@ -49,7 +49,7 @@ public class Application {
PerformSearchResponse res = sdk.search().performSearch()
.query("dylan")
.sectionId(9487.87d)
.sectionId(9487.88d)
.limit(5d)
.call();
@@ -107,7 +107,7 @@ public class Application {
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
.query("dead+poop")
.sectionId(4094.80d)
.sectionId(4094.8d)
.limit(5d)
.call();

77
docs/sdks/users/README.md Normal file
View File

@@ -0,0 +1,77 @@
# Users
(*users()*)
## Overview
### Available Operations
* [getUsers](#getusers) - Get list of all connected users
## getUsers
Get list of all users that are friends and have library access with the provided Plex authentication token
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetUsersBadRequest;
import dev.plexapi.sdk.models.errors.GetUsersUnauthorized;
import dev.plexapi.sdk.models.operations.GetUsersRequest;
import dev.plexapi.sdk.models.operations.GetUsersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GetUsersBadRequest, GetUsersUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.build();
GetUsersRequest req = GetUsersRequest.builder()
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.clientName("Plex for Roku")
.deviceNickname("Roku 3")
.deviceName("Chrome")
.deviceScreenResolution("1487x1165,2560x1440")
.clientVersion("2.4.1")
.platform("Roku")
.clientFeatures("external-media,indirect-media,hub-style-list")
.model("4200X")
.xPlexSessionId("97e136ef-4ddd-4ff3-89a7-a5820c96c2ca")
.xPlexLanguage("en")
.platformVersion("4.3 build 1057")
.build();
GetUsersResponse res = sdk.users().getUsers()
.request(req)
.call();
if (res.body().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
| `request` | [GetUsersRequest](../../models/operations/GetUsersRequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. |
### Response
**[GetUsersResponse](../../models/operations/GetUsersResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
| models/errors/GetUsersBadRequest | 400 | application/json |
| models/errors/GetUsersUnauthorized | 401 | application/json |
| models/errors/SDKError | 4XX, 5XX | \*/\* |

View File

@@ -38,8 +38,6 @@ public class Application {
GetWatchListRequest req = GetWatchListRequest.builder()
.filter(Filter.AVAILABLE)
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
.xPlexContainerStart(0)
.xPlexContainerSize(50)
.build();
GetWatchListResponse res = sdk.watchlist().getWatchList()

View File

@@ -182,7 +182,15 @@ public class Activities implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -328,7 +336,15 @@ public class Activities implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -216,7 +216,15 @@ public class Authentication implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -369,7 +377,15 @@ public class Authentication implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -530,7 +546,15 @@ public class Authentication implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -703,7 +727,15 @@ public class Authentication implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -194,7 +194,15 @@ public class Butler implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -340,7 +348,15 @@ public class Butler implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -478,7 +494,15 @@ public class Butler implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -634,7 +658,15 @@ public class Butler implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -782,7 +814,15 @@ public class Butler implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -212,7 +212,15 @@ public class Hubs implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -336,7 +344,15 @@ public class Hubs implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -519,7 +535,15 @@ public class Hubs implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -9,8 +9,12 @@ import dev.plexapi.sdk.models.errors.DeleteLibraryBadRequest;
import dev.plexapi.sdk.models.errors.DeleteLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetAllLibrariesBadRequest;
import dev.plexapi.sdk.models.errors.GetAllLibrariesUnauthorized;
import dev.plexapi.sdk.models.errors.GetCountriesLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetCountriesLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetFileHashBadRequest;
import dev.plexapi.sdk.models.errors.GetFileHashUnauthorized;
import dev.plexapi.sdk.models.errors.GetGenresLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetGenresLibraryUnauthorized;
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
import dev.plexapi.sdk.models.errors.GetLibraryItemsBadRequest;
@@ -39,9 +43,17 @@ import dev.plexapi.sdk.models.operations.Force;
import dev.plexapi.sdk.models.operations.GetAllLibrariesRequestBuilder;
import dev.plexapi.sdk.models.operations.GetAllLibrariesResponse;
import dev.plexapi.sdk.models.operations.GetAllLibrariesResponseBody;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequest;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryRequestBuilder;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponse;
import dev.plexapi.sdk.models.operations.GetCountriesLibraryResponseBody;
import dev.plexapi.sdk.models.operations.GetFileHashRequest;
import dev.plexapi.sdk.models.operations.GetFileHashRequestBuilder;
import dev.plexapi.sdk.models.operations.GetFileHashResponse;
import dev.plexapi.sdk.models.operations.GetGenresLibraryRequest;
import dev.plexapi.sdk.models.operations.GetGenresLibraryRequestBuilder;
import dev.plexapi.sdk.models.operations.GetGenresLibraryResponse;
import dev.plexapi.sdk.models.operations.GetGenresLibraryResponseBody;
import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequest;
import dev.plexapi.sdk.models.operations.GetLibraryDetailsRequestBuilder;
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
@@ -113,6 +125,8 @@ public class Library implements
MethodCallGetLibraryItems,
MethodCallGetRefreshLibraryMetadata,
MethodCallGetSearchLibrary,
MethodCallGetGenresLibrary,
MethodCallGetCountriesLibrary,
MethodCallGetSearchAllLibraries,
MethodCallGetMetaDataByRatingKey,
MethodCallGetMetadataChildren,
@@ -273,7 +287,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -429,7 +451,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -588,7 +618,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -888,7 +926,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1036,7 +1082,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1234,7 +1288,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1407,7 +1469,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1616,7 +1686,353 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected status code received: " + _httpRes.statusCode(),
Utils.extractByteArrayFromBody(_httpRes));
}
/**
* Get Genres of library media
* Retrieves a list of all the genres that are found for the media in this library.
*
* @return The call builder
*/
public GetGenresLibraryRequestBuilder getGenresLibrary() {
return new GetGenresLibraryRequestBuilder(this);
}
/**
* Get Genres of library media
* Retrieves a list of all the genres that are found for the media in this library.
*
* @param sectionKey The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetGenresLibraryResponse getGenresLibrary(
int sectionKey) throws Exception {
GetGenresLibraryRequest request =
GetGenresLibraryRequest
.builder()
.sectionKey(sectionKey)
.build();
String _baseUrl = Utils.templateUrl(
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
String _url = Utils.generateURL(
GetGenresLibraryRequest.class,
_baseUrl,
"/library/sections/{sectionKey}/genre",
request, null);
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
"get-genres-library",
Optional.of(List.of()),
_hookSecuritySource),
_req.build());
HttpResponse<InputStream> _httpRes;
try {
_httpRes = _client.send(_r);
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-genres-library",
Optional.of(List.of()),
_hookSecuritySource),
Optional.of(_httpRes),
Optional.empty());
} else {
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
"get-genres-library",
Optional.of(List.of()),
_hookSecuritySource),
_httpRes);
}
} catch (Exception _e) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-genres-library",
Optional.of(List.of()),
_hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
String _contentType = _httpRes
.headers()
.firstValue("Content-Type")
.orElse("application/octet-stream");
GetGenresLibraryResponse.Builder _resBuilder =
GetGenresLibraryResponse
.builder()
.contentType(_contentType)
.statusCode(_httpRes.statusCode())
.rawResponse(_httpRes);
GetGenresLibraryResponse _res = _resBuilder.build();
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetGenresLibraryResponseBody _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetGenresLibraryResponseBody>() {});
_res.withObject(Optional.ofNullable(_out));
return _res;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetGenresLibraryBadRequest _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetGenresLibraryBadRequest>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetGenresLibraryUnauthorized _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetGenresLibraryUnauthorized>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected status code received: " + _httpRes.statusCode(),
Utils.extractByteArrayFromBody(_httpRes));
}
/**
* Get Countries of library media
* Retrieves a list of all the countries that are found for the media in this library.
*
* @return The call builder
*/
public GetCountriesLibraryRequestBuilder getCountriesLibrary() {
return new GetCountriesLibraryRequestBuilder(this);
}
/**
* Get Countries of library media
* Retrieves a list of all the countries that are found for the media in this library.
*
* @param sectionKey The unique key of the Plex library.
Note: This is unique in the context of the Plex server.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetCountriesLibraryResponse getCountriesLibrary(
int sectionKey) throws Exception {
GetCountriesLibraryRequest request =
GetCountriesLibraryRequest
.builder()
.sectionKey(sectionKey)
.build();
String _baseUrl = Utils.templateUrl(
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
String _url = Utils.generateURL(
GetCountriesLibraryRequest.class,
_baseUrl,
"/library/sections/{sectionKey}/country",
request, null);
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
"get-countries-library",
Optional.of(List.of()),
_hookSecuritySource),
_req.build());
HttpResponse<InputStream> _httpRes;
try {
_httpRes = _client.send(_r);
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-countries-library",
Optional.of(List.of()),
_hookSecuritySource),
Optional.of(_httpRes),
Optional.empty());
} else {
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
"get-countries-library",
Optional.of(List.of()),
_hookSecuritySource),
_httpRes);
}
} catch (Exception _e) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-countries-library",
Optional.of(List.of()),
_hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
String _contentType = _httpRes
.headers()
.firstValue("Content-Type")
.orElse("application/octet-stream");
GetCountriesLibraryResponse.Builder _resBuilder =
GetCountriesLibraryResponse
.builder()
.contentType(_contentType)
.statusCode(_httpRes.statusCode())
.rawResponse(_httpRes);
GetCountriesLibraryResponse _res = _resBuilder.build();
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetCountriesLibraryResponseBody _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetCountriesLibraryResponseBody>() {});
_res.withObject(Optional.ofNullable(_out));
return _res;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetCountriesLibraryBadRequest _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetCountriesLibraryBadRequest>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetCountriesLibraryUnauthorized _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetCountriesLibraryUnauthorized>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1773,7 +2189,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1932,7 +2356,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -2113,7 +2545,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -2304,7 +2744,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -2453,7 +2901,15 @@ public class Library implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -200,7 +200,15 @@ public class Log implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -393,7 +401,15 @@ public class Log implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -531,7 +547,15 @@ public class Log implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -196,7 +196,15 @@ public class Media implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -345,7 +353,15 @@ public class Media implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -502,7 +518,15 @@ public class Media implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -659,7 +683,15 @@ public class Media implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -816,7 +848,15 @@ public class Media implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -244,7 +244,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -417,7 +425,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -578,7 +594,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -726,7 +750,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -898,7 +930,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1077,7 +1117,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1225,7 +1273,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1413,7 +1469,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1580,7 +1644,15 @@ public class Playlists implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -268,7 +268,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -429,7 +437,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -587,7 +603,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -734,7 +758,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -922,7 +954,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1074,7 +1114,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1239,7 +1287,15 @@ public class Plex implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -161,6 +161,8 @@ public class PlexAPI {
*/
private final Updater updater;
private final Users users;
/**
* Operations against the Plex Media Server System.
*
@@ -299,6 +301,10 @@ public class PlexAPI {
return updater;
}
public Users users() {
return users;
}
private final SDKConfiguration sdkConfiguration;
/**
@@ -518,5 +524,6 @@ public class PlexAPI {
this.statistics = new Statistics(sdkConfiguration);
this.sessions = new Sessions(sdkConfiguration);
this.updater = new Updater(sdkConfiguration);
this.users = new Users(sdkConfiguration);
this.sdkConfiguration.initialize();
}}

View File

@@ -43,8 +43,8 @@ class SDKConfiguration {
} };
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "0.0.3";
public static final String SDK_VERSION = "0.11.0";
public static final String GEN_VERSION = "2.483.1";
public static final String SDK_VERSION = "0.11.5";
public static final String GEN_VERSION = "2.503.2";
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",

View File

@@ -240,7 +240,15 @@ public class Search implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -419,7 +427,15 @@ public class Search implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -579,7 +595,15 @@ public class Search implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -218,7 +218,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -365,7 +373,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -512,7 +528,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -659,7 +683,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -787,7 +819,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -934,7 +974,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1079,7 +1127,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1235,7 +1291,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -1382,7 +1446,15 @@ public class Server implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -191,7 +191,15 @@ public class Sessions implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -375,7 +383,15 @@ public class Sessions implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -522,7 +538,15 @@ public class Sessions implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -668,7 +692,15 @@ public class Sessions implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -211,7 +211,15 @@ public class Statistics implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -383,7 +391,15 @@ public class Statistics implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -555,7 +571,15 @@ public class Statistics implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -186,7 +186,15 @@ public class Updater implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -345,7 +353,15 @@ public class Updater implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -510,7 +526,15 @@ public class Updater implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "500", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "500", "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -0,0 +1,212 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
import dev.plexapi.sdk.models.errors.GetUsersBadRequest;
import dev.plexapi.sdk.models.errors.GetUsersUnauthorized;
import dev.plexapi.sdk.models.errors.SDKError;
import dev.plexapi.sdk.models.operations.GetUsersRequest;
import dev.plexapi.sdk.models.operations.GetUsersRequestBuilder;
import dev.plexapi.sdk.models.operations.GetUsersResponse;
import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
import dev.plexapi.sdk.utils.HTTPClient;
import dev.plexapi.sdk.utils.HTTPRequest;
import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl;
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.Exception;
import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
public class Users implements
MethodCallGetUsers {
/**
* GET_USERS_SERVERS contains the list of server urls available to the SDK.
*/
public static final String[] GET_USERS_SERVERS = {
"https://plex.tv/api",
};
private final SDKConfiguration sdkConfiguration;
Users(SDKConfiguration sdkConfiguration) {
this.sdkConfiguration = sdkConfiguration;
}
/**
* Get list of all connected users
* Get list of all users that are friends and have library access with the provided Plex authentication token
* @return The call builder
*/
public GetUsersRequestBuilder getUsers() {
return new GetUsersRequestBuilder(this);
}
/**
* Get list of all connected users
* Get list of all users that are friends and have library access with the provided Plex authentication token
* @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 GetUsersResponse getUsers(
GetUsersRequest request) throws Exception {
return getUsers(request, Optional.empty());
}
/**
* Get list of all connected users
* Get list of all users that are friends and have library access with the provided Plex authentication token
* @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 GetUsersResponse getUsers(
GetUsersRequest request,
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_USERS_SERVERS[0], new HashMap<String, String>());
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
}
String _url = Utils.generateURL(
_baseUrl,
"/users");
HTTPRequest _req = new HTTPRequest(_url, "GET");
_req.addHeader("Accept", "application/xml")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
Optional<SecuritySource> _hookSecuritySource = Optional.empty();
HTTPClient _client = this.sdkConfiguration.defaultClient;
HttpRequest _r =
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
_req.build());
HttpResponse<InputStream> _httpRes;
try {
_httpRes = _client.send(_r);
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "4XX", "5XX")) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
Optional.of(_httpRes),
Optional.empty());
} else {
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
_httpRes);
}
} catch (Exception _e) {
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
String _contentType = _httpRes
.headers()
.firstValue("Content-Type")
.orElse("application/octet-stream");
GetUsersResponse.Builder _resBuilder =
GetUsersResponse
.builder()
.contentType(_contentType)
.statusCode(_httpRes.statusCode())
.rawResponse(_httpRes);
GetUsersResponse _res = _resBuilder.build();
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
if (Utils.contentTypeMatches(_contentType, "application/xml")) {
return _res;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "400")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetUsersBadRequest _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetUsersBadRequest>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "401")) {
if (Utils.contentTypeMatches(_contentType, "application/json")) {
GetUsersUnauthorized _out = Utils.mapper().readValue(
Utils.toUtf8AndClose(_httpRes.body()),
new TypeReference<GetUsersUnauthorized>() {});
_out.withRawResponse(Optional.ofNullable(_httpRes));
throw _out;
} else {
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected content-type received: " + _contentType,
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"Unexpected status code received: " + _httpRes.statusCode(),
Utils.extractByteArrayFromBody(_httpRes));
}
}

View File

@@ -172,7 +172,15 @@ public class Video implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,
@@ -315,7 +323,15 @@ public class Video implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -208,7 +208,15 @@ public class Watchlist implements
Utils.extractByteArrayFromBody(_httpRes));
}
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) {
if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) {
// no content
throw new SDKError(
_httpRes,
_httpRes.statusCode(),
"API error occurred",
Utils.extractByteArrayFromBody(_httpRes));
}
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
// no content
throw new SDKError(
_httpRes,

View File

@@ -0,0 +1,173 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetCountriesLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class GetCountriesLibraryBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetCountriesLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetCountriesLibraryBadRequest(
@JsonProperty("errors") Optional<? extends List<GetCountriesLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetCountriesLibraryBadRequest() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetCountriesLibraryErrors>> errors(){
return (Optional<List<GetCountriesLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetCountriesLibraryBadRequest withErrors(List<GetCountriesLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetCountriesLibraryBadRequest withErrors(Optional<? extends List<GetCountriesLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCountriesLibraryBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCountriesLibraryBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCountriesLibraryBadRequest other = (GetCountriesLibraryBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetCountriesLibraryBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetCountriesLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetCountriesLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetCountriesLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetCountriesLibraryBadRequest build() {
return new GetCountriesLibraryBadRequest(
errors,
rawResponse);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetCountriesLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Integer> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonCreator
public GetCountriesLibraryErrors(
@JsonProperty("code") Optional<Integer> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Integer> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetCountriesLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetCountriesLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetCountriesLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetCountriesLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetCountriesLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetCountriesLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetCountriesLibraryErrors withStatus(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCountriesLibraryErrors other = (GetCountriesLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetCountriesLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Integer> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetCountriesLibraryErrors build() {
return new GetCountriesLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetCountriesLibraryLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Integer> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonCreator
public GetCountriesLibraryLibraryErrors(
@JsonProperty("code") Optional<Integer> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Integer> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetCountriesLibraryLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetCountriesLibraryLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetCountriesLibraryLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetCountriesLibraryLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetCountriesLibraryLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetCountriesLibraryLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetCountriesLibraryLibraryErrors withStatus(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCountriesLibraryLibraryErrors other = (GetCountriesLibraryLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetCountriesLibraryLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Integer> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetCountriesLibraryLibraryErrors build() {
return new GetCountriesLibraryLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,173 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetCountriesLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class GetCountriesLibraryUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetCountriesLibraryLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetCountriesLibraryUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetCountriesLibraryLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetCountriesLibraryUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetCountriesLibraryLibraryErrors>> errors(){
return (Optional<List<GetCountriesLibraryLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetCountriesLibraryUnauthorized withErrors(List<GetCountriesLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetCountriesLibraryUnauthorized withErrors(Optional<? extends List<GetCountriesLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCountriesLibraryUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetCountriesLibraryUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetCountriesLibraryUnauthorized other = (GetCountriesLibraryUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetCountriesLibraryUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetCountriesLibraryLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetCountriesLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetCountriesLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetCountriesLibraryUnauthorized build() {
return new GetCountriesLibraryUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -0,0 +1,173 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetGenresLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class GetGenresLibraryBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetGenresLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetGenresLibraryBadRequest(
@JsonProperty("errors") Optional<? extends List<GetGenresLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetGenresLibraryBadRequest() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetGenresLibraryErrors>> errors(){
return (Optional<List<GetGenresLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetGenresLibraryBadRequest withErrors(List<GetGenresLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetGenresLibraryBadRequest withErrors(Optional<? extends List<GetGenresLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGenresLibraryBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGenresLibraryBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGenresLibraryBadRequest other = (GetGenresLibraryBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetGenresLibraryBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetGenresLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetGenresLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetGenresLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetGenresLibraryBadRequest build() {
return new GetGenresLibraryBadRequest(
errors,
rawResponse);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetGenresLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Integer> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonCreator
public GetGenresLibraryErrors(
@JsonProperty("code") Optional<Integer> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Integer> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetGenresLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetGenresLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetGenresLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetGenresLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetGenresLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetGenresLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetGenresLibraryErrors withStatus(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGenresLibraryErrors other = (GetGenresLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetGenresLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Integer> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetGenresLibraryErrors build() {
return new GetGenresLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,194 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
public class GetGenresLibraryLibraryErrors {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("code")
private Optional<Integer> code;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("message")
private Optional<String> message;
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("status")
private Optional<Integer> status;
@JsonCreator
public GetGenresLibraryLibraryErrors(
@JsonProperty("code") Optional<Integer> code,
@JsonProperty("message") Optional<String> message,
@JsonProperty("status") Optional<Integer> status) {
Utils.checkNotNull(code, "code");
Utils.checkNotNull(message, "message");
Utils.checkNotNull(status, "status");
this.code = code;
this.message = message;
this.status = status;
}
public GetGenresLibraryLibraryErrors() {
this(Optional.empty(), Optional.empty(), Optional.empty());
}
@JsonIgnore
public Optional<Integer> code() {
return code;
}
@JsonIgnore
public Optional<String> message() {
return message;
}
@JsonIgnore
public Optional<Integer> status() {
return status;
}
public final static Builder builder() {
return new Builder();
}
public GetGenresLibraryLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public GetGenresLibraryLibraryErrors withCode(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public GetGenresLibraryLibraryErrors withMessage(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public GetGenresLibraryLibraryErrors withMessage(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public GetGenresLibraryLibraryErrors withStatus(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public GetGenresLibraryLibraryErrors withStatus(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGenresLibraryLibraryErrors other = (GetGenresLibraryLibraryErrors) o;
return
Objects.deepEquals(this.code, other.code) &&
Objects.deepEquals(this.message, other.message) &&
Objects.deepEquals(this.status, other.status);
}
@Override
public int hashCode() {
return Objects.hash(
code,
message,
status);
}
@Override
public String toString() {
return Utils.toString(GetGenresLibraryLibraryErrors.class,
"code", code,
"message", message,
"status", status);
}
public final static class Builder {
private Optional<Integer> code = Optional.empty();
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
}
public Builder code(int code) {
Utils.checkNotNull(code, "code");
this.code = Optional.ofNullable(code);
return this;
}
public Builder code(Optional<Integer> code) {
Utils.checkNotNull(code, "code");
this.code = code;
return this;
}
public Builder message(String message) {
Utils.checkNotNull(message, "message");
this.message = Optional.ofNullable(message);
return this;
}
public Builder message(Optional<String> message) {
Utils.checkNotNull(message, "message");
this.message = message;
return this;
}
public Builder status(int status) {
Utils.checkNotNull(status, "status");
this.status = Optional.ofNullable(status);
return this;
}
public Builder status(Optional<Integer> status) {
Utils.checkNotNull(status, "status");
this.status = status;
return this;
}
public GetGenresLibraryLibraryErrors build() {
return new GetGenresLibraryLibraryErrors(
code,
message,
status);
}
}
}

View File

@@ -0,0 +1,173 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetGenresLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class GetGenresLibraryUnauthorized extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetGenresLibraryLibraryErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetGenresLibraryUnauthorized(
@JsonProperty("errors") Optional<? extends List<GetGenresLibraryLibraryErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetGenresLibraryUnauthorized() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetGenresLibraryLibraryErrors>> errors(){
return (Optional<List<GetGenresLibraryLibraryErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetGenresLibraryUnauthorized withErrors(List<GetGenresLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetGenresLibraryUnauthorized withErrors(Optional<? extends List<GetGenresLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGenresLibraryUnauthorized withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetGenresLibraryUnauthorized withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetGenresLibraryUnauthorized other = (GetGenresLibraryUnauthorized) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetGenresLibraryUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetGenresLibraryLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetGenresLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetGenresLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetGenresLibraryUnauthorized build() {
return new GetGenresLibraryUnauthorized(
errors,
rawResponse);
}
}
}

View File

@@ -0,0 +1,173 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import dev.plexapi.sdk.utils.Utils;
import java.io.InputStream;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* GetUsersBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class GetUsersBadRequest extends RuntimeException {
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("errors")
private Optional<? extends List<GetUsersErrors>> errors;
/**
* Raw HTTP response; suitable for custom response parsing
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("RawResponse")
private Optional<? extends HttpResponse<InputStream>> rawResponse;
@JsonCreator
public GetUsersBadRequest(
@JsonProperty("errors") Optional<? extends List<GetUsersErrors>> errors,
@JsonProperty("RawResponse") Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(errors, "errors");
Utils.checkNotNull(rawResponse, "rawResponse");
this.errors = errors;
this.rawResponse = rawResponse;
}
public GetUsersBadRequest() {
this(Optional.empty(), Optional.empty());
}
@SuppressWarnings("unchecked")
public Optional<List<GetUsersErrors>> errors(){
return (Optional<List<GetUsersErrors>>) errors;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
public GetUsersBadRequest withErrors(List<GetUsersErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public GetUsersBadRequest withErrors(Optional<? extends List<GetUsersErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetUsersBadRequest withRawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public GetUsersBadRequest withRawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetUsersBadRequest other = (GetUsersBadRequest) o;
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(GetUsersBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<GetUsersErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
public Builder errors(List<GetUsersErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<GetUsersErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(HttpResponse<InputStream> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
public Builder rawResponse(Optional<? extends HttpResponse<InputStream>> rawResponse) {
Utils.checkNotNull(rawResponse, "rawResponse");
this.rawResponse = rawResponse;
return this;
}
public GetUsersBadRequest build() {
return new GetUsersBadRequest(
errors,
rawResponse);
}
}
}

Some files were not shown because too many files have changed in this diff Show More