mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 12:37:47 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f33408b177 | ||
|
|
22654201f5 | ||
|
|
9dc8821b31 | ||
|
|
412b27f162 | ||
|
|
9c8fe4c95e |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.speakeasy/reports
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
# Ignore Gradle build output directory
|
||||
|
||||
1562
.speakeasy/gen.lock
1562
.speakeasy/gen.lock
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@ generation:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
java:
|
||||
version: 0.10.1
|
||||
version: 0.11.4
|
||||
additionalDependencies: []
|
||||
additionalPlugins: []
|
||||
artifactID: plexapi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.439.0
|
||||
speakeasyVersion: 1.484.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -8,19 +8,19 @@ sources:
|
||||
- latest
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:37c6bfb15f4154eb89b112465107f20757411f22bd1cc7d0a04335df7127fcb4
|
||||
sourceBlobDigest: sha256:290473ebc909cada80ff428c685b897f4621cf121397e1417355e06d334e7206
|
||||
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10
|
||||
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
- speakeasy-sdk-regen-1738715170
|
||||
targets:
|
||||
plexjava:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:37c6bfb15f4154eb89b112465107f20757411f22bd1cc7d0a04335df7127fcb4
|
||||
sourceBlobDigest: sha256:290473ebc909cada80ff428c685b897f4621cf121397e1417355e06d334e7206
|
||||
sourceRevisionDigest: sha256:0b88c8bfc41def63e19e91fdd4d51bab07cb947cc3d39d2b44e8523a209cec10
|
||||
sourceBlobDigest: sha256:89d5b8427d4fb61b25751aebbaf71f9613958e9e91073fc084fed2c2ec62ce55
|
||||
codeSamplesNamespace: code-samples-java-plexjava
|
||||
codeSamplesRevisionDigest: sha256:218724cff48118b26161c9ff5a0eb0f5aed771cea0d6bcef400db821dd019aea
|
||||
codeSamplesRevisionDigest: sha256:2aa7538a82c8a44f72d94eb4f26788f861508b856440d207b35e5160b54e9420
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
51
README.md
51
README.md
@@ -41,13 +41,21 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
|
||||
|
||||
<!-- Start Table of Contents [toc] -->
|
||||
## Table of Contents
|
||||
<!-- $toc-max-depth=2 -->
|
||||
* [plexapi](#plexapi)
|
||||
* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)
|
||||
* [Documentation](#documentation)
|
||||
* [SDKs](#sdks)
|
||||
* [SDK Installation](#sdk-installation)
|
||||
* [SDK Example Usage](#sdk-example-usage)
|
||||
* [Available Resources and Operations](#available-resources-and-operations)
|
||||
* [Error Handling](#error-handling)
|
||||
* [Server Selection](#server-selection)
|
||||
* [Authentication](#authentication)
|
||||
* [Development](#development)
|
||||
* [Maturity](#maturity)
|
||||
* [Contributions](#contributions)
|
||||
|
||||
* [SDK Installation](#sdk-installation)
|
||||
* [SDK Example Usage](#sdk-example-usage)
|
||||
* [Available Resources and Operations](#available-resources-and-operations)
|
||||
* [Error Handling](#error-handling)
|
||||
* [Server Selection](#server-selection)
|
||||
* [Authentication](#authentication)
|
||||
<!-- End Table of Contents [toc] -->
|
||||
|
||||
<!-- Start SDK Installation [installation] -->
|
||||
@@ -61,7 +69,7 @@ The samples below show how a published SDK artifact is used:
|
||||
|
||||
Gradle:
|
||||
```groovy
|
||||
implementation 'dev.plexapi:plexapi:0.10.1'
|
||||
implementation 'dev.plexapi:plexapi:0.11.4'
|
||||
```
|
||||
|
||||
Maven:
|
||||
@@ -69,7 +77,7 @@ Maven:
|
||||
<dependency>
|
||||
<groupId>dev.plexapi</groupId>
|
||||
<artifactId>plexapi</artifactId>
|
||||
<version>0.10.1</version>
|
||||
<version>0.11.4</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -108,11 +116,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
@@ -168,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
|
||||
@@ -290,11 +295,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
@@ -337,11 +337,6 @@ public class Application {
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.serverURL("https://10.10.10.47:32400")
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
@@ -372,11 +367,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
||||
@@ -418,11 +408,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
|
||||
52
RELEASES.md
52
RELEASES.md
@@ -178,4 +178,54 @@ Based on:
|
||||
### Generated
|
||||
- [java v0.10.1] .
|
||||
### Releases
|
||||
- [Maven Central v0.10.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.10.1 - .
|
||||
- [Maven Central v0.10.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.10.1 - .
|
||||
|
||||
## 2024-12-21 00:25:42
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [java v0.11.0] .
|
||||
### Releases
|
||||
- [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 - .
|
||||
5
USAGE.md
5
USAGE.md
@@ -14,11 +14,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
|
||||
22
build.gradle
22
build.gradle
@@ -63,7 +63,7 @@ tasks.withType(Javadoc) {
|
||||
}
|
||||
|
||||
group = "dev.plexapi"
|
||||
version = "0.10.1"
|
||||
version = "0.11.4"
|
||||
|
||||
sourcesJar {
|
||||
archiveBaseName = "plexapi"
|
||||
@@ -101,7 +101,7 @@ publishing {
|
||||
maven(MavenPublication) {
|
||||
groupId = 'dev.plexapi'
|
||||
artifactId = 'plexapi'
|
||||
version = '0.10.1'
|
||||
version = '0.11.4'
|
||||
|
||||
from components.java
|
||||
|
||||
@@ -144,16 +144,16 @@ if (!project.hasProperty('skip.signing')) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
|
||||
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2'
|
||||
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2'
|
||||
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
|
||||
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
|
||||
implementation 'org.apache.httpcomponents:httpmime:4.5.14'
|
||||
implementation 'commons-io:commons-io:2.15.1'
|
||||
api 'com.fasterxml.jackson.core:jackson-annotations:2.18.2'
|
||||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2'
|
||||
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2'
|
||||
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2'
|
||||
api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'}
|
||||
implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.1'
|
||||
implementation 'commons-io:commons-io:2.18.0'
|
||||
}
|
||||
|
||||
|
||||
|
||||
apply from: 'build-extras.gradle'
|
||||
|
||||
505
codeSamples.yaml
505
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
11
docs/models/errors/GetCountriesLibraryBadRequest.md
Normal file
11
docs/models/errors/GetCountriesLibraryBadRequest.md
Normal 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 |
|
||||
10
docs/models/errors/GetCountriesLibraryErrors.md
Normal file
10
docs/models/errors/GetCountriesLibraryErrors.md
Normal 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 |
|
||||
10
docs/models/errors/GetCountriesLibraryLibraryErrors.md
Normal file
10
docs/models/errors/GetCountriesLibraryLibraryErrors.md
Normal 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 |
|
||||
11
docs/models/errors/GetCountriesLibraryUnauthorized.md
Normal file
11
docs/models/errors/GetCountriesLibraryUnauthorized.md
Normal 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 |
|
||||
11
docs/models/errors/GetGenresLibraryBadRequest.md
Normal file
11
docs/models/errors/GetGenresLibraryBadRequest.md
Normal 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 |
|
||||
10
docs/models/errors/GetGenresLibraryErrors.md
Normal file
10
docs/models/errors/GetGenresLibraryErrors.md
Normal 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 |
|
||||
10
docs/models/errors/GetGenresLibraryLibraryErrors.md
Normal file
10
docs/models/errors/GetGenresLibraryLibraryErrors.md
Normal 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 |
|
||||
11
docs/models/errors/GetGenresLibraryUnauthorized.md
Normal file
11
docs/models/errors/GetGenresLibraryUnauthorized.md
Normal 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 |
|
||||
11
docs/models/operations/EnableCreditsMarkerGeneration.md
Normal file
11
docs/models/operations/EnableCreditsMarkerGeneration.md
Normal 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 |
|
||||
12
docs/models/operations/EpisodeSort.md
Normal file
12
docs/models/operations/EpisodeSort.md
Normal 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 |
|
||||
@@ -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 |
|
||||
10
docs/models/operations/GetCountriesLibraryDirectory.md
Normal file
10
docs/models/operations/GetCountriesLibraryDirectory.md
Normal 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 |
|
||||
22
docs/models/operations/GetCountriesLibraryMediaContainer.md
Normal file
22
docs/models/operations/GetCountriesLibraryMediaContainer.md
Normal 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 | |
|
||||
8
docs/models/operations/GetCountriesLibraryRequest.md
Normal file
8
docs/models/operations/GetCountriesLibraryRequest.md
Normal 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 |
|
||||
11
docs/models/operations/GetCountriesLibraryResponse.md
Normal file
11
docs/models/operations/GetCountriesLibraryResponse.md
Normal 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. |
|
||||
10
docs/models/operations/GetCountriesLibraryResponseBody.md
Normal file
10
docs/models/operations/GetCountriesLibraryResponseBody.md
Normal 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 |
|
||||
11
docs/models/operations/GetGenresLibraryDirectory.md
Normal file
11
docs/models/operations/GetGenresLibraryDirectory.md
Normal 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 |
|
||||
22
docs/models/operations/GetGenresLibraryMediaContainer.md
Normal file
22
docs/models/operations/GetGenresLibraryMediaContainer.md
Normal 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 | |
|
||||
8
docs/models/operations/GetGenresLibraryRequest.md
Normal file
8
docs/models/operations/GetGenresLibraryRequest.md
Normal 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 |
|
||||
11
docs/models/operations/GetGenresLibraryResponse.md
Normal file
11
docs/models/operations/GetGenresLibraryResponse.md
Normal 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. |
|
||||
10
docs/models/operations/GetGenresLibraryResponseBody.md
Normal file
10
docs/models/operations/GetGenresLibraryResponseBody.md
Normal 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 |
|
||||
@@ -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 |
|
||||
12
docs/models/operations/GetLibraryItemsEpisodeSort.md
Normal file
12
docs/models/operations/GetLibraryItemsEpisodeSort.md
Normal 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 |
|
||||
@@ -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 |
|
||||
@@ -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/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
|
||||
| `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 |
|
||||
|
||||
@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
| `TvShow` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
| `Audio` | 8 |
|
||||
| `Audio` | 8 |
|
||||
| `Album` | 9 |
|
||||
| `Track` | 10 |
|
||||
@@ -1,20 +1,20 @@
|
||||
# GetLibraryItemsShowOrdering
|
||||
|
||||
Setting that indicates the episode ordering for the show
|
||||
None = Library default,
|
||||
tmdbAiring = The Movie Database (Aired),
|
||||
aired = TheTVDB (Aired),
|
||||
dvd = TheTVDB (DVD),
|
||||
Setting that indicates the episode ordering for the show.
|
||||
None = Library default,
|
||||
tmdbAiring = The Movie Database (Aired),
|
||||
aired = TheTVDB (Aired),
|
||||
dvd = TheTVDB (DVD),
|
||||
absolute = TheTVDB (Absolute)).
|
||||
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------ | ------------ |
|
||||
| `None` | None |
|
||||
| `TmdbAiring` | tmdbAiring |
|
||||
| `Aired` | aired |
|
||||
| `Dvd` | dvd |
|
||||
| `Absolute` | absolute |
|
||||
| Name | Value |
|
||||
| -------------- | -------------- |
|
||||
| `None` | None |
|
||||
| `TmdbAiring` | tmdbAiring |
|
||||
| `TvdbAired` | aired |
|
||||
| `TvdbDvd` | dvd |
|
||||
| `TvdbAbsolute` | absolute |
|
||||
@@ -14,6 +14,11 @@
|
||||
| `librarySectionTitle` | *Optional\<String>* | :heavy_minus_sign: | N/A | Movies |
|
||||
| `librarySectionID` | *Optional\<Integer>* | :heavy_minus_sign: | N/A | 1 |
|
||||
| `librarySectionKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/sections/1 |
|
||||
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | The name of the album artist for the track when audio, and the name of the TV show for the episode when video. | |
|
||||
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | The name of the album for the track when audio, and the name of the season for the episode when TV show. | |
|
||||
| `originalTitle` | *Optional\<String>* | :heavy_minus_sign: | The orginal untranslated name of the media item when non-english. | |
|
||||
| `index` | *Optional\<Long>* | :heavy_minus_sign: | The index starting from 0 of this media item in the MetaData array. | |
|
||||
| `parentIndex` | *Optional\<Long>* | :heavy_minus_sign: | The parent index starting from 0 of this media item in the parent MetaData array. | |
|
||||
| `contentRating` | *Optional\<String>* | :heavy_minus_sign: | N/A | PG-13 |
|
||||
| `summary` | *Optional\<String>* | :heavy_minus_sign: | N/A | Serenity continues the story of the TV series it was based upon ("Firefly"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job. |
|
||||
| `rating` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 8.2 |
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `strong` | *Optional\<Boolean>* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
|
||||
| `clientID` | *Optional\<String>* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `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 |
|
||||
| `clientVersion` | *Optional\<String>* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
|
||||
|
||||
@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
| `TvShow` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
| `Audio` | 8 |
|
||||
| `Audio` | 8 |
|
||||
| `Album` | 9 |
|
||||
| `Track` | 10 |
|
||||
@@ -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 | |
|
||||
@@ -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/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
|
||||
| `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 |
|
||||
|
||||
@@ -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 |
|
||||
12
docs/models/operations/GetSearchAllLibrariesEpisodeSort.md
Normal file
12
docs/models/operations/GetSearchAllLibrariesEpisodeSort.md
Normal 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 |
|
||||
@@ -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 |
|
||||
@@ -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/>aired = TheTVDB (Aired), <br/>dvd = TheTVDB (DVD), <br/>absolute = TheTVDB (Absolute)).<br/> | dvd |
|
||||
| `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 |
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `query` | *String* | :heavy_check_mark: | The search query term. | |
|
||||
| `clientID` | *Optional\<String>* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `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 |
|
||||
| `limit` | *Optional\<Long>* | :heavy_minus_sign: | Limit the number of results returned. | |
|
||||
| `searchTypes` | List\<[SearchTypes](../../models/operations/SearchTypes.md)> | :heavy_minus_sign: | A comma-separated list of search types to include. Valid values are: movies, music, otherVideos, people, tv.<br/> | movies,music,otherVideos,people,tv |
|
||||
| `includeCollections` | [Optional\<QueryParamIncludeCollections>](../../models/operations/QueryParamIncludeCollections.md) | :heavy_minus_sign: | Whether to include collections in the search results. | 1 |
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
# GetSearchAllLibrariesShowOrdering
|
||||
|
||||
Setting that indicates the episode ordering for the show
|
||||
None = Library default,
|
||||
tmdbAiring = The Movie Database (Aired),
|
||||
aired = TheTVDB (Aired),
|
||||
dvd = TheTVDB (DVD),
|
||||
Setting that indicates the episode ordering for the show.
|
||||
None = Library default,
|
||||
tmdbAiring = The Movie Database (Aired),
|
||||
aired = TheTVDB (Aired),
|
||||
dvd = TheTVDB (DVD),
|
||||
absolute = TheTVDB (Absolute)).
|
||||
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------ | ------------ |
|
||||
| `None` | None |
|
||||
| `TmdbAiring` | tmdbAiring |
|
||||
| `Aired` | aired |
|
||||
| `Dvd` | dvd |
|
||||
| `Absolute` | absolute |
|
||||
| Name | Value |
|
||||
| -------------- | -------------- |
|
||||
| `None` | None |
|
||||
| `TmdbAiring` | tmdbAiring |
|
||||
| `TvdbAired` | aired |
|
||||
| `TvdbDvd` | dvd |
|
||||
| `TvdbAbsolute` | absolute |
|
||||
@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
| `TvShow` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
| `Audio` | 8 |
|
||||
| `Audio` | 8 |
|
||||
| `Album` | 9 |
|
||||
| `Track` | 10 |
|
||||
@@ -8,4 +8,4 @@
|
||||
| `includeHttps` | [Optional\<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
|
||||
| `includeRelay` | [Optional\<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `includeIPv6` | [Optional\<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
| `clientID` | *Optional\<String>* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `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 |
|
||||
@@ -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 | |
|
||||
@@ -6,7 +6,7 @@
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
||||
| `pinID` | *long* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
||||
| `clientID` | *Optional\<String>* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `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 |
|
||||
| `clientVersion` | *Optional\<String>* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
|
||||
|
||||
@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
| `TvShow` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
| `Audio` | 8 |
|
||||
| `Audio` | 8 |
|
||||
| `Album` | 9 |
|
||||
| `Track` | 10 |
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `clientID` | *Optional\<String>* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `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 |
|
||||
| `clientVersion` | *Optional\<String>* | :heavy_minus_sign: | The version of the client application. | 2.4.1 |
|
||||
|
||||
@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
| `TvShow` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
| `Audio` | 8 |
|
||||
| `Audio` | 8 |
|
||||
| `Album` | 9 |
|
||||
| `Track` | 10 |
|
||||
@@ -1,20 +1,20 @@
|
||||
# ShowOrdering
|
||||
|
||||
Setting that indicates the episode ordering for the show
|
||||
None = Library default,
|
||||
tmdbAiring = The Movie Database (Aired),
|
||||
aired = TheTVDB (Aired),
|
||||
dvd = TheTVDB (DVD),
|
||||
Setting that indicates the episode ordering for the show.
|
||||
None = Library default,
|
||||
tmdbAiring = The Movie Database (Aired),
|
||||
aired = TheTVDB (Aired),
|
||||
dvd = TheTVDB (DVD),
|
||||
absolute = TheTVDB (Absolute)).
|
||||
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ------------ | ------------ |
|
||||
| `None` | None |
|
||||
| `TmdbAiring` | tmdbAiring |
|
||||
| `Aired` | aired |
|
||||
| `Dvd` | dvd |
|
||||
| `Absolute` | absolute |
|
||||
| Name | Value |
|
||||
| -------------- | -------------- |
|
||||
| `None` | None |
|
||||
| `TmdbAiring` | tmdbAiring |
|
||||
| `TvdbAired` | aired |
|
||||
| `TvdbDvd` | dvd |
|
||||
| `TvdbAbsolute` | absolute |
|
||||
@@ -25,4 +25,5 @@ A key representing a specific tag within the section.
|
||||
| `RATING` | rating |
|
||||
| `RESOLUTION` | resolution |
|
||||
| `FIRST_CHARACTER` | firstCharacter |
|
||||
| `FOLDER` | folder |
|
||||
| `FOLDER` | folder |
|
||||
| `ALBUMS` | albums |
|
||||
@@ -17,4 +17,6 @@ E.g. A movie library will not return anything with type 3 as there are no season
|
||||
| `TvShow` | 2 |
|
||||
| `Season` | 3 |
|
||||
| `Episode` | 4 |
|
||||
| `Audio` | 8 |
|
||||
| `Audio` | 8 |
|
||||
| `Album` | 9 |
|
||||
| `Track` | 10 |
|
||||
@@ -38,11 +38,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerActivitiesResponse res = sdk.activities().getServerActivities()
|
||||
@@ -88,11 +83,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
CancelServerActivitiesResponse res = sdk.activities().cancelServerActivities()
|
||||
|
||||
@@ -37,11 +37,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetTransientTokenResponse res = sdk.authentication().getTransientToken()
|
||||
@@ -96,15 +91,10 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetSourceConnectionInformationResponse res = sdk.authentication().getSourceConnectionInformation()
|
||||
.source("server://client-identifier")
|
||||
.source("provider://provider-identifier")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -151,11 +141,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
|
||||
@@ -208,14 +193,14 @@ public class Application {
|
||||
public static void main(String[] args) throws PostUsersSignInDataBadRequest, PostUsersSignInDataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
PostUsersSignInDataRequest req = PostUsersSignInDataRequest.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.requestBody(PostUsersSignInDataRequestBody.builder()
|
||||
.login("username@email.com")
|
||||
.password("password123")
|
||||
|
||||
@@ -35,11 +35,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetButlerTasksResponse res = sdk.butler().getButlerTasks()
|
||||
@@ -90,11 +85,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
StartAllTasksResponse res = sdk.butler().startAllTasks()
|
||||
@@ -139,11 +129,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
StopAllTasksResponse res = sdk.butler().stopAllTasks()
|
||||
@@ -193,11 +178,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
StartTaskResponse res = sdk.butler().startTask()
|
||||
@@ -250,11 +230,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
StopTaskResponse res = sdk.butler().stopTask()
|
||||
|
||||
@@ -34,11 +34,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
||||
@@ -85,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;
|
||||
|
||||
@@ -95,20 +89,12 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetRecentlyAddedRequest req = GetRecentlyAddedRequest.builder()
|
||||
.contentDirectoryID(470161L)
|
||||
.type(Type.TvShow)
|
||||
.sectionID(2L)
|
||||
.includeMeta(IncludeMeta.Enable)
|
||||
.xPlexContainerStart(0)
|
||||
.xPlexContainerSize(50)
|
||||
.build();
|
||||
|
||||
GetRecentlyAddedResponse res = sdk.hubs().getRecentlyAdded()
|
||||
@@ -161,17 +147,12 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
||||
.sectionId(6728.76d)
|
||||
.count(639.24d)
|
||||
.onlyTransient(QueryParamOnlyTransient.ONE)
|
||||
.count(6728.76d)
|
||||
.onlyTransient(QueryParamOnlyTransient.ZERO)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
|
||||
@@ -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
|
||||
@@ -43,11 +45,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetFileHashResponse res = sdk.library().getFileHash()
|
||||
@@ -94,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;
|
||||
@@ -105,11 +101,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetRecentlyAddedLibraryRequest req = GetRecentlyAddedLibraryRequest.builder()
|
||||
@@ -129,9 +120,6 @@ public class Application {
|
||||
16L,
|
||||
17L))
|
||||
.sectionID(2L)
|
||||
.includeMeta(QueryParamIncludeMeta.Enable)
|
||||
.xPlexContainerStart(0)
|
||||
.xPlexContainerSize(50)
|
||||
.build();
|
||||
|
||||
GetRecentlyAddedLibraryResponse res = sdk.library().getRecentlyAddedLibrary()
|
||||
@@ -190,11 +178,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetAllLibrariesResponse res = sdk.library().getAllLibraries()
|
||||
@@ -280,11 +263,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
||||
@@ -339,11 +317,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
DeleteLibraryResponse res = sdk.library().deleteLibrary()
|
||||
@@ -395,6 +368,7 @@ Fetches details from a specific section of the library identified by a section k
|
||||
- `resolution`: Items categorized by resolution.
|
||||
- `firstCharacter`: Items categorized by the first letter.
|
||||
- `folder`: Items categorized by folder.
|
||||
- `albums`: Items categorized by album.
|
||||
|
||||
|
||||
### Example Usage
|
||||
@@ -405,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;
|
||||
|
||||
@@ -419,21 +391,12 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
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()
|
||||
@@ -488,11 +451,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetRefreshLibraryMetadataResponse res = sdk.library().getRefreshLibraryMetadata()
|
||||
@@ -564,11 +522,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetSearchLibraryResponse res = sdk.library().getSearchLibrary()
|
||||
@@ -602,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.
|
||||
@@ -617,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;
|
||||
@@ -629,19 +686,13 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetSearchAllLibrariesRequest req = GetSearchAllLibrariesRequest.builder()
|
||||
.query("<value>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.searchTypes(List.of(
|
||||
SearchTypes.PEOPLE))
|
||||
.includeCollections(QueryParamIncludeCollections.Enable)
|
||||
.includeExternalMedia(QueryParamIncludeExternalMedia.Enable)
|
||||
.build();
|
||||
|
||||
GetSearchAllLibrariesResponse res = sdk.library().getSearchAllLibraries()
|
||||
@@ -695,11 +746,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetMetaDataByRatingKeyResponse res = sdk.library().getMetaDataByRatingKey()
|
||||
@@ -753,16 +799,11 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
|
||||
.ratingKey(1539.15d)
|
||||
.includeElements("<value>")
|
||||
.ratingKey(1539.14d)
|
||||
.includeElements("Stream")
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
@@ -814,11 +855,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetTopWatchedContentResponse res = sdk.library().getTopWatchedContent()
|
||||
@@ -874,11 +910,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetOnDeckResponse res = sdk.library().getOnDeck()
|
||||
|
||||
@@ -35,11 +35,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
LogLineResponse res = sdk.log().logLine()
|
||||
@@ -116,15 +111,9 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman
|
||||
level=1&message=Test%20message%203&source=postman";
|
||||
String req = "level=4&message=Test%20message%201&source=postman\nlevel=3&message=Test%20message%202&source=postman\nlevel=1&message=Test%20message%203&source=postman";
|
||||
|
||||
LogMultiLineResponse res = sdk.log().logMultiLine()
|
||||
.request(req)
|
||||
@@ -175,11 +164,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
EnablePaperTrailResponse res = sdk.log().enablePaperTrail()
|
||||
|
||||
@@ -35,11 +35,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
MarkPlayedResponse res = sdk.media().markPlayed()
|
||||
@@ -90,11 +85,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
MarkUnplayedResponse res = sdk.media().markUnplayed()
|
||||
@@ -146,11 +136,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
|
||||
@@ -206,11 +191,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetBannerImageRequest req = GetBannerImageRequest.builder()
|
||||
@@ -273,11 +253,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetThumbImageRequest req = GetThumbImageRequest.builder()
|
||||
|
||||
@@ -48,11 +48,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
CreatePlaylistRequest req = CreatePlaylistRequest.builder()
|
||||
@@ -114,11 +109,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
||||
@@ -175,11 +165,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetPlaylistResponse res = sdk.playlists().getPlaylist()
|
||||
@@ -233,11 +218,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
|
||||
@@ -289,15 +269,10 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
||||
.playlistID(3915.00d)
|
||||
.playlistID(3915d)
|
||||
.title("<value>")
|
||||
.summary("<value>")
|
||||
.call();
|
||||
@@ -353,11 +328,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
|
||||
@@ -413,11 +383,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
|
||||
@@ -470,15 +435,10 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.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();
|
||||
@@ -533,11 +493,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
UploadPlaylistResponse res = sdk.playlists().uploadPlaylist()
|
||||
|
||||
@@ -37,11 +37,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetCompanionsDataResponse res = sdk.plex().getCompanionsData()
|
||||
@@ -93,11 +88,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetUserFriendsResponse res = sdk.plex().getUserFriends()
|
||||
@@ -148,11 +138,6 @@ public class Application {
|
||||
public static void main(String[] args) throws GetGeoDataBadRequest, GetGeoDataUnauthorized, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetGeoDataResponse res = sdk.plex().getGeoData()
|
||||
@@ -204,11 +189,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetHomeDataResponse res = sdk.plex().getHomeData()
|
||||
@@ -257,11 +237,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||
@@ -285,7 +260,7 @@ public class Application {
|
||||
| `includeHttps` | [Optional\<IncludeHttps>](../../models/operations/IncludeHttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 |
|
||||
| `includeRelay` | [Optional\<IncludeRelay>](../../models/operations/IncludeRelay.md) | :heavy_minus_sign: | Include Relay addresses in the results <br/>E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400<br/> | 1 |
|
||||
| `includeIPv6` | [Optional\<IncludeIPv6>](../../models/operations/IncludeIPv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 |
|
||||
| `clientID` | *Optional\<String>* | :heavy_minus_sign: | An opaque identifier unique to the client (UUID, serial number, or other unique device ID) | 3381b62b-9ab7-4e37-827b-203e9809eb58 |
|
||||
| `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 |
|
||||
| `serverURL` | *String* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 |
|
||||
|
||||
### Response
|
||||
@@ -320,14 +295,14 @@ public class Application {
|
||||
public static void main(String[] args) throws GetPinBadRequest, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetPinRequest req = GetPinRequest.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.build();
|
||||
|
||||
GetPinResponse res = sdk.plex().getPin()
|
||||
@@ -380,15 +355,15 @@ public class Application {
|
||||
public static void main(String[] args) throws GetTokenByPinIdBadRequest, GetTokenByPinIdResponseBody, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetTokenByPinIdRequest req = GetTokenByPinIdRequest.builder()
|
||||
.pinID(408895L)
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.build();
|
||||
|
||||
GetTokenByPinIdResponse res = sdk.plex().getTokenByPinId()
|
||||
|
||||
@@ -26,3 +26,6 @@ The following SDKs are generated from the OpenAPI Specification. They are automa
|
||||
| PHP | [GitHub](https://github.com/LukeHagar/plexphp) | [Releases](https://github.com/LukeHagar/plexphp/releases) | - |
|
||||
| Java | [GitHub](https://github.com/LukeHagar/plexjava) | [Releases](https://github.com/LukeHagar/plexjava/releases) | - |
|
||||
| C# | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases) | -
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
@@ -45,16 +45,11 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
PerformSearchResponse res = sdk.search().performSearch()
|
||||
.query("dylan")
|
||||
.sectionId(9372.69d)
|
||||
.sectionId(9487.88d)
|
||||
.limit(5d)
|
||||
.call();
|
||||
|
||||
@@ -108,16 +103,11 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
||||
.query("dead+poop")
|
||||
.sectionId(4094.80d)
|
||||
.sectionId(4094.8d)
|
||||
.limit(5d)
|
||||
.call();
|
||||
|
||||
@@ -167,11 +157,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetSearchResultsResponse res = sdk.search().getSearchResults()
|
||||
|
||||
@@ -39,11 +39,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerCapabilitiesResponse res = sdk.server().getServerCapabilities()
|
||||
@@ -89,11 +84,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerPreferencesResponse res = sdk.server().getServerPreferences()
|
||||
@@ -139,11 +129,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetAvailableClientsResponse res = sdk.server().getAvailableClients()
|
||||
@@ -189,11 +174,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetDevicesResponse res = sdk.server().getDevices()
|
||||
@@ -237,11 +217,6 @@ public class Application {
|
||||
public static void main(String[] args) throws GetServerIdentityRequestTimeout, Exception {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerIdentityResponse res = sdk.server().getServerIdentity()
|
||||
@@ -286,11 +261,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetMyPlexAccountResponse res = sdk.server().getMyPlexAccount()
|
||||
@@ -340,19 +310,14 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
|
||||
.width(110d)
|
||||
.height(165d)
|
||||
.opacity(100L)
|
||||
.blur(20d)
|
||||
.minSize(MinSize.ZERO)
|
||||
.blur(0d)
|
||||
.minSize(MinSize.ONE)
|
||||
.upscale(Upscale.ONE)
|
||||
.url("/library/metadata/49564/thumb/1654258204")
|
||||
.build();
|
||||
@@ -405,11 +370,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetMediaProvidersResponse res = sdk.server().getMediaProviders()
|
||||
@@ -462,11 +422,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetServerListResponse res = sdk.server().getServerList()
|
||||
|
||||
@@ -34,11 +34,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetSessionsResponse res = sdk.sessions().getSessions()
|
||||
@@ -85,15 +80,10 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetSessionHistoryResponse res = sdk.sessions().getSessionHistory()
|
||||
.sort("<value>")
|
||||
.sort("viewedAt:desc")
|
||||
.accountId(1L)
|
||||
.filter(QueryParamFilter.builder()
|
||||
.build())
|
||||
@@ -149,11 +139,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetTranscodeSessionsResponse res = sdk.sessions().getTranscodeSessions()
|
||||
@@ -199,11 +184,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
StopTranscodeSessionResponse res = sdk.sessions().stopTranscodeSession()
|
||||
|
||||
@@ -33,11 +33,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetStatisticsResponse res = sdk.statistics().getStatistics()
|
||||
@@ -90,11 +85,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetResourcesStatisticsResponse res = sdk.statistics().getResourcesStatistics()
|
||||
@@ -147,11 +137,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetBandwidthStatisticsResponse res = sdk.statistics().getBandwidthStatistics()
|
||||
|
||||
@@ -34,11 +34,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetUpdateStatusResponse res = sdk.updater().getUpdateStatus()
|
||||
@@ -85,11 +80,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
CheckForUpdatesResponse res = sdk.updater().checkForUpdates()
|
||||
@@ -143,11 +133,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
ApplyUpdatesResponse res = sdk.updater().applyUpdates()
|
||||
|
||||
@@ -34,11 +34,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetTimelineRequest req = GetTimelineRequest.builder()
|
||||
@@ -103,11 +98,6 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
|
||||
|
||||
@@ -33,18 +33,11 @@ public class Application {
|
||||
|
||||
PlexAPI sdk = PlexAPI.builder()
|
||||
.accessToken("<YOUR_API_KEY_HERE>")
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.clientName("Plex for Roku")
|
||||
.clientVersion("2.4.1")
|
||||
.platform("Roku")
|
||||
.deviceNickname("Roku 3")
|
||||
.build();
|
||||
|
||||
GetWatchListRequest req = GetWatchListRequest.builder()
|
||||
.filter(Filter.AVAILABLE)
|
||||
.xPlexToken("CV5xoxjTpFKUzBTShsaf")
|
||||
.xPlexContainerStart(0)
|
||||
.xPlexContainerSize(50)
|
||||
.build();
|
||||
|
||||
GetWatchListResponse res = sdk.watchlist().getWatchList()
|
||||
|
||||
@@ -78,10 +78,10 @@ public class Activities implements
|
||||
_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()
|
||||
@@ -89,7 +89,7 @@ public class Activities implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -100,7 +100,7 @@ public class Activities implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -109,7 +109,7 @@ public class Activities implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -118,7 +118,7 @@ public class Activities implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -229,16 +237,16 @@ public class Activities implements
|
||||
CancelServerActivitiesRequest.class,
|
||||
_baseUrl,
|
||||
"/activities/{activityUUID}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_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()
|
||||
@@ -246,7 +254,7 @@ public class Activities implements
|
||||
new BeforeRequestContextImpl(
|
||||
"cancelServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -257,7 +265,7 @@ public class Activities implements
|
||||
new AfterErrorContextImpl(
|
||||
"cancelServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -266,7 +274,7 @@ public class Activities implements
|
||||
new AfterSuccessContextImpl(
|
||||
"cancelServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -275,7 +283,7 @@ public class Activities implements
|
||||
new AfterErrorContextImpl(
|
||||
"cancelServerActivities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -122,11 +122,11 @@ public class Authentication implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetTransientTokenRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -134,7 +134,7 @@ public class Authentication implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getTransientToken",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -145,7 +145,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTransientToken",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -154,7 +154,7 @@ public class Authentication implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getTransientToken",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -163,7 +163,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTransientToken",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -275,11 +283,11 @@ public class Authentication implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSourceConnectionInformationRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -287,7 +295,7 @@ public class Authentication implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getSourceConnectionInformation",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -298,7 +306,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSourceConnectionInformation",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -307,7 +315,7 @@ public class Authentication implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getSourceConnectionInformation",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -316,7 +324,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSourceConnectionInformation",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -426,10 +442,10 @@ public class Authentication implements
|
||||
_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()
|
||||
@@ -437,7 +453,7 @@ public class Authentication implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -448,7 +464,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -457,7 +473,7 @@ public class Authentication implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -466,7 +482,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTokenDetails",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -601,8 +625,8 @@ public class Authentication implements
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
SDKConfiguration.USER_AGENT);
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
Optional<SecuritySource> _hookSecuritySource = Optional.empty();
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -610,7 +634,7 @@ public class Authentication implements
|
||||
new BeforeRequestContextImpl(
|
||||
"post-users-sign-in-data",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -621,7 +645,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"post-users-sign-in-data",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -630,7 +654,7 @@ public class Authentication implements
|
||||
new AfterSuccessContextImpl(
|
||||
"post-users-sign-in-data",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -639,7 +663,7 @@ public class Authentication implements
|
||||
new AfterErrorContextImpl(
|
||||
"post-users-sign-in-data",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -90,10 +90,10 @@ public class Butler implements
|
||||
_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()
|
||||
@@ -101,7 +101,7 @@ public class Butler implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getButlerTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -112,7 +112,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"getButlerTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -121,7 +121,7 @@ public class Butler implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getButlerTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -130,7 +130,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"getButlerTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -247,10 +255,10 @@ public class Butler implements
|
||||
_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()
|
||||
@@ -258,7 +266,7 @@ public class Butler implements
|
||||
new BeforeRequestContextImpl(
|
||||
"startAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -269,7 +277,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"startAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -278,7 +286,7 @@ public class Butler implements
|
||||
new AfterSuccessContextImpl(
|
||||
"startAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -287,7 +295,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"startAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -385,10 +401,10 @@ public class Butler implements
|
||||
_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()
|
||||
@@ -396,7 +412,7 @@ public class Butler implements
|
||||
new BeforeRequestContextImpl(
|
||||
"stopAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -407,7 +423,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"stopAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -416,7 +432,7 @@ public class Butler implements
|
||||
new AfterSuccessContextImpl(
|
||||
"stopAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -425,7 +441,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"stopAllTasks",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -535,16 +559,16 @@ public class Butler implements
|
||||
StartTaskRequest.class,
|
||||
_baseUrl,
|
||||
"/butler/{taskName}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||
_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()
|
||||
@@ -552,7 +576,7 @@ public class Butler implements
|
||||
new BeforeRequestContextImpl(
|
||||
"startTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -563,7 +587,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"startTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -572,7 +596,7 @@ public class Butler implements
|
||||
new AfterSuccessContextImpl(
|
||||
"startTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -581,7 +605,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"startTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -683,16 +715,16 @@ public class Butler implements
|
||||
StopTaskRequest.class,
|
||||
_baseUrl,
|
||||
"/butler/{taskName}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_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()
|
||||
@@ -700,7 +732,7 @@ public class Butler implements
|
||||
new BeforeRequestContextImpl(
|
||||
"stopTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -711,7 +743,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"stopTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -720,7 +752,7 @@ public class Butler implements
|
||||
new AfterSuccessContextImpl(
|
||||
"stopTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -729,7 +761,7 @@ public class Butler implements
|
||||
new AfterErrorContextImpl(
|
||||
"stopTask",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -107,11 +107,11 @@ public class Hubs implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetGlobalHubsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -119,7 +119,7 @@ public class Hubs implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getGlobalHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -130,7 +130,7 @@ public class Hubs implements
|
||||
new AfterErrorContextImpl(
|
||||
"getGlobalHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -139,7 +139,7 @@ public class Hubs implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getGlobalHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -148,7 +148,7 @@ public class Hubs implements
|
||||
new AfterErrorContextImpl(
|
||||
"getGlobalHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -263,11 +271,11 @@ public class Hubs implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetRecentlyAddedRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -275,7 +283,7 @@ public class Hubs implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-recently-added",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -286,7 +294,7 @@ public class Hubs implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-recently-added",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -295,7 +303,7 @@ public class Hubs implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-recently-added",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -304,7 +312,7 @@ public class Hubs implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-recently-added",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -404,7 +420,7 @@ public class Hubs implements
|
||||
GetLibraryHubsRequest.class,
|
||||
_baseUrl,
|
||||
"/hubs/sections/{sectionId}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
@@ -414,11 +430,11 @@ public class Hubs implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetLibraryHubsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -426,7 +442,7 @@ public class Hubs implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getLibraryHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -437,7 +453,7 @@ public class Hubs implements
|
||||
new AfterErrorContextImpl(
|
||||
"getLibraryHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -446,7 +462,7 @@ public class Hubs implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getLibraryHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -455,7 +471,7 @@ public class Hubs implements
|
||||
new AfterErrorContextImpl(
|
||||
"getLibraryHubs",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -106,11 +106,11 @@ public class Log implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
LogLineRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -118,7 +118,7 @@ public class Log implements
|
||||
new BeforeRequestContextImpl(
|
||||
"logLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -129,7 +129,7 @@ public class Log implements
|
||||
new AfterErrorContextImpl(
|
||||
"logLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -138,7 +138,7 @@ public class Log implements
|
||||
new AfterSuccessContextImpl(
|
||||
"logLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -147,7 +147,7 @@ public class Log implements
|
||||
new AfterErrorContextImpl(
|
||||
"logLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -300,10 +308,10 @@ public class Log implements
|
||||
_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()
|
||||
@@ -311,7 +319,7 @@ public class Log implements
|
||||
new BeforeRequestContextImpl(
|
||||
"logMultiLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -322,7 +330,7 @@ public class Log implements
|
||||
new AfterErrorContextImpl(
|
||||
"logMultiLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -331,7 +339,7 @@ public class Log implements
|
||||
new AfterSuccessContextImpl(
|
||||
"logMultiLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -340,7 +348,7 @@ public class Log implements
|
||||
new AfterErrorContextImpl(
|
||||
"logMultiLine",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -438,10 +454,10 @@ public class Log implements
|
||||
_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()
|
||||
@@ -449,7 +465,7 @@ public class Log implements
|
||||
new BeforeRequestContextImpl(
|
||||
"enablePaperTrail",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -460,7 +476,7 @@ public class Log implements
|
||||
new AfterErrorContextImpl(
|
||||
"enablePaperTrail",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -469,7 +485,7 @@ public class Log implements
|
||||
new AfterSuccessContextImpl(
|
||||
"enablePaperTrail",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -478,7 +494,7 @@ public class Log implements
|
||||
new AfterErrorContextImpl(
|
||||
"enablePaperTrail",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -102,11 +102,11 @@ public class Media implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
MarkPlayedRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -114,7 +114,7 @@ public class Media implements
|
||||
new BeforeRequestContextImpl(
|
||||
"markPlayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -125,7 +125,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"markPlayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -134,7 +134,7 @@ public class Media implements
|
||||
new AfterSuccessContextImpl(
|
||||
"markPlayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -143,7 +143,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"markPlayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -251,11 +259,11 @@ public class Media implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
MarkUnplayedRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -263,7 +271,7 @@ public class Media implements
|
||||
new BeforeRequestContextImpl(
|
||||
"markUnplayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -274,7 +282,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"markUnplayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -283,7 +291,7 @@ public class Media implements
|
||||
new AfterSuccessContextImpl(
|
||||
"markUnplayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -292,7 +300,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"markUnplayed",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -408,11 +424,11 @@ public class Media implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
UpdatePlayProgressRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -420,7 +436,7 @@ public class Media implements
|
||||
new BeforeRequestContextImpl(
|
||||
"updatePlayProgress",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -431,7 +447,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"updatePlayProgress",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -440,7 +456,7 @@ public class Media implements
|
||||
new AfterSuccessContextImpl(
|
||||
"updatePlayProgress",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -449,7 +465,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"updatePlayProgress",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -543,7 +567,7 @@ public class Media implements
|
||||
GetBannerImageRequest.class,
|
||||
_baseUrl,
|
||||
"/library/metadata/{ratingKey}/banner",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "image/jpeg")
|
||||
@@ -553,12 +577,12 @@ public class Media implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetBannerImageRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -566,7 +590,7 @@ public class Media implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-banner-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -577,7 +601,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-banner-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -586,7 +610,7 @@ public class Media implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-banner-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -595,7 +619,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-banner-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -700,7 +732,7 @@ public class Media implements
|
||||
GetThumbImageRequest.class,
|
||||
_baseUrl,
|
||||
"/library/metadata/{ratingKey}/thumb",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "image/jpeg")
|
||||
@@ -710,12 +742,12 @@ public class Media implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetThumbImageRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -723,7 +755,7 @@ public class Media implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-thumb-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -734,7 +766,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-thumb-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -743,7 +775,7 @@ public class Media implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-thumb-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -752,7 +784,7 @@ public class Media implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-thumb-image",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -139,11 +139,11 @@ public class Playlists implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
CreatePlaylistRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -151,7 +151,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"createPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -162,7 +162,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"createPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -171,7 +171,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"createPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -180,7 +180,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"createPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -312,11 +320,11 @@ public class Playlists implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetPlaylistsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -324,7 +332,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getPlaylists",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -335,7 +343,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPlaylists",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -344,7 +352,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getPlaylists",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -353,7 +361,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPlaylists",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -468,16 +484,16 @@ public class Playlists implements
|
||||
GetPlaylistRequest.class,
|
||||
_baseUrl,
|
||||
"/playlists/{playlistID}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
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()
|
||||
@@ -485,7 +501,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -496,7 +512,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -505,7 +521,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -514,7 +530,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -627,16 +651,16 @@ public class Playlists implements
|
||||
DeletePlaylistRequest.class,
|
||||
_baseUrl,
|
||||
"/playlists/{playlistID}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_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()
|
||||
@@ -644,7 +668,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"deletePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -655,7 +679,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"deletePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -664,7 +688,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"deletePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -673,7 +697,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"deletePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -794,7 +826,7 @@ public class Playlists implements
|
||||
UpdatePlaylistRequest.class,
|
||||
_baseUrl,
|
||||
"/playlists/{playlistID}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
@@ -804,11 +836,11 @@ public class Playlists implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
UpdatePlaylistRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -816,7 +848,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"updatePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -827,7 +859,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"updatePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -836,7 +868,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"updatePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -845,7 +877,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"updatePlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -962,7 +1002,7 @@ public class Playlists implements
|
||||
GetPlaylistContentsRequest.class,
|
||||
_baseUrl,
|
||||
"/playlists/{playlistID}/items",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
@@ -972,11 +1012,11 @@ public class Playlists implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetPlaylistContentsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -984,7 +1024,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -995,7 +1035,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1004,7 +1044,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1013,7 +1053,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -1126,16 +1174,16 @@ public class Playlists implements
|
||||
ClearPlaylistContentsRequest.class,
|
||||
_baseUrl,
|
||||
"/playlists/{playlistID}/items",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_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()
|
||||
@@ -1143,7 +1191,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"clearPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1154,7 +1202,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"clearPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1163,7 +1211,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"clearPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1172,7 +1220,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"clearPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -1298,7 +1354,7 @@ public class Playlists implements
|
||||
AddPlaylistContentsRequest.class,
|
||||
_baseUrl,
|
||||
"/playlists/{playlistID}/items",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "PUT");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
@@ -1308,11 +1364,11 @@ public class Playlists implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
AddPlaylistContentsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -1320,7 +1376,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"addPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1331,7 +1387,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"addPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1340,7 +1396,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"addPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1349,7 +1405,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"addPlaylistContents",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -1486,11 +1550,11 @@ public class Playlists implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
UploadPlaylistRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -1498,7 +1562,7 @@ public class Playlists implements
|
||||
new BeforeRequestContextImpl(
|
||||
"uploadPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1509,7 +1573,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"uploadPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1518,7 +1582,7 @@ public class Playlists implements
|
||||
new AfterSuccessContextImpl(
|
||||
"uploadPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1527,7 +1591,7 @@ public class Playlists implements
|
||||
new AfterErrorContextImpl(
|
||||
"uploadPlaylist",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -164,10 +164,10 @@ public class Plex implements
|
||||
_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()
|
||||
@@ -175,7 +175,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getCompanionsData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -186,7 +186,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getCompanionsData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -195,7 +195,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getCompanionsData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -204,7 +204,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getCompanionsData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -325,10 +333,10 @@ public class Plex implements
|
||||
_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()
|
||||
@@ -336,7 +344,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getUserFriends",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -347,7 +355,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getUserFriends",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -356,7 +364,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getUserFriends",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -365,7 +373,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getUserFriends",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -486,7 +502,7 @@ public class Plex implements
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = Optional.empty();
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -494,7 +510,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getGeoData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -505,7 +521,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getGeoData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -514,7 +530,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getGeoData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -523,7 +539,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getGeoData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -630,10 +654,10 @@ public class Plex implements
|
||||
_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()
|
||||
@@ -641,7 +665,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getHomeData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -652,7 +676,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getHomeData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -661,7 +685,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getHomeData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -670,7 +694,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getHomeData",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -763,11 +795,13 @@ public class Plex implements
|
||||
/**
|
||||
* Get Server Resources
|
||||
* Get Plex server access tokens and server connections
|
||||
* @param clientID An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
|
||||
* @return The response from the API call
|
||||
* @throws Exception if the API call fails
|
||||
*/
|
||||
public GetServerResourcesResponse getServerResourcesDirect() throws Exception {
|
||||
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
public GetServerResourcesResponse getServerResources(
|
||||
String clientID) throws Exception {
|
||||
return getServerResources(Optional.empty(), Optional.empty(), Optional.empty(), clientID, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -787,7 +821,7 @@ public class Plex implements
|
||||
Optional<? extends IncludeHttps> includeHttps,
|
||||
Optional<? extends IncludeRelay> includeRelay,
|
||||
Optional<? extends IncludeIPv6> includeIPv6,
|
||||
Optional<String> clientID,
|
||||
String clientID,
|
||||
Optional<String> serverURL) throws Exception {
|
||||
GetServerResourcesRequest request =
|
||||
GetServerResourcesRequest
|
||||
@@ -814,12 +848,12 @@ public class Plex implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetServerResourcesRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -827,7 +861,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-server-resources",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -838,7 +872,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-server-resources",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -847,7 +881,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-server-resources",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -856,7 +890,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-server-resources",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -920,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,
|
||||
@@ -985,9 +1027,9 @@ public class Plex implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetPinRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
Optional<SecuritySource> _hookSecuritySource = Optional.empty();
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -995,7 +1037,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getPin",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1006,7 +1048,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPin",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1015,7 +1057,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getPin",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1024,7 +1066,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getPin",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -1072,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,
|
||||
@@ -1129,14 +1179,14 @@ public class Plex implements
|
||||
GetTokenByPinIdRequest.class,
|
||||
_baseUrl,
|
||||
"/pins/{pinID}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
SDKConfiguration.USER_AGENT);
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
Optional<SecuritySource> _hookSecuritySource = Optional.empty();
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -1144,7 +1194,7 @@ public class Plex implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getTokenByPinId",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1155,7 +1205,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTokenByPinId",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1164,7 +1214,7 @@ public class Plex implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getTokenByPinId",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1173,7 +1223,7 @@ public class Plex implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTokenByPinId",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -1237,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,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
package dev.plexapi.sdk;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
|
||||
import dev.plexapi.sdk.utils.HTTPClient;
|
||||
import dev.plexapi.sdk.utils.RetryConfig;
|
||||
import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
|
||||
@@ -13,6 +12,7 @@ import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.String;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
||||
@@ -458,89 +458,16 @@ public class PlexAPI {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows setting the clientID parameter for all supported operations.
|
||||
*
|
||||
* @param clientID The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder clientID(String clientID) {
|
||||
if (!this.sdkConfiguration.globals.get("parameters").containsKey("header")) {
|
||||
this.sdkConfiguration.globals.get("parameters").put("header", new java.util.HashMap<>());
|
||||
}
|
||||
|
||||
this.sdkConfiguration.globals.get("parameters").get("header").put("clientID", clientID);
|
||||
|
||||
return this;
|
||||
// Visible for testing, may be accessed via reflection in tests
|
||||
Builder _hooks(dev.plexapi.sdk.utils.Hooks hooks) {
|
||||
sdkConfiguration.setHooks(hooks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows setting the clientName parameter for all supported operations.
|
||||
*
|
||||
* @param clientName The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder clientName(String clientName) {
|
||||
if (!this.sdkConfiguration.globals.get("parameters").containsKey("header")) {
|
||||
this.sdkConfiguration.globals.get("parameters").put("header", new java.util.HashMap<>());
|
||||
}
|
||||
|
||||
this.sdkConfiguration.globals.get("parameters").get("header").put("clientName", clientName);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows setting the clientVersion parameter for all supported operations.
|
||||
*
|
||||
* @param clientVersion The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder clientVersion(String clientVersion) {
|
||||
if (!this.sdkConfiguration.globals.get("parameters").containsKey("header")) {
|
||||
this.sdkConfiguration.globals.get("parameters").put("header", new java.util.HashMap<>());
|
||||
}
|
||||
|
||||
this.sdkConfiguration.globals.get("parameters").get("header").put("clientVersion", clientVersion);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows setting the platform parameter for all supported operations.
|
||||
*
|
||||
* @param platform The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder platform(String platform) {
|
||||
if (!this.sdkConfiguration.globals.get("parameters").containsKey("header")) {
|
||||
this.sdkConfiguration.globals.get("parameters").put("header", new java.util.HashMap<>());
|
||||
}
|
||||
|
||||
this.sdkConfiguration.globals.get("parameters").get("header").put("platform", platform);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows setting the deviceNickname parameter for all supported operations.
|
||||
*
|
||||
* @param deviceNickname The value to set.
|
||||
* @return The builder instance.
|
||||
*/
|
||||
public Builder deviceNickname(String deviceNickname) {
|
||||
if (!this.sdkConfiguration.globals.get("parameters").containsKey("header")) {
|
||||
this.sdkConfiguration.globals.get("parameters").put("header", new java.util.HashMap<>());
|
||||
}
|
||||
|
||||
this.sdkConfiguration.globals.get("parameters").get("header").put("deviceNickname", deviceNickname);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// Visible for testing, will be accessed via reflection
|
||||
void _hooks(dev.plexapi.sdk.utils.Hooks hooks) {
|
||||
sdkConfiguration.setHooks(hooks);
|
||||
// Visible for testing, may be accessed via reflection in tests
|
||||
Builder _hooks(Consumer<? super dev.plexapi.sdk.utils.Hooks> consumer) {
|
||||
consumer.accept(sdkConfiguration.hooks());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,7 @@ import dev.plexapi.sdk.utils.HTTPClient;
|
||||
import dev.plexapi.sdk.utils.Hook.SdkInitData;
|
||||
import dev.plexapi.sdk.utils.Hooks;
|
||||
import dev.plexapi.sdk.utils.RetryConfig;
|
||||
import java.lang.Object;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.ArrayList;
|
||||
@@ -24,9 +24,16 @@ class SDKConfiguration {
|
||||
public Optional<SecuritySource> securitySource() {
|
||||
return Optional.ofNullable(securitySource);
|
||||
}
|
||||
|
||||
public HTTPClient defaultClient;
|
||||
|
||||
public String serverUrl;
|
||||
|
||||
public String resolvedServerUrl() {
|
||||
return Utils.templateUrl(serverUrl, getServerVariableDefaults());
|
||||
}
|
||||
public int serverIdx = 0;
|
||||
@SuppressWarnings("serial")
|
||||
List<Map<String, String>> serverDefaults = new ArrayList<>(){ {
|
||||
add(new HashMap<>(){ {
|
||||
put("protocol", "https");
|
||||
@@ -36,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.10.1";
|
||||
public static final String GEN_VERSION = "2.457.9";
|
||||
public static final String SDK_VERSION = "0.11.4";
|
||||
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",
|
||||
@@ -64,18 +71,15 @@ class SDKConfiguration {
|
||||
public void initialize() {
|
||||
SDKHooks.initialize(_hooks);
|
||||
// apply the sdk init hook immediately
|
||||
SdkInitData data = _hooks.sdkInit(new SdkInitData(serverUrl, defaultClient));
|
||||
SdkInitData data = _hooks.sdkInit(new SdkInitData(resolvedServerUrl(), defaultClient));
|
||||
this.serverUrl = data.baseUrl();
|
||||
this.defaultClient = data.client();
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public Map<String, Map<String, Map<String,Object>>> globals = new HashMap<>(){ {
|
||||
put("parameters", new HashMap<>());
|
||||
} };
|
||||
|
||||
public Map<String, String> getServerVariableDefaults() {
|
||||
return serverDefaults.get(this.serverIdx);
|
||||
}
|
||||
|
||||
public Map<String, String> getServerVariableDefaults() {
|
||||
return serverDefaults.get(this.serverIdx);
|
||||
}
|
||||
public Optional<RetryConfig> retryConfig = Optional.empty();
|
||||
}
|
||||
|
||||
@@ -146,11 +146,11 @@ public class Search implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
PerformSearchRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -158,7 +158,7 @@ public class Search implements
|
||||
new BeforeRequestContextImpl(
|
||||
"performSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -169,7 +169,7 @@ public class Search implements
|
||||
new AfterErrorContextImpl(
|
||||
"performSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -178,7 +178,7 @@ public class Search implements
|
||||
new AfterSuccessContextImpl(
|
||||
"performSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -187,7 +187,7 @@ public class Search implements
|
||||
new AfterErrorContextImpl(
|
||||
"performSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -325,11 +333,11 @@ public class Search implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
PerformVoiceSearchRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -337,7 +345,7 @@ public class Search implements
|
||||
new BeforeRequestContextImpl(
|
||||
"performVoiceSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -348,7 +356,7 @@ public class Search implements
|
||||
new AfterErrorContextImpl(
|
||||
"performVoiceSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -357,7 +365,7 @@ public class Search implements
|
||||
new AfterSuccessContextImpl(
|
||||
"performVoiceSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -366,7 +374,7 @@ public class Search implements
|
||||
new AfterErrorContextImpl(
|
||||
"performVoiceSearch",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -474,11 +490,11 @@ public class Search implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSearchResultsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -486,7 +502,7 @@ public class Search implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getSearchResults",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -497,7 +513,7 @@ public class Search implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSearchResults",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -506,7 +522,7 @@ public class Search implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getSearchResults",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -515,7 +531,7 @@ public class Search implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSearchResults",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -114,10 +114,10 @@ public class Server implements
|
||||
_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()
|
||||
@@ -125,7 +125,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getServerCapabilities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -136,7 +136,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerCapabilities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -145,7 +145,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getServerCapabilities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -154,7 +154,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerCapabilities",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -261,10 +269,10 @@ public class Server implements
|
||||
_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()
|
||||
@@ -272,7 +280,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getServerPreferences",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -283,7 +291,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerPreferences",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -292,7 +300,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getServerPreferences",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -301,7 +309,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerPreferences",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -408,10 +424,10 @@ public class Server implements
|
||||
_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()
|
||||
@@ -419,7 +435,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getAvailableClients",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -430,7 +446,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getAvailableClients",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -439,7 +455,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getAvailableClients",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -448,7 +464,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getAvailableClients",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -555,10 +579,10 @@ public class Server implements
|
||||
_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()
|
||||
@@ -566,7 +590,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getDevices",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -577,7 +601,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getDevices",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -586,7 +610,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getDevices",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -595,7 +619,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getDevices",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -702,7 +734,7 @@ public class Server implements
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
SDKConfiguration.USER_AGENT);
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = Optional.empty();
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -710,7 +742,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-server-identity",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -721,7 +753,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-server-identity",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -730,7 +762,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-server-identity",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -739,7 +771,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-server-identity",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -830,10 +870,10 @@ public class Server implements
|
||||
_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()
|
||||
@@ -841,7 +881,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getMyPlexAccount",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -852,7 +892,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getMyPlexAccount",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -861,7 +901,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getMyPlexAccount",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -870,7 +910,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getMyPlexAccount",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -985,11 +1033,11 @@ public class Server implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetResizedPhotoRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -997,7 +1045,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getResizedPhoto",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1008,7 +1056,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getResizedPhoto",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1017,7 +1065,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getResizedPhoto",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1026,7 +1074,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getResizedPhoto",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -1130,11 +1186,11 @@ public class Server implements
|
||||
_req.addHeader("Accept", "application/json")
|
||||
.addHeader("user-agent",
|
||||
SDKConfiguration.USER_AGENT);
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -1142,7 +1198,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-media-providers",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1153,7 +1209,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-media-providers",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1162,7 +1218,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-media-providers",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1171,7 +1227,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-media-providers",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -1278,10 +1342,10 @@ public class Server implements
|
||||
_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()
|
||||
@@ -1289,7 +1353,7 @@ public class Server implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getServerList",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -1300,7 +1364,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerList",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -1309,7 +1373,7 @@ public class Server implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getServerList",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -1318,7 +1382,7 @@ public class Server implements
|
||||
new AfterErrorContextImpl(
|
||||
"getServerList",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -87,10 +87,10 @@ public class Sessions implements
|
||||
_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()
|
||||
@@ -98,7 +98,7 @@ public class Sessions implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -109,7 +109,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -118,7 +118,7 @@ public class Sessions implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -127,7 +127,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -270,11 +278,11 @@ public class Sessions implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetSessionHistoryRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -282,7 +290,7 @@ public class Sessions implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getSessionHistory",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -293,7 +301,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSessionHistory",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -302,7 +310,7 @@ public class Sessions implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getSessionHistory",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -311,7 +319,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"getSessionHistory",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -418,10 +434,10 @@ public class Sessions implements
|
||||
_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()
|
||||
@@ -429,7 +445,7 @@ public class Sessions implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getTranscodeSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -440,7 +456,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTranscodeSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -449,7 +465,7 @@ public class Sessions implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getTranscodeSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -458,7 +474,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTranscodeSessions",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -569,16 +593,16 @@ public class Sessions implements
|
||||
StopTranscodeSessionRequest.class,
|
||||
_baseUrl,
|
||||
"/transcode/sessions/{sessionKey}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "DELETE");
|
||||
_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()
|
||||
@@ -586,7 +610,7 @@ public class Sessions implements
|
||||
new BeforeRequestContextImpl(
|
||||
"stopTranscodeSession",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -597,7 +621,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"stopTranscodeSession",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -606,7 +630,7 @@ public class Sessions implements
|
||||
new AfterSuccessContextImpl(
|
||||
"stopTranscodeSession",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -615,7 +639,7 @@ public class Sessions implements
|
||||
new AfterErrorContextImpl(
|
||||
"stopTranscodeSession",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -106,11 +106,11 @@ public class Statistics implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetStatisticsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -118,7 +118,7 @@ public class Statistics implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -129,7 +129,7 @@ public class Statistics implements
|
||||
new AfterErrorContextImpl(
|
||||
"getStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -138,7 +138,7 @@ public class Statistics implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -147,7 +147,7 @@ public class Statistics implements
|
||||
new AfterErrorContextImpl(
|
||||
"getStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -278,11 +286,11 @@ public class Statistics implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetResourcesStatisticsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -290,7 +298,7 @@ public class Statistics implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getResourcesStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -301,7 +309,7 @@ public class Statistics implements
|
||||
new AfterErrorContextImpl(
|
||||
"getResourcesStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -310,7 +318,7 @@ public class Statistics implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getResourcesStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -319,7 +327,7 @@ public class Statistics implements
|
||||
new AfterErrorContextImpl(
|
||||
"getResourcesStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -450,11 +466,11 @@ public class Statistics implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetBandwidthStatisticsRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -462,7 +478,7 @@ public class Statistics implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getBandwidthStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -473,7 +489,7 @@ public class Statistics implements
|
||||
new AfterErrorContextImpl(
|
||||
"getBandwidthStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -482,7 +498,7 @@ public class Statistics implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getBandwidthStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -491,7 +507,7 @@ public class Statistics implements
|
||||
new AfterErrorContextImpl(
|
||||
"getBandwidthStatistics",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -82,10 +82,10 @@ public class Updater implements
|
||||
_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()
|
||||
@@ -93,7 +93,7 @@ public class Updater implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getUpdateStatus",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -104,7 +104,7 @@ public class Updater implements
|
||||
new AfterErrorContextImpl(
|
||||
"getUpdateStatus",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -113,7 +113,7 @@ public class Updater implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getUpdateStatus",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -122,7 +122,7 @@ public class Updater implements
|
||||
new AfterErrorContextImpl(
|
||||
"getUpdateStatus",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -251,11 +259,11 @@ public class Updater implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
CheckForUpdatesRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -263,7 +271,7 @@ public class Updater implements
|
||||
new BeforeRequestContextImpl(
|
||||
"checkForUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -274,7 +282,7 @@ public class Updater implements
|
||||
new AfterErrorContextImpl(
|
||||
"checkForUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -283,7 +291,7 @@ public class Updater implements
|
||||
new AfterSuccessContextImpl(
|
||||
"checkForUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -292,7 +300,7 @@ public class Updater implements
|
||||
new AfterErrorContextImpl(
|
||||
"checkForUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -416,11 +432,11 @@ public class Updater implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
ApplyUpdatesRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -428,7 +444,7 @@ public class Updater implements
|
||||
new BeforeRequestContextImpl(
|
||||
"applyUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -439,7 +455,7 @@ public class Updater implements
|
||||
new AfterErrorContextImpl(
|
||||
"applyUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -448,7 +464,7 @@ public class Updater implements
|
||||
new AfterSuccessContextImpl(
|
||||
"applyUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -457,7 +473,7 @@ public class Updater implements
|
||||
new AfterErrorContextImpl(
|
||||
"applyUpdates",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -78,11 +78,11 @@ public class Video implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetTimelineRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -90,7 +90,7 @@ public class Video implements
|
||||
new BeforeRequestContextImpl(
|
||||
"getTimeline",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -101,7 +101,7 @@ public class Video implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTimeline",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -110,7 +110,7 @@ public class Video implements
|
||||
new AfterSuccessContextImpl(
|
||||
"getTimeline",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -119,7 +119,7 @@ public class Video implements
|
||||
new AfterErrorContextImpl(
|
||||
"getTimeline",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
@@ -221,11 +229,11 @@ public class Video implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
StartUniversalTranscodeRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -233,7 +241,7 @@ public class Video implements
|
||||
new BeforeRequestContextImpl(
|
||||
"startUniversalTranscode",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -244,7 +252,7 @@ public class Video implements
|
||||
new AfterErrorContextImpl(
|
||||
"startUniversalTranscode",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -253,7 +261,7 @@ public class Video implements
|
||||
new AfterSuccessContextImpl(
|
||||
"startUniversalTranscode",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -262,7 +270,7 @@ public class Video implements
|
||||
new AfterErrorContextImpl(
|
||||
"startUniversalTranscode",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -92,7 +92,7 @@ public class Watchlist implements
|
||||
GetWatchListRequest.class,
|
||||
_baseUrl,
|
||||
"/library/sections/watchlist/{filter}",
|
||||
request, this.sdkConfiguration.globals);
|
||||
request, null);
|
||||
|
||||
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||
_req.addHeader("Accept", "application/json")
|
||||
@@ -102,12 +102,12 @@ public class Watchlist implements
|
||||
_req.addQueryParams(Utils.getQueryParams(
|
||||
GetWatchListRequest.class,
|
||||
request,
|
||||
this.sdkConfiguration.globals));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals));
|
||||
|
||||
null));
|
||||
_req.addHeaders(Utils.getHeadersFromMetadata(request, null));
|
||||
|
||||
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||
Utils.configureSecurity(_req,
|
||||
this.sdkConfiguration.securitySource.getSecurity());
|
||||
|
||||
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||
HttpRequest _r =
|
||||
sdkConfiguration.hooks()
|
||||
@@ -115,7 +115,7 @@ public class Watchlist implements
|
||||
new BeforeRequestContextImpl(
|
||||
"get-watch-list",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_req.build());
|
||||
HttpResponse<InputStream> _httpRes;
|
||||
try {
|
||||
@@ -126,7 +126,7 @@ public class Watchlist implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-watch-list",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.of(_httpRes),
|
||||
Optional.empty());
|
||||
} else {
|
||||
@@ -135,7 +135,7 @@ public class Watchlist implements
|
||||
new AfterSuccessContextImpl(
|
||||
"get-watch-list",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
_httpRes);
|
||||
}
|
||||
} catch (Exception _e) {
|
||||
@@ -144,7 +144,7 @@ public class Watchlist implements
|
||||
new AfterErrorContextImpl(
|
||||
"get-watch-list",
|
||||
Optional.of(List.of()),
|
||||
sdkConfiguration.securitySource()),
|
||||
_hookSecuritySource),
|
||||
Optional.empty(),
|
||||
Optional.of(_e));
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user