Compare commits

..

6 Commits

Author SHA1 Message Date
speakeasybot
0077561a6a ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.535.1 2025-04-19 00:29:11 +00:00
speakeasybot
4b28ca3416 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.531.4 2025-04-14 00:32:09 +00:00
speakeasybot
dd781d1e27 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.529.1 2025-04-06 00:31:55 +00:00
speakeasybot
dcdcafc044 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.528.1 2025-04-03 00:29:22 +00:00
speakeasybot
04db2979db ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.526.6 2025-03-31 17:09:11 +00:00
Luke Hagar
c2eeb488c4 Update workflow.yaml 2025-03-31 12:05:52 -05:00
1108 changed files with 23187 additions and 9747 deletions

3
.gitattributes vendored
View File

@@ -8,5 +8,4 @@
*.bat text eol=crlf
# This allows generated code to be indexed correctly
*.java linguist-generated=false
*.java linguist-generated=false

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
java:
version: 0.13.1
version: 0.16.0
additionalDependencies: []
additionalPlugins: []
artifactID: plexapi

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.513.4
speakeasyVersion: 1.535.1
sources:
my-source:
sourceNamespace: my-source
@@ -8,19 +8,19 @@ sources:
- latest
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:2066ba94b55e21d651c79003e3cf402fb77c52a0969fc52310b3383fbed038f4
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
sourceRevisionDigest: sha256:b2f9599237ceb13cf8f9c1693e38b290177b65fb389cebf0c3c60b8ef4778615
sourceBlobDigest: sha256:f8df9ef88ada992cd981d601e6c0b45cc82db76aba3d915c2f9d08f90c81ced9
tags:
- latest
- speakeasy-sdk-regen-1741479884
- speakeasy-sdk-regen-1745022464
targets:
plexjava:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:2066ba94b55e21d651c79003e3cf402fb77c52a0969fc52310b3383fbed038f4
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
sourceRevisionDigest: sha256:b2f9599237ceb13cf8f9c1693e38b290177b65fb389cebf0c3c60b8ef4778615
sourceBlobDigest: sha256:f8df9ef88ada992cd981d601e6c0b45cc82db76aba3d915c2f9d08f90c81ced9
codeSamplesNamespace: code-samples-java-plexjava
codeSamplesRevisionDigest: sha256:4064f5ad7cfcedb8f9c65f1154bc2cdf5c92ebf8c60ba752d5537bb5692305e7
codeSamplesRevisionDigest: sha256:7d8c3b846b1e7bfd87558d16b7a6daceae1f8e2a3628296155e438ed1cd72721
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
@@ -42,3 +42,5 @@ workflow:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-java-plexjava
labelOverride:
fixedValue: PlexJava

View File

@@ -18,3 +18,5 @@ targets:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/plexapi/plexapi/code-samples-java-plexjava
labelOverride:
fixedValue: PlexJava

View File

@@ -69,7 +69,7 @@ The samples below show how a published SDK artifact is used:
Gradle:
```groovy
implementation 'dev.plexapi:plexapi:0.13.1'
implementation 'dev.plexapi:plexapi:0.16.0'
```
Maven:
@@ -77,7 +77,7 @@ Maven:
<dependency>
<groupId>dev.plexapi</groupId>
<artifactId>plexapi</artifactId>
<version>0.13.1</version>
<version>0.16.0</version>
</dependency>
```
@@ -94,6 +94,29 @@ On Windows:
```bash
gradlew.bat publishToMavenLocal -Pskip.signing
```
### Logging
A logging framework/facade has not yet been adopted but is under consideration.
For request and response logging (especially json bodies) use:
```java
SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning)
```
Example output:
```
Sending request: http://localhost:35123/bearer#global GET
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
Received response: (GET http://localhost:35123/bearer#global) 200
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
Response body:
{
"authenticated": true,
"token": "global"
}
```
WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
<!-- End SDK Installation [installation] -->
<!-- Start SDK Example Usage [usage] -->
@@ -177,6 +200,10 @@ public class Application {
* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
@@ -332,6 +359,7 @@ The default server `{protocol}://{ip}:{port}` contains variables and is set to `
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.SDK.Builder.ServerProtocol;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerCapabilitiesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerCapabilitiesResponse;
@@ -342,7 +370,7 @@ public class Application {
public static void main(String[] args) throws GetServerCapabilitiesBadRequest, GetServerCapabilitiesUnauthorized, Exception {
PlexAPI sdk = PlexAPI.builder()
.protocol("https")
.protocol(ServerProtocol.HTTPS)
.ip("e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9")
.port("40311")
.accessToken("<YOUR_API_KEY_HERE>")

View File

@@ -278,4 +278,54 @@ Based on:
### Generated
- [java v0.13.1] .
### Releases
- [Maven Central v0.13.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.13.1 - .
- [Maven Central v0.13.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.13.1 - .
## 2025-03-31 17:07:30
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.526.6 (2.563.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.14.0] .
### Releases
- [Maven Central v0.14.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.0 - .
## 2025-04-03 00:27:41
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.14.1] .
### Releases
- [Maven Central v0.14.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.1 - .
## 2025-04-06 00:30:19
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.529.1 (2.566.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.14.2] .
### Releases
- [Maven Central v0.14.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.2 - .
## 2025-04-14 00:30:37
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.531.4 (2.570.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.15.0] .
### Releases
- [Maven Central v0.15.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.15.0 - .
## 2025-04-19 00:27:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [java v0.16.0] .
### Releases
- [Maven Central v0.16.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.16.0 - .

View File

@@ -39,9 +39,12 @@ model {
}
}
version = "${version}"
group = "${groupId}"
jar {
dependsOn(":generatePomFileForMavenPublication")
archiveBaseName = "plexapi"
archiveBaseName = "${artifactId}"
into("META-INF/maven/dev.plexapi/plexapi") {
from("$buildDir/pom.xml")
@@ -62,15 +65,12 @@ tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
group = "dev.plexapi"
version = "0.13.1"
sourcesJar {
archiveBaseName = "plexapi"
archiveBaseName = "${artifactId}"
}
javadocJar {
archiveBaseName = "plexapi"
archiveBaseName = "${artifactId}"
}
sonatypeCentralUpload {
// This is your Sonatype generated username
@@ -80,9 +80,9 @@ sonatypeCentralUpload {
// This is a list of files to upload. Ideally you would point to your jar file, source and javadoc jar (required by central)
archives = files(
"$buildDir/libs/plexapi-${version}.jar",
"$buildDir/libs/plexapi-${version}-sources.jar",
"$buildDir/libs/plexapi-${version}-javadoc.jar"
"$buildDir/libs/${artifactId}-${version}.jar",
"$buildDir/libs/${artifactId}-${version}-sources.jar",
"$buildDir/libs/${artifactId}-${version}-javadoc.jar"
)
// This is the pom file to upload. This is required by central
@@ -99,9 +99,11 @@ publishing {
publications {
maven(MavenPublication) {
groupId = 'dev.plexapi'
artifactId = 'plexapi'
version = '0.13.1'
// note that properties can't yet be used below!
// https://github.com/gradle/gradle/issues/18619
groupId = "dev.plexapi"
artifactId = "plexapi"
version = "0.16.0"
from components.java

File diff suppressed because it is too large Load Diff

View File

@@ -3,26 +3,26 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
| `composite` | *String* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
| `filters` | *boolean* | :heavy_check_mark: | N/A | true |
| `refreshing` | *boolean* | :heavy_check_mark: | N/A | false |
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
| `key` | *String* | :heavy_check_mark: | N/A | 1 |
| `type` | *String* | :heavy_check_mark: | N/A | movie |
| `title` | *String* | :heavy_check_mark: | N/A | Movies |
| `agent` | *String* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
| `scanner` | *String* | :heavy_check_mark: | N/A | Plex Movie |
| `language` | *String* | :heavy_check_mark: | N/A | en-US |
| `uuid` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `createdAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `content` | *boolean* | :heavy_check_mark: | N/A | true |
| `directory` | *boolean* | :heavy_check_mark: | N/A | true |
| `contentChangedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `hidden` | *int* | :heavy_check_mark: | N/A | 0 |
| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | |
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg |
| `composite` | *String* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 |
| `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
| `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true |
| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png |
| `key` | *String* | :heavy_check_mark: | The library key representing the unique identifier | 1 |
| `type` | [GetAllLibrariesType](../../models/operations/GetAllLibrariesType.md) | :heavy_check_mark: | N/A | movie |
| `title` | *String* | :heavy_check_mark: | The title of the library | Movies |
| `agent` | *String* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie |
| `scanner` | *String* | :heavy_check_mark: | UNKNOWN | Plex Movie |
| `language` | *String* | :heavy_check_mark: | The Plex library language that has been set | en-US |
| `uuid` | *String* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 |
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `createdAt` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 1556281940 |
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
| `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
| `contentChangedAt` | *long* | :heavy_check_mark: | Timestamp (in seconds) representing the last time the content was modified.<br/>NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64<br/> | 9173960 |
| `hidden` | [Optional\<Hidden>](../../models/operations/Hidden.md) | :heavy_minus_sign: | N/A | 1 |
| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | |

View File

@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *int* | :heavy_check_mark: | N/A | 1 |
| `path` | *String* | :heavy_check_mark: | N/A | /movies |
| Field | Type | Required | Description | Example |
| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- |
| `id` | *int* | :heavy_check_mark: | The ID of the location. | 1 |
| `path` | *String* | :heavy_check_mark: | The path to the media item. | /Movies |

View File

@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
| `title1` | *String* | :heavy_check_mark: | N/A | Plex Library |
| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_check_mark: | N/A | |
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series |
| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | |

View File

@@ -5,6 +5,6 @@ The libraries available on the Server
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `mediaContainer` | [GetAllLibrariesMediaContainer](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `mediaContainer` | [Optional\<GetAllLibrariesMediaContainer>](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,15 @@
# GetAllLibrariesType
The library type
## Values
| Name | Value |
| --------- | --------- |
| `Movie` | movie |
| `TvShow` | show |
| `Season` | season |
| `Episode` | episode |
| `Artist` | artist |
| `Album` | album |

View File

@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `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 |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |

View File

@@ -0,0 +1,12 @@
# GetMediaArtsMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
| `metadata` | List\<[GetMediaArtsMetadata](../../models/operations/GetMediaArtsMetadata.md)> | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetMediaArtsMetadata
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
| `provider` | *Optional\<String>* | :heavy_minus_sign: | The provider of the artwork. | tmdb |
| `ratingKey` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true |
| `thumb` | *String* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg |

View File

@@ -0,0 +1,8 @@
# GetMediaArtsRequest
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |

View File

@@ -0,0 +1,11 @@
# GetMediaArtsResponse
## 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\<GetMediaArtsResponseBody>](../../models/operations/GetMediaArtsResponseBody.md) | :heavy_minus_sign: | The available background artwork for the library item. |

View File

@@ -0,0 +1,10 @@
# GetMediaArtsResponseBody
The available background artwork for the library item.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `mediaContainer` | [Optional\<GetMediaArtsMediaContainer>](../../models/operations/GetMediaArtsMediaContainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,12 @@
# GetMediaPostersMediaContainer
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
| `metadata` | List\<[GetMediaPostersMetadata](../../models/operations/GetMediaPostersMetadata.md)> | :heavy_check_mark: | N/A | |

View File

@@ -0,0 +1,12 @@
# GetMediaPostersMetadata
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
| `provider` | *Optional\<String>* | :heavy_minus_sign: | The provider of the poster. | tmdb |
| `ratingKey` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected poster. | true |
| `thumb` | *String* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg |

View File

@@ -0,0 +1,8 @@
# GetMediaPostersRequest
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |

View File

@@ -0,0 +1,11 @@
# GetMediaPostersResponse
## 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\<GetMediaPostersResponseBody>](../../models/operations/GetMediaPostersResponseBody.md) | :heavy_minus_sign: | The available posters for the library item. |

View File

@@ -0,0 +1,10 @@
# GetMediaPostersResponseBody
The available posters for the library item.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `mediaContainer` | [Optional\<GetMediaPostersMediaContainer>](../../models/operations/GetMediaPostersMediaContainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -0,0 +1,11 @@
# Hidden
UNKNOWN
## Values
| Name | Value |
| --------- | --------- |
| `Disable` | 0 |
| `Enable` | 1 |

View File

@@ -1,6 +1,6 @@
# IncludeDetails
Whether or not to include details for a section (types, filters, and sorts).
Whether or not to include details for a section (types, filters, and sorts).
Only exists for backwards compatibility, media providers other than the server libraries have it on always.

View File

@@ -1,10 +1,10 @@
# Level
An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose

View File

@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |

View File

@@ -0,0 +1,10 @@
# PostMediaArtsRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |

View File

@@ -0,0 +1,10 @@
# PostMediaArtsResponse
## 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 |

View File

@@ -0,0 +1,10 @@
# PostMediaPosterRequest
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |

View File

@@ -0,0 +1,10 @@
# PostMediaPosterResponse
## 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 |

View File

@@ -1,8 +1,8 @@
# QueryParamForce
Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.

View File

@@ -3,8 +3,8 @@
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |

View File

@@ -26,9 +26,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetTransientTokenBadRequest;
import dev.plexapi.sdk.models.errors.GetTransientTokenUnauthorized;
import dev.plexapi.sdk.models.operations.GetTransientTokenQueryParamType;
import dev.plexapi.sdk.models.operations.GetTransientTokenResponse;
import dev.plexapi.sdk.models.operations.Scope;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -183,9 +181,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.PostUsersSignInDataBadRequest;
import dev.plexapi.sdk.models.errors.PostUsersSignInDataUnauthorized;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequest;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataRequestBody;
import dev.plexapi.sdk.models.operations.PostUsersSignInDataResponse;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {

View File

@@ -25,7 +25,6 @@ import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse;
import dev.plexapi.sdk.models.operations.OnlyTransient;
import java.lang.Exception;
public class Application {
@@ -37,8 +36,6 @@ public class Application {
.build();
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
.count(1262.49d)
.onlyTransient(OnlyTransient.ONE)
.call();
if (res.object().isPresent()) {
@@ -78,9 +75,7 @@ This endpoint will return the recently added content.
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.Type;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -138,7 +133,6 @@ import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized;
import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse;
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
import java.lang.Exception;
public class Application {
@@ -150,9 +144,7 @@ public class Application {
.build();
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
.sectionId(6728.76d)
.count(6728.76d)
.onlyTransient(QueryParamOnlyTransient.ZERO)
.sectionId(6728.76)
.call();
if (res.object().isPresent()) {

View File

@@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries
* [getActorsLibrary](#getactorslibrary) - Get Actors of library media
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
* [getMediaMetaData](#getmediametadata) - Get Media Metadata
* [getMediaArts](#getmediaarts) - Get Media Background Artwork
* [postMediaArts](#postmediaarts) - Upload Media Background Artwork
* [getMediaPosters](#getmediaposters) - Get Media Posters
* [postMediaPoster](#postmediaposter) - Upload Media Poster
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
@@ -50,7 +54,6 @@ public class Application {
GetFileHashResponse res = sdk.library().getFileHash()
.url("file://C:\Image.png&type=13")
.type(4462.17d)
.call();
// handle response
@@ -90,9 +93,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
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.QueryParamType;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
import java.util.List;
@@ -207,14 +208,14 @@ public class Application {
## Library Details Endpoint
This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
The details include:
### Directories
Organized into three categories:
- **Primary Directories**:
- **Primary Directories**:
- Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
- Most can be replicated via media queries.
- Customizable by users.
@@ -255,7 +256,6 @@ import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
import dev.plexapi.sdk.models.operations.IncludeDetails;
import java.lang.Exception;
public class Application {
@@ -267,7 +267,6 @@ public class Application {
.build();
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
.includeDetails(IncludeDetails.ZERO)
.sectionKey(9518)
.call();
@@ -280,10 +279,10 @@ public class Application {
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `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 |
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
| `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
@@ -380,10 +379,7 @@ 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.GetLibraryItemsQueryParamType;
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest;
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
import dev.plexapi.sdk.models.operations.Tag;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -442,9 +438,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetAllMediaLibraryBadRequest;
import dev.plexapi.sdk.models.errors.GetAllMediaLibraryUnauthorized;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryQueryParamType;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryRequest;
import dev.plexapi.sdk.models.operations.GetAllMediaLibraryResponse;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -797,9 +791,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
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.SearchTypes;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
import java.util.List;
@@ -918,6 +910,200 @@ public class Application {
| models/errors/GetMediaMetaDataUnauthorized | 401 | application/json |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## getMediaArts
Returns the background artwork for a library item.
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.GetMediaArtsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
GetMediaArtsResponse res = sdk.library().getMediaArts()
.ratingKey(16099L)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
### Response
**[GetMediaArtsResponse](../../models/operations/GetMediaArtsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------- | ---------------------- | ---------------------- |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## postMediaArts
Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.PostMediaArtsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
PostMediaArtsResponse res = sdk.library().postMediaArts()
.ratingKey(2268L)
.url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b")
.call();
// handle response
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
### Response
**[PostMediaArtsResponse](../../models/operations/PostMediaArtsResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------- | ---------------------- | ---------------------- |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## getMediaPosters
Returns the available posters for a library item.
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.GetMediaPostersResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
GetMediaPostersResponse res = sdk.library().getMediaPosters()
.ratingKey(16099L)
.call();
if (res.object().isPresent()) {
// handle response
}
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
### Response
**[GetMediaPostersResponse](../../models/operations/GetMediaPostersResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------- | ---------------------- | ---------------------- |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## postMediaPoster
Uploads a poster to a library item, either from a local file or a remote URL
### Example Usage
```java
package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.operations.PostMediaPosterResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
PlexAPI sdk = PlexAPI.builder()
.accessToken("<YOUR_API_KEY_HERE>")
.build();
PostMediaPosterResponse res = sdk.library().postMediaPoster()
.ratingKey(2268L)
.url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b")
.call();
// handle response
}
}
```
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
### Response
**[PostMediaPosterResponse](../../models/operations/PostMediaPosterResponse.md)**
### Errors
| Error Type | Status Code | Content Type |
| ---------------------- | ---------------------- | ---------------------- |
| models/errors/SDKError | 4XX, 5XX | \*/\* |
## getMetadataChildren
This endpoint will return the children of of a library item specified with the ratingKey.
@@ -943,7 +1129,7 @@ public class Application {
.build();
GetMetadataChildrenResponse res = sdk.library().getMetadataChildren()
.ratingKey(1539.14d)
.ratingKey(1539.14)
.includeElements("Stream")
.call();

View File

@@ -50,11 +50,11 @@ public class Application {
### Parameters
| Parameter | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
| Parameter | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
### Response
@@ -70,13 +70,13 @@ public class Application {
## logMultiLine
This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
It accepts a text/plain request body, where each line represents a distinct log entry.
Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
It accepts a text/plain request body, where each line represents a distinct log entry.
Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
Log entries are separated by a newline character (`\n`).
Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
Log entries are separated by a newline character (`\n`).
Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
- `0`: Error - Critical issues that require immediate attention.

View File

@@ -38,7 +38,7 @@ public class Application {
.build();
MarkPlayedResponse res = sdk.media().markPlayed()
.key(59398d)
.key(59398)
.call();
// handle response
@@ -88,7 +88,7 @@ public class Application {
.build();
MarkUnplayedResponse res = sdk.media().markUnplayed()
.key(59398d)
.key(59398)
.call();
// handle response
@@ -140,7 +140,7 @@ public class Application {
UpdatePlayProgressResponse res = sdk.media().updatePlayProgress()
.key("<key>")
.time(90000d)
.time(90000)
.state("played")
.call();

View File

@@ -3,9 +3,9 @@
## Overview
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
They can be organized in (optionally nesting) folders.
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
This may cause the duration and number of items to change.
@@ -36,10 +36,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.CreatePlaylistBadRequest;
import dev.plexapi.sdk.models.errors.CreatePlaylistUnauthorized;
import dev.plexapi.sdk.models.operations.CreatePlaylistQueryParamType;
import dev.plexapi.sdk.models.operations.CreatePlaylistRequest;
import dev.plexapi.sdk.models.operations.CreatePlaylistResponse;
import dev.plexapi.sdk.models.operations.Smart;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -99,8 +96,6 @@ import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
import dev.plexapi.sdk.models.operations.GetPlaylistsResponse;
import dev.plexapi.sdk.models.operations.PlaylistType;
import dev.plexapi.sdk.models.operations.QueryParamSmart;
import java.lang.Exception;
public class Application {
@@ -112,8 +107,6 @@ public class Application {
.build();
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
.playlistType(PlaylistType.AUDIO)
.smart(QueryParamSmart.ZERO)
.call();
if (res.object().isPresent()) {
@@ -168,7 +161,7 @@ public class Application {
.build();
GetPlaylistResponse res = sdk.playlists().getPlaylist()
.playlistID(4109.48d)
.playlistID(4109.48)
.call();
if (res.object().isPresent()) {
@@ -221,7 +214,7 @@ public class Application {
.build();
DeletePlaylistResponse res = sdk.playlists().deletePlaylist()
.playlistID(216.22d)
.playlistID(216.22)
.call();
// handle response
@@ -272,9 +265,7 @@ public class Application {
.build();
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
.playlistID(3915d)
.title("<value>")
.summary("<value>")
.playlistID(3915)
.call();
// handle response
@@ -331,7 +322,7 @@ public class Application {
.build();
GetPlaylistContentsResponse res = sdk.playlists().getPlaylistContents()
.playlistID(5004.46d)
.playlistID(5004.46)
.type(GetPlaylistContentsQueryParamType.TvShow)
.call();
@@ -386,7 +377,7 @@ public class Application {
.build();
ClearPlaylistContentsResponse res = sdk.playlists().clearPlaylistContents()
.playlistID(1893.18d)
.playlistID(1893.18)
.call();
// handle response
@@ -438,9 +429,9 @@ public class Application {
.build();
AddPlaylistContentsResponse res = sdk.playlists().addPlaylistContents()
.playlistID(8502.01d)
.playlistID(8502.01)
.uri("server://12345/com.plexapp.plugins.library/library/metadata/1")
.playQueueID(123d)
.playQueueID(123)
.call();
if (res.object().isPresent()) {
@@ -508,11 +499,11 @@ public class Application {
### Parameters
| Parameter | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
| Parameter | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
### Response

View File

@@ -226,9 +226,6 @@ import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
import dev.plexapi.sdk.models.operations.IncludeHttps;
import dev.plexapi.sdk.models.operations.IncludeIPv6;
import dev.plexapi.sdk.models.operations.IncludeRelay;
import java.lang.Exception;
public class Application {
@@ -240,9 +237,6 @@ public class Application {
.build();
GetServerResourcesResponse res = sdk.plex().getServerResources()
.includeHttps(IncludeHttps.Enable)
.includeRelay(IncludeRelay.Enable)
.includeIPv6(IncludeIPv6.Enable)
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
.call();

View File

@@ -49,8 +49,6 @@ public class Application {
PerformSearchResponse res = sdk.search().performSearch()
.query("dylan")
.sectionId(9487.88d)
.limit(5d)
.call();
// handle response
@@ -107,8 +105,6 @@ public class Application {
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
.query("dead+poop")
.sectionId(4094.8d)
.limit(5d)
.call();
// handle response

View File

@@ -298,10 +298,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetResizedPhotoBadRequest;
import dev.plexapi.sdk.models.errors.GetResizedPhotoUnauthorized;
import dev.plexapi.sdk.models.operations.GetResizedPhotoRequest;
import dev.plexapi.sdk.models.operations.GetResizedPhotoResponse;
import dev.plexapi.sdk.models.operations.MinSize;
import dev.plexapi.sdk.models.operations.Upscale;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -313,10 +310,10 @@ public class Application {
.build();
GetResizedPhotoRequest req = GetResizedPhotoRequest.builder()
.width(110d)
.height(165d)
.width(110)
.height(165)
.opacity(100L)
.blur(0d)
.blur(0)
.minSize(MinSize.ONE)
.upscale(Upscale.ONE)
.url("/library/metadata/49564/thumb/1654258204")

View File

@@ -122,9 +122,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.ApplyUpdatesBadRequest;
import dev.plexapi.sdk.models.errors.ApplyUpdatesUnauthorized;
import dev.plexapi.sdk.models.operations.ApplyUpdatesResponse;
import dev.plexapi.sdk.models.operations.Skip;
import dev.plexapi.sdk.models.operations.Tonight;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {

View File

@@ -23,9 +23,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetTimelineBadRequest;
import dev.plexapi.sdk.models.errors.GetTimelineUnauthorized;
import dev.plexapi.sdk.models.operations.GetTimelineRequest;
import dev.plexapi.sdk.models.operations.GetTimelineResponse;
import dev.plexapi.sdk.models.operations.State;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {
@@ -37,16 +35,16 @@ public class Application {
.build();
GetTimelineRequest req = GetTimelineRequest.builder()
.ratingKey(23409d)
.ratingKey(23409)
.key("/library/metadata/23409")
.state(State.PLAYING)
.hasMDE(1d)
.time(2000d)
.duration(10000d)
.hasMDE(1)
.time(2000)
.duration(10000)
.context("home:hub.continueWatching")
.playQueueItemID(1d)
.playBackTime(2000d)
.row(1d)
.playQueueItemID(1)
.playBackTime(2000)
.row(1)
.build();
GetTimelineResponse res = sdk.video().getTimeline()
@@ -101,22 +99,22 @@ public class Application {
.build();
StartUniversalTranscodeRequest req = StartUniversalTranscodeRequest.builder()
.hasMDE(1d)
.hasMDE(1)
.path("/library/metadata/23409")
.mediaIndex(0d)
.partIndex(0d)
.mediaIndex(0)
.partIndex(0)
.protocol("hls")
.fastSeek(0d)
.directPlay(0d)
.directStream(0d)
.subtitleSize(100d)
.fastSeek(0)
.directPlay(0)
.directStream(0)
.subtitleSize(100)
.subtites("burn")
.audioBoost(100d)
.audioBoost(100)
.location("lan")
.mediaBufferSize(102400d)
.mediaBufferSize(102400)
.session("zvcage8b7rkioqcm8f4uns4c")
.addDebugOverlay(0d)
.autoAdjustQuality(0d)
.addDebugOverlay(0)
.autoAdjustQuality(0)
.build();
StartUniversalTranscodeResponse res = sdk.video().startUniversalTranscode()

View File

@@ -22,9 +22,7 @@ package hello.world;
import dev.plexapi.sdk.PlexAPI;
import dev.plexapi.sdk.models.errors.GetWatchListBadRequest;
import dev.plexapi.sdk.models.errors.GetWatchListUnauthorized;
import dev.plexapi.sdk.models.operations.Filter;
import dev.plexapi.sdk.models.operations.GetWatchListRequest;
import dev.plexapi.sdk.models.operations.GetWatchListResponse;
import dev.plexapi.sdk.models.operations.*;
import java.lang.Exception;
public class Application {

3
gradle.properties Normal file
View File

@@ -0,0 +1,3 @@
groupId=dev.plexapi
artifactId=plexapi
version=0.16.0

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -29,7 +28,7 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
@@ -39,7 +38,6 @@ import java.util.Optional;
* - They must contain an `type` which is used by clients to distinguish the specific activity.
* - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
* - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
*
*/
public class Activities implements
MethodCallGetServerActivities,
@@ -54,7 +52,9 @@ public class Activities implements
/**
* Get Server Activities
* Get Server Activities
*
* <p>Get Server Activities
*
* @return The call builder
*/
public GetServerActivitiesRequestBuilder getServerActivities() {
@@ -63,7 +63,9 @@ public class Activities implements
/**
* Get Server Activities
* Get Server Activities
*
* <p>Get Server Activities
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -87,6 +89,7 @@ public class Activities implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -98,6 +101,7 @@ public class Activities implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -107,6 +111,7 @@ public class Activities implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -116,6 +121,7 @@ public class Activities implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -209,7 +215,9 @@ public class Activities implements
/**
* Cancel Server Activities
* Cancel Server Activities
*
* <p>Cancel Server Activities
*
* @return The call builder
*/
public CancelServerActivitiesRequestBuilder cancelServerActivities() {
@@ -218,7 +226,9 @@ public class Activities implements
/**
* Cancel Server Activities
* Cancel Server Activities
*
* <p>Cancel Server Activities
*
* @param activityUUID The UUID of the activity to cancel.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -252,6 +262,7 @@ public class Activities implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"cancelServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -263,6 +274,7 @@ public class Activities implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"cancelServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -272,6 +284,7 @@ public class Activities implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"cancelServerActivities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -281,6 +294,7 @@ public class Activities implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"cancelServerActivities",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -46,11 +45,10 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls regarding authentication for Plex Media Server
*
*/
public class Authentication implements
MethodCallGetTransientToken,
@@ -81,7 +79,8 @@ public class Authentication implements
/**
* Get a Transient Token
* This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
*
* <p>This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
*
* @return The call builder
*/
@@ -91,7 +90,8 @@ public class Authentication implements
/**
* Get a Transient Token
* This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
*
* <p>This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
*
* @param type `delegation` - This is the only supported `type` parameter.
* @param scope `all` - This is the only supported `scope` parameter.
@@ -132,6 +132,7 @@ public class Authentication implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getTransientToken",
Optional.of(List.of()),
_hookSecuritySource),
@@ -143,6 +144,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTransientToken",
Optional.of(List.of()),
_hookSecuritySource),
@@ -152,6 +154,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getTransientToken",
Optional.of(List.of()),
_hookSecuritySource),
@@ -161,6 +164,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTransientToken",
Optional.of(List.of()),
_hookSecuritySource),
@@ -243,7 +247,8 @@ public class Authentication implements
/**
* Get Source Connection Information
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
*
* <p>If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
* Note: requires Plex Media Server &gt;= 1.15.4.
*
* @return The call builder
@@ -254,7 +259,8 @@ public class Authentication implements
/**
* Get Source Connection Information
* If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
*
* <p>If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
* Note: requires Plex Media Server &gt;= 1.15.4.
*
* @param source The source identifier with an included prefix.
@@ -293,6 +299,7 @@ public class Authentication implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getSourceConnectionInformation",
Optional.of(List.of()),
_hookSecuritySource),
@@ -304,6 +311,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSourceConnectionInformation",
Optional.of(List.of()),
_hookSecuritySource),
@@ -313,6 +321,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getSourceConnectionInformation",
Optional.of(List.of()),
_hookSecuritySource),
@@ -322,6 +331,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSourceConnectionInformation",
Optional.of(List.of()),
_hookSecuritySource),
@@ -404,7 +414,9 @@ public class Authentication implements
/**
* Get Token Details
* Get the User data from the provided X-Plex-Token
*
* <p>Get the User data from the provided X-Plex-Token
*
* @return The call builder
*/
public GetTokenDetailsRequestBuilder getTokenDetails() {
@@ -413,7 +425,9 @@ public class Authentication implements
/**
* Get Token Details
* Get the User data from the provided X-Plex-Token
*
* <p>Get the User data from the provided X-Plex-Token
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -423,16 +437,20 @@ public class Authentication implements
/**
* Get Token Details
* Get the User data from the provided X-Plex-Token
*
* <p>Get the User data from the provided X-Plex-Token
*
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetTokenDetailsResponse getTokenDetails(
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_TOKEN_DETAILS_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_TOKEN_DETAILS_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -451,6 +469,7 @@ public class Authentication implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getTokenDetails",
Optional.of(List.of()),
_hookSecuritySource),
@@ -462,6 +481,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTokenDetails",
Optional.of(List.of()),
_hookSecuritySource),
@@ -471,6 +491,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getTokenDetails",
Optional.of(List.of()),
_hookSecuritySource),
@@ -480,6 +501,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTokenDetails",
Optional.of(List.of()),
_hookSecuritySource),
@@ -573,7 +595,9 @@ public class Authentication implements
/**
* Get User Sign In Data
* Sign in user with username and password and return user data with Plex authentication token
*
* <p>Sign in user with username and password and return user data with Plex authentication token
*
* @return The call builder
*/
public PostUsersSignInDataRequestBuilder postUsersSignInData() {
@@ -582,7 +606,9 @@ public class Authentication implements
/**
* Get User Sign In Data
* Sign in user with username and password and return user data with Plex authentication token
*
* <p>Sign in user with username and password and return user data with Plex authentication token
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -594,7 +620,9 @@ public class Authentication implements
/**
* Get User Sign In Data
* Sign in user with username and password and return user data with Plex authentication token
*
* <p>Sign in user with username and password and return user data with Plex authentication token
*
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
@@ -603,9 +631,11 @@ public class Authentication implements
public PostUsersSignInDataResponse postUsersSignInData(
PostUsersSignInDataRequest request,
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(POST_USERS_SIGN_IN_DATA_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -632,6 +662,7 @@ public class Authentication implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"post-users-sign-in-data",
Optional.of(List.of()),
_hookSecuritySource),
@@ -643,6 +674,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"post-users-sign-in-data",
Optional.of(List.of()),
_hookSecuritySource),
@@ -652,6 +684,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"post-users-sign-in-data",
Optional.of(List.of()),
_hookSecuritySource),
@@ -661,6 +694,7 @@ public class Authentication implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"post-users-sign-in-data",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -44,11 +43,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* Butler is the task manager of the Plex Media Server Ecosystem.
*
*/
public class Butler implements
MethodCallGetButlerTasks,
@@ -66,7 +64,9 @@ public class Butler implements
/**
* Get Butler tasks
* Returns a list of butler tasks
*
* <p>Returns a list of butler tasks
*
* @return The call builder
*/
public GetButlerTasksRequestBuilder getButlerTasks() {
@@ -75,7 +75,9 @@ public class Butler implements
/**
* Get Butler tasks
* Returns a list of butler tasks
*
* <p>Returns a list of butler tasks
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -99,6 +101,7 @@ public class Butler implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getButlerTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -110,6 +113,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getButlerTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -119,6 +123,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getButlerTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -128,6 +133,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getButlerTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -221,7 +227,8 @@ public class Butler implements
/**
* Start all Butler tasks
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
*
* <p>This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
* 1. Any tasks not scheduled to run on the current day will be skipped.
* 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
* 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
@@ -235,7 +242,8 @@ public class Butler implements
/**
* Start all Butler tasks
* This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
*
* <p>This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
* 1. Any tasks not scheduled to run on the current day will be skipped.
* 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
* 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
@@ -264,6 +272,7 @@ public class Butler implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"startAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -275,6 +284,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"startAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -284,6 +294,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"startAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -293,6 +304,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"startAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -375,7 +387,8 @@ public class Butler implements
/**
* Stop all Butler tasks
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
*
* <p>This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
*
* @return The call builder
*/
@@ -385,7 +398,8 @@ public class Butler implements
/**
* Stop all Butler tasks
* This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
*
* <p>This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
*
* @return The response from the API call
* @throws Exception if the API call fails
@@ -410,6 +424,7 @@ public class Butler implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"stopAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -421,6 +436,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"stopAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -430,6 +446,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"stopAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -439,6 +456,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"stopAllTasks",
Optional.of(List.of()),
_hookSecuritySource),
@@ -521,7 +539,8 @@ public class Butler implements
/**
* Start a single Butler task
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
*
* <p>This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
* 1. Any tasks not scheduled to run on the current day will be skipped.
* 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
* 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
@@ -535,7 +554,8 @@ public class Butler implements
/**
* Start a single Butler task
* This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
*
* <p>This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
* 1. Any tasks not scheduled to run on the current day will be skipped.
* 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.
* 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
@@ -574,6 +594,7 @@ public class Butler implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"startTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -585,6 +606,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"startTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -594,6 +616,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"startTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -603,6 +626,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"startTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -685,7 +709,8 @@ public class Butler implements
/**
* Stop a single Butler task
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
*
* <p>This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
*
* @return The call builder
*/
@@ -695,7 +720,8 @@ public class Butler implements
/**
* Stop a single Butler task
* This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
*
* <p>This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
*
* @param taskName The name of the task to be started.
* @return The response from the API call
@@ -730,6 +756,7 @@ public class Butler implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"stopTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -741,6 +768,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"stopTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -750,6 +778,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"stopTask",
Optional.of(List.of()),
_hookSecuritySource),
@@ -759,6 +788,7 @@ public class Butler implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"stopTask",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -38,11 +37,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
*
*/
public class Hubs implements
MethodCallGetGlobalHubs,
@@ -58,7 +56,9 @@ public class Hubs implements
/**
* Get Global Hubs
* Get Global Hubs filtered by the parameters provided.
*
* <p>Get Global Hubs filtered by the parameters provided.
*
* @return The call builder
*/
public GetGlobalHubsRequestBuilder getGlobalHubs() {
@@ -67,7 +67,9 @@ public class Hubs implements
/**
* Get Global Hubs
* Get Global Hubs filtered by the parameters provided.
*
* <p>Get Global Hubs filtered by the parameters provided.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -77,7 +79,9 @@ public class Hubs implements
/**
* Get Global Hubs
* Get Global Hubs filtered by the parameters provided.
*
* <p>Get Global Hubs filtered by the parameters provided.
*
* @param count The number of items to return with each hub.
* @param onlyTransient Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
* @return The response from the API call
@@ -117,6 +121,7 @@ public class Hubs implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getGlobalHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -128,6 +133,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getGlobalHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -137,6 +143,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getGlobalHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -146,6 +153,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getGlobalHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -239,7 +247,8 @@ public class Hubs implements
/**
* Get Recently Added
* This endpoint will return the recently added content.
*
* <p>This endpoint will return the recently added content.
*
* @return The call builder
*/
@@ -249,7 +258,8 @@ public class Hubs implements
/**
* Get Recently Added
* This endpoint will return the recently added content.
*
* <p>This endpoint will return the recently added content.
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
@@ -281,6 +291,7 @@ public class Hubs implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-recently-added",
Optional.of(List.of()),
_hookSecuritySource),
@@ -292,6 +303,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-recently-added",
Optional.of(List.of()),
_hookSecuritySource),
@@ -301,6 +313,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-recently-added",
Optional.of(List.of()),
_hookSecuritySource),
@@ -310,6 +323,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-recently-added",
Optional.of(List.of()),
_hookSecuritySource),
@@ -371,7 +385,8 @@ public class Hubs implements
/**
* Get library specific hubs
* This endpoint will return a list of library specific hubs
*
* <p>This endpoint will return a list of library specific hubs
*
* @return The call builder
*/
@@ -381,7 +396,8 @@ public class Hubs implements
/**
* Get library specific hubs
* This endpoint will return a list of library specific hubs
*
* <p>This endpoint will return a list of library specific hubs
*
* @param sectionId the Id of the library to query
* @return The response from the API call
@@ -394,7 +410,8 @@ public class Hubs implements
/**
* Get library specific hubs
* This endpoint will return a list of library specific hubs
*
* <p>This endpoint will return a list of library specific hubs
*
* @param sectionId the Id of the library to query
* @param count The number of items to return with each hub.
@@ -440,6 +457,7 @@ public class Hubs implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getLibraryHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -451,6 +469,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getLibraryHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -460,6 +479,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getLibraryHubs",
Optional.of(List.of()),
_hookSecuritySource),
@@ -469,6 +489,7 @@ public class Hubs implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getLibraryHubs",
Optional.of(List.of()),
_hookSecuritySource),

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -36,11 +35,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* Submit logs to the Log Handler for Plex Media Server
*
*/
public class Log implements
MethodCallLogLine,
@@ -56,7 +54,8 @@ public class Log implements
/**
* Logging a single line message.
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
*
* <p>This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
*
* @return The call builder
*/
@@ -66,15 +65,16 @@ public class Log implements
/**
* Logging a single line message.
* This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
*
* @param level An integer log level to write to the PMS log with.
0: Error
1: Warning
2: Info
3: Debug
4: Verbose
* <p>This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
*
* @param level An integer log level to write to the PMS log with.
* 0: Error
* 1: Warning
* 2: Info
* 3: Debug
* 4: Verbose
*
* @param message The text of the message to write to the log.
* @param source a string indicating the source of the message.
* @return The response from the API call
@@ -116,6 +116,7 @@ public class Log implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"logLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -127,6 +128,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"logLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -136,6 +138,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"logLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -145,6 +148,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"logLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -227,27 +231,28 @@ public class Log implements
/**
* Logging a multi-line message
* This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
* It accepts a text/plain request body, where each line represents a distinct log entry.
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
*
* Log entries are separated by a newline character (`\n`).
* Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
* <p>This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
* It accepts a text/plain request body, where each line represents a distinct log entry.
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
*
* The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
* <p>Log entries are separated by a newline character (`\n`).
* Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
*
* <p>The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
* - `0`: Error - Critical issues that require immediate attention.
* - `1`: Warning - Important events that are not critical but may indicate potential issues.
* - `2`: Info - General informational messages about system operation.
* - `3`: Debug - Detailed information useful for debugging purposes.
* - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis.
*
* The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
* <p>The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
*
* Example of a single log entry format:
* <p>Example of a single log entry format:
* `level=4&amp;message=Sample%20log%20entry&amp;source=applicationName`
*
* Ensure each parameter is properly URL-encoded to avoid interpretation issues.
* <p>Ensure each parameter is properly URL-encoded to avoid interpretation issues.
*
* @return The call builder
*/
@@ -257,27 +262,28 @@ public class Log implements
/**
* Logging a multi-line message
* This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
* It accepts a text/plain request body, where each line represents a distinct log entry.
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
*
* Log entries are separated by a newline character (`\n`).
* Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
* <p>This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
* It accepts a text/plain request body, where each line represents a distinct log entry.
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
*
* The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
* <p>Log entries are separated by a newline character (`\n`).
* Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
*
* <p>The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
* - `0`: Error - Critical issues that require immediate attention.
* - `1`: Warning - Important events that are not critical but may indicate potential issues.
* - `2`: Info - General informational messages about system operation.
* - `3`: Debug - Detailed information useful for debugging purposes.
* - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis.
*
* The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
* <p>The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
*
* Example of a single log entry format:
* <p>Example of a single log entry format:
* `level=4&amp;message=Sample%20log%20entry&amp;source=applicationName`
*
* Ensure each parameter is properly URL-encoded to avoid interpretation issues.
* <p>Ensure each parameter is properly URL-encoded to avoid interpretation issues.
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
@@ -317,6 +323,7 @@ public class Log implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"logMultiLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -328,6 +335,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"logMultiLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -337,6 +345,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"logMultiLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -346,6 +355,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"logMultiLine",
Optional.of(List.of()),
_hookSecuritySource),
@@ -428,7 +438,8 @@ public class Log implements
/**
* Enabling Papertrail
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
*
* <p>This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
*
* @return The call builder
*/
@@ -438,7 +449,8 @@ public class Log implements
/**
* Enabling Papertrail
* This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
*
* <p>This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
*
* @return The response from the API call
* @throws Exception if the API call fails
@@ -463,6 +475,7 @@ public class Log implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"enablePaperTrail",
Optional.of(List.of()),
_hookSecuritySource),
@@ -474,6 +487,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"enablePaperTrail",
Optional.of(List.of()),
_hookSecuritySource),
@@ -483,6 +497,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"enablePaperTrail",
Optional.of(List.of()),
_hookSecuritySource),
@@ -492,6 +507,7 @@ public class Log implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"enablePaperTrail",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -44,11 +43,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls interacting with Plex Media Server Media
*
*/
public class Media implements
MethodCallMarkPlayed,
@@ -66,7 +64,9 @@ public class Media implements
/**
* Mark Media Played
* This will mark the provided media key as Played.
*
* <p>This will mark the provided media key as Played.
*
* @return The call builder
*/
public MarkPlayedRequestBuilder markPlayed() {
@@ -75,7 +75,9 @@ public class Media implements
/**
* Mark Media Played
* This will mark the provided media key as Played.
*
* <p>This will mark the provided media key as Played.
*
* @param key The media key to mark as played
* @return The response from the API call
* @throws Exception if the API call fails
@@ -112,6 +114,7 @@ public class Media implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"markPlayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -123,6 +126,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"markPlayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -132,6 +136,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"markPlayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -141,6 +146,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"markPlayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -223,7 +229,9 @@ public class Media implements
/**
* Mark Media Unplayed
* This will mark the provided media key as Unplayed.
*
* <p>This will mark the provided media key as Unplayed.
*
* @return The call builder
*/
public MarkUnplayedRequestBuilder markUnplayed() {
@@ -232,7 +240,9 @@ public class Media implements
/**
* Mark Media Unplayed
* This will mark the provided media key as Unplayed.
*
* <p>This will mark the provided media key as Unplayed.
*
* @param key The media key to mark as Unplayed
* @return The response from the API call
* @throws Exception if the API call fails
@@ -269,6 +279,7 @@ public class Media implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"markUnplayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -280,6 +291,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"markUnplayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -289,6 +301,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"markUnplayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -298,6 +311,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"markUnplayed",
Optional.of(List.of()),
_hookSecuritySource),
@@ -380,7 +394,8 @@ public class Media implements
/**
* Update Media Play Progress
* This API command can be used to update the play progress of a media item.
*
* <p>This API command can be used to update the play progress of a media item.
*
* @return The call builder
*/
@@ -390,7 +405,8 @@ public class Media implements
/**
* Update Media Play Progress
* This API command can be used to update the play progress of a media item.
*
* <p>This API command can be used to update the play progress of a media item.
*
* @param key the media key
* @param time The time, in milliseconds, used to set the media playback progress.
@@ -434,6 +450,7 @@ public class Media implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"updatePlayProgress",
Optional.of(List.of()),
_hookSecuritySource),
@@ -445,6 +462,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"updatePlayProgress",
Optional.of(List.of()),
_hookSecuritySource),
@@ -454,6 +472,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"updatePlayProgress",
Optional.of(List.of()),
_hookSecuritySource),
@@ -463,6 +482,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"updatePlayProgress",
Optional.of(List.of()),
_hookSecuritySource),
@@ -545,7 +565,9 @@ public class Media implements
/**
* Get Banner Image
* Gets the banner image of the media item
*
* <p>Gets the banner image of the media item
*
* @return The call builder
*/
public GetBannerImageRequestBuilder getBannerImage() {
@@ -554,7 +576,9 @@ public class Media implements
/**
* Get Banner Image
* Gets the banner image of the media item
*
* <p>Gets the banner image of the media item
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -588,6 +612,7 @@ public class Media implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-banner-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -599,6 +624,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-banner-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -608,6 +634,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-banner-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -617,6 +644,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-banner-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -710,7 +738,9 @@ public class Media implements
/**
* Get Thumb Image
* Gets the thumbnail image of the media item
*
* <p>Gets the thumbnail image of the media item
*
* @return The call builder
*/
public GetThumbImageRequestBuilder getThumbImage() {
@@ -719,7 +749,9 @@ public class Media implements
/**
* Get Thumb Image
* Gets the thumbnail image of the media item
*
* <p>Gets the thumbnail image of the media item
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -753,6 +785,7 @@ public class Media implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-thumb-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -764,6 +797,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-thumb-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -773,6 +807,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-thumb-image",
Optional.of(List.of()),
_hookSecuritySource),
@@ -782,6 +817,7 @@ public class Media implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-thumb-image",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -74,14 +73,13 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
* They can be organized in (optionally nesting) folders.
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
* This may cause the duration and number of items to change.
*
*/
public class Playlists implements
MethodCallCreatePlaylist,
@@ -103,7 +101,8 @@ public class Playlists implements
/**
* Create a Playlist
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
*
* <p>Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
* - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`).
* - `playQueueID` - To create a playlist from an existing play queue.
*
@@ -115,7 +114,8 @@ public class Playlists implements
/**
* Create a Playlist
* Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
*
* <p>Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
* - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`).
* - `playQueueID` - To create a playlist from an existing play queue.
*
@@ -149,6 +149,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"createPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -160,6 +161,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"createPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -169,6 +171,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"createPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -178,6 +181,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"createPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -271,7 +275,9 @@ public class Playlists implements
/**
* Get All Playlists
* Get All Playlists given the specified filters.
*
* <p>Get All Playlists given the specified filters.
*
* @return The call builder
*/
public GetPlaylistsRequestBuilder getPlaylists() {
@@ -280,7 +286,9 @@ public class Playlists implements
/**
* Get All Playlists
* Get All Playlists given the specified filters.
*
* <p>Get All Playlists given the specified filters.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -290,7 +298,9 @@ public class Playlists implements
/**
* Get All Playlists
* Get All Playlists given the specified filters.
*
* <p>Get All Playlists given the specified filters.
*
* @param playlistType limit to a type of playlist.
* @param smart type of playlists to return (default is all).
* @return The response from the API call
@@ -330,6 +340,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getPlaylists",
Optional.of(List.of()),
_hookSecuritySource),
@@ -341,6 +352,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPlaylists",
Optional.of(List.of()),
_hookSecuritySource),
@@ -350,6 +362,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getPlaylists",
Optional.of(List.of()),
_hookSecuritySource),
@@ -359,6 +372,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPlaylists",
Optional.of(List.of()),
_hookSecuritySource),
@@ -452,7 +466,8 @@ public class Playlists implements
/**
* Retrieve Playlist
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
*
* <p>Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
* Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
*
* @return The call builder
@@ -463,7 +478,8 @@ public class Playlists implements
/**
* Retrieve Playlist
* Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
*
* <p>Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
* Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
*
* @param playlistID the ID of the playlist
@@ -499,6 +515,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -510,6 +527,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -519,6 +537,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -528,6 +547,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -621,7 +641,8 @@ public class Playlists implements
/**
* Deletes a Playlist
* This endpoint will delete a playlist
*
* <p>This endpoint will delete a playlist
*
* @return The call builder
*/
@@ -631,7 +652,8 @@ public class Playlists implements
/**
* Deletes a Playlist
* This endpoint will delete a playlist
*
* <p>This endpoint will delete a playlist
*
* @param playlistID the ID of the playlist
* @return The response from the API call
@@ -666,6 +688,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"deletePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -677,6 +700,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"deletePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -686,6 +710,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"deletePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -695,6 +720,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"deletePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -777,7 +803,8 @@ public class Playlists implements
/**
* Update a Playlist
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
*
* <p>From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
*
* @return The call builder
*/
@@ -787,7 +814,8 @@ public class Playlists implements
/**
* Update a Playlist
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
*
* <p>From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
*
* @param playlistID the ID of the playlist
* @return The response from the API call
@@ -800,7 +828,8 @@ public class Playlists implements
/**
* Update a Playlist
* From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
*
* <p>From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
*
* @param playlistID the ID of the playlist
* @param title name of the playlist
@@ -846,6 +875,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"updatePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -857,6 +887,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"updatePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -866,6 +897,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"updatePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -875,6 +907,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"updatePlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -957,7 +990,8 @@ public class Playlists implements
/**
* Retrieve Playlist Contents
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
*
* <p>Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
* By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter.
* For example, you could use this to display a list of recently added albums vis a smart playlist.
* Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
@@ -970,19 +1004,20 @@ public class Playlists implements
/**
* Retrieve Playlist Contents
* Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
*
* <p>Gets the contents of a playlist. Should be paged by clients via standard mechanisms.
* By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter.
* For example, you could use this to display a list of recently added albums vis a smart playlist.
* Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
*
* @param playlistID the ID of the playlist
* @param type The type of media to retrieve or filter by.
1 = movie
2 = show
3 = season
4 = episode
E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
* 1 = movie
* 2 = show
* 3 = season
* 4 = episode
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -1022,6 +1057,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1033,6 +1069,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1042,6 +1079,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1051,6 +1089,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1144,7 +1183,8 @@ public class Playlists implements
/**
* Delete Playlist Contents
* Clears a playlist, only works with dumb playlists. Returns the playlist.
*
* <p>Clears a playlist, only works with dumb playlists. Returns the playlist.
*
* @return The call builder
*/
@@ -1154,7 +1194,8 @@ public class Playlists implements
/**
* Delete Playlist Contents
* Clears a playlist, only works with dumb playlists. Returns the playlist.
*
* <p>Clears a playlist, only works with dumb playlists. Returns the playlist.
*
* @param playlistID the ID of the playlist
* @return The response from the API call
@@ -1189,6 +1230,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"clearPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1200,6 +1242,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"clearPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1209,6 +1252,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"clearPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1218,6 +1262,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"clearPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1300,7 +1345,8 @@ public class Playlists implements
/**
* Adding to a Playlist
* Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
*
* <p>Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
* With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
*
* @return The call builder
@@ -1311,7 +1357,8 @@ public class Playlists implements
/**
* Adding to a Playlist
* Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
*
* <p>Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
* With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
*
* @param playlistID the ID of the playlist
@@ -1327,7 +1374,8 @@ public class Playlists implements
/**
* Adding to a Playlist
* Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
*
* <p>Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
* With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
*
* @param playlistID the ID of the playlist
@@ -1374,6 +1422,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"addPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1385,6 +1434,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"addPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1394,6 +1444,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"addPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1403,6 +1454,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"addPlaylistContents",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1496,7 +1548,8 @@ public class Playlists implements
/**
* Upload Playlist
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
*
* <p>Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
*
* @return The call builder
*/
@@ -1506,20 +1559,21 @@ public class Playlists implements
/**
* Upload Playlist
* Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
*
* @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
The GUID of each playlist is based on the filename.
* @param force Force overwriting of duplicate playlists.
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
The `force` argument is used to disable overwriting.
If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
* <p>Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
*
* @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
* If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
* Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
* The GUID of each playlist is based on the filename.
* If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
* The GUID of each playlist is based on the filename.
*
* @param force Force overwriting of duplicate playlists.
* By default, a playlist file uploaded with the same path will overwrite the existing playlist.
* The `force` argument is used to disable overwriting.
* If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
*
* @param sectionID Possibly the section ID to upload the playlist to, we are not certain.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -1560,6 +1614,7 @@ public class Playlists implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"uploadPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1571,6 +1626,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"uploadPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1580,6 +1636,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"uploadPlaylist",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1589,6 +1646,7 @@ public class Playlists implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"uploadPlaylist",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -60,11 +59,10 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls that perform operations directly against https://Plex.tv
*
*/
public class Plex implements
MethodCallGetCompanionsData,
@@ -126,7 +124,9 @@ public class Plex implements
/**
* Get Companions Data
* Get Companions Data
*
* <p>Get Companions Data
*
* @return The call builder
*/
public GetCompanionsDataRequestBuilder getCompanionsData() {
@@ -135,7 +135,9 @@ public class Plex implements
/**
* Get Companions Data
* Get Companions Data
*
* <p>Get Companions Data
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -145,16 +147,20 @@ public class Plex implements
/**
* Get Companions Data
* Get Companions Data
*
* <p>Get Companions Data
*
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetCompanionsDataResponse getCompanionsData(
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_COMPANIONS_DATA_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_COMPANIONS_DATA_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -173,6 +179,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getCompanionsData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -184,6 +191,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getCompanionsData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -193,6 +201,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getCompanionsData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -202,6 +211,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getCompanionsData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -295,7 +305,9 @@ public class Plex implements
/**
* Get list of friends of the user logged in
* Get friends of provided auth token.
*
* <p>Get friends of provided auth token.
*
* @return The call builder
*/
public GetUserFriendsRequestBuilder getUserFriends() {
@@ -304,7 +316,9 @@ public class Plex implements
/**
* Get list of friends of the user logged in
* Get friends of provided auth token.
*
* <p>Get friends of provided auth token.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -314,16 +328,20 @@ public class Plex implements
/**
* Get list of friends of the user logged in
* Get friends of provided auth token.
*
* <p>Get friends of provided auth token.
*
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetUserFriendsResponse getUserFriends(
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_USER_FRIENDS_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_USER_FRIENDS_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -342,6 +360,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getUserFriends",
Optional.of(List.of()),
_hookSecuritySource),
@@ -353,6 +372,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getUserFriends",
Optional.of(List.of()),
_hookSecuritySource),
@@ -362,6 +382,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getUserFriends",
Optional.of(List.of()),
_hookSecuritySource),
@@ -371,6 +392,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getUserFriends",
Optional.of(List.of()),
_hookSecuritySource),
@@ -464,7 +486,9 @@ public class Plex implements
/**
* Get Geo Data
* Returns the geolocation and locale data of the caller
*
* <p>Returns the geolocation and locale data of the caller
*
* @return The call builder
*/
public GetGeoDataRequestBuilder getGeoData() {
@@ -473,7 +497,9 @@ public class Plex implements
/**
* Get Geo Data
* Returns the geolocation and locale data of the caller
*
* <p>Returns the geolocation and locale data of the caller
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -483,16 +509,20 @@ public class Plex implements
/**
* Get Geo Data
* Returns the geolocation and locale data of the caller
*
* <p>Returns the geolocation and locale data of the caller
*
* @param serverURL Overrides the server URL.
* @return The response from the API call
* @throws Exception if the API call fails
*/
public GetGeoDataResponse getGeoData(
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_GEO_DATA_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_GEO_DATA_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -508,6 +538,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getGeoData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -519,6 +550,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getGeoData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -528,6 +560,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getGeoData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -537,6 +570,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getGeoData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -630,7 +664,9 @@ public class Plex implements
/**
* Get Plex Home Data
* Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
*
* <p>Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
*
* @return The call builder
*/
public GetHomeDataRequestBuilder getHomeData() {
@@ -639,7 +675,9 @@ public class Plex implements
/**
* Get Plex Home Data
* Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
*
* <p>Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -663,6 +701,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getHomeData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -674,6 +713,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getHomeData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -683,6 +723,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getHomeData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -692,6 +733,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getHomeData",
Optional.of(List.of()),
_hookSecuritySource),
@@ -785,7 +827,9 @@ public class Plex implements
/**
* Get Server Resources
* Get Plex server access tokens and server connections
*
* <p>Get Plex server access tokens and server connections
*
* @return The call builder
*/
public GetServerResourcesRequestBuilder getServerResources() {
@@ -794,7 +838,9 @@ public class Plex implements
/**
* Get Server Resources
* Get Plex server access tokens and server connections
*
* <p>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
@@ -806,11 +852,13 @@ public class Plex implements
/**
* Get Server Resources
* Get Plex server access tokens and server connections
*
* <p>Get Plex server access tokens and server connections
*
* @param includeHttps Include Https entries in the results
* @param includeRelay Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
* E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
*
* @param includeIPv6 Include IPv6 entries in the results
* @param clientID An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
* @param serverURL Overrides the server URL.
@@ -832,9 +880,11 @@ public class Plex implements
.clientID(clientID)
.build();
String _baseUrl = Utils.templateUrl(GET_SERVER_RESOURCES_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_SERVER_RESOURCES_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -859,6 +909,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-server-resources",
Optional.of(List.of()),
_hookSecuritySource),
@@ -870,6 +921,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-server-resources",
Optional.of(List.of()),
_hookSecuritySource),
@@ -879,6 +931,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-server-resources",
Optional.of(List.of()),
_hookSecuritySource),
@@ -888,6 +941,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-server-resources",
Optional.of(List.of()),
_hookSecuritySource),
@@ -981,7 +1035,9 @@ public class Plex implements
/**
* Get a Pin
* Retrieve a Pin ID from Plex.tv to use for authentication flows
*
* <p>Retrieve a Pin ID from Plex.tv to use for authentication flows
*
* @return The call builder
*/
public GetPinRequestBuilder getPin() {
@@ -990,7 +1046,9 @@ public class Plex implements
/**
* Get a Pin
* Retrieve a Pin ID from Plex.tv to use for authentication flows
*
* <p>Retrieve a Pin ID from Plex.tv to use for authentication flows
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -1002,7 +1060,9 @@ public class Plex implements
/**
* Get a Pin
* Retrieve a Pin ID from Plex.tv to use for authentication flows
*
* <p>Retrieve a Pin ID from Plex.tv to use for authentication flows
*
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
@@ -1011,9 +1071,11 @@ public class Plex implements
public GetPinResponse getPin(
GetPinRequest request,
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_PIN_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_PIN_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -1035,6 +1097,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getPin",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1046,6 +1109,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPin",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1055,6 +1119,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getPin",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1064,6 +1129,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getPin",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1141,7 +1207,9 @@ public class Plex implements
/**
* Get Access Token by PinId
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
*
* <p>Retrieve an Access Token from Plex.tv after the Pin has been authenticated
*
* @return The call builder
*/
public GetTokenByPinIdRequestBuilder getTokenByPinId() {
@@ -1150,7 +1218,9 @@ public class Plex implements
/**
* Get Access Token by PinId
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
*
* <p>Retrieve an Access Token from Plex.tv after the Pin has been authenticated
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -1162,7 +1232,9 @@ public class Plex implements
/**
* Get Access Token by PinId
* Retrieve an Access Token from Plex.tv after the Pin has been authenticated
*
* <p>Retrieve an Access Token from Plex.tv after the Pin has been authenticated
*
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
@@ -1171,9 +1243,11 @@ public class Plex implements
public GetTokenByPinIdResponse getTokenByPinId(
GetTokenByPinIdRequest request,
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_TOKEN_BY_PIN_ID_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_TOKEN_BY_PIN_ID_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
GetTokenByPinIdRequest.class,
@@ -1192,6 +1266,7 @@ public class Plex implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getTokenByPinId",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1203,6 +1278,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTokenByPinId",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1212,6 +1288,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getTokenByPinId",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1221,6 +1298,7 @@ public class Plex implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTokenByPinId",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.annotation.JsonValue;
@@ -11,26 +10,28 @@ import dev.plexapi.sdk.utils.SpeakeasyHTTPClient;
import dev.plexapi.sdk.utils.Utils;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
/**
* Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
* # Plex Media Server OpenAPI Specification
*
* An Open Source OpenAPI Specification for Plex Media Server
* <p># Plex Media Server OpenAPI Specification
*
* Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
* <p>An Open Source OpenAPI Specification for Plex Media Server
*
* ## Documentation
* <p>Automation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)
*
* [API Documentation](https://plexapi.dev)
* <p>## Documentation
*
* ## SDKs
* <p>[API Documentation](https://plexapi.dev)
*
* The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).
* <p>## SDKs
*
* | Language | Repository | Releases | Other |
* <p>The following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).
*
* <p>| Language | Repository | Releases | Other |
* | --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
* | Python | [GitHub](https://github.com/LukeHagar/plexpy) | [PyPI](https://pypi.org/project/plex-api-client/) | - |
* | JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs) | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \ [JSR](https://jsr.io/@lukehagar/plexjs) | - |
@@ -40,7 +41,6 @@ import java.util.function.Consumer;
* | 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) | -
*
*/
public class PlexAPI {
@@ -52,24 +52,21 @@ public class PlexAPI {
/**
* The full address of your Plex Server
*/
"{protocol}://{ip}:{port}",
"https://10.10.10.47:32400",
};
/**
* Operations against the Plex Media Server System.
*
*/
private final Server server;
/**
* API Calls interacting with Plex Media Server Media
*
*/
private final Media media;
/**
* API Calls that perform operations with Plex Media Server Videos
*
*/
private final Video video;
@@ -81,83 +78,70 @@ public class PlexAPI {
* - They must contain an `type` which is used by clients to distinguish the specific activity.
* - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
* - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
*
*/
private final Activities activities;
/**
* Butler is the task manager of the Plex Media Server Ecosystem.
*
*/
private final Butler butler;
/**
* API Calls that perform operations directly against https://Plex.tv
*
*/
private final Plex plex;
/**
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
*
*/
private final Hubs hubs;
/**
* API Calls that perform search operations with Plex Media Server
*
*/
private final Search search;
/**
* API Calls interacting with Plex Media Server Libraries
*
*/
private final Library library;
/**
* API Calls that perform operations with Plex Media Server Watchlists
*
*/
private final Watchlist watchlist;
/**
* Submit logs to the Log Handler for Plex Media Server
*
*/
private final Log log;
/**
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
* They can be organized in (optionally nesting) folders.
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
* This may cause the duration and number of items to change.
*
*/
private final Playlists playlists;
/**
* API Calls regarding authentication for Plex Media Server
*
*/
private final Authentication authentication;
/**
* API Calls that perform operations with Plex Media Server Statistics
*
*/
private final Statistics statistics;
/**
* API Calls that perform search operations with Plex Media Server Sessions
*
*/
private final Sessions sessions;
/**
* This describes the API for searching and applying updates to the Plex Media Server.
* Updates to the status can be observed via the Event API.
*
*/
private final Updater updater;
@@ -165,7 +149,6 @@ public class PlexAPI {
/**
* Operations against the Plex Media Server System.
*
*/
public Server server() {
return server;
@@ -173,7 +156,6 @@ public class PlexAPI {
/**
* API Calls interacting with Plex Media Server Media
*
*/
public Media media() {
return media;
@@ -181,7 +163,6 @@ public class PlexAPI {
/**
* API Calls that perform operations with Plex Media Server Videos
*
*/
public Video video() {
return video;
@@ -195,7 +176,6 @@ public class PlexAPI {
* - They must contain an `type` which is used by clients to distinguish the specific activity.
* - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.)
* - The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
*
*/
public Activities activities() {
return activities;
@@ -203,7 +183,6 @@ public class PlexAPI {
/**
* Butler is the task manager of the Plex Media Server Ecosystem.
*
*/
public Butler butler() {
return butler;
@@ -211,7 +190,6 @@ public class PlexAPI {
/**
* API Calls that perform operations directly against https://Plex.tv
*
*/
public Plex plex() {
return plex;
@@ -219,7 +197,6 @@ public class PlexAPI {
/**
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
*
*/
public Hubs hubs() {
return hubs;
@@ -227,7 +204,6 @@ public class PlexAPI {
/**
* API Calls that perform search operations with Plex Media Server
*
*/
public Search search() {
return search;
@@ -235,7 +211,6 @@ public class PlexAPI {
/**
* API Calls interacting with Plex Media Server Libraries
*
*/
public Library library() {
return library;
@@ -243,7 +218,6 @@ public class PlexAPI {
/**
* API Calls that perform operations with Plex Media Server Watchlists
*
*/
public Watchlist watchlist() {
return watchlist;
@@ -251,18 +225,16 @@ public class PlexAPI {
/**
* Submit logs to the Log Handler for Plex Media Server
*
*/
public Log log() {
return log;
}
/**
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
* They can be organized in (optionally nesting) folders.
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
* This may cause the duration and number of items to change.
*
*/
public Playlists playlists() {
return playlists;
@@ -270,7 +242,6 @@ public class PlexAPI {
/**
* API Calls regarding authentication for Plex Media Server
*
*/
public Authentication authentication() {
return authentication;
@@ -278,7 +249,6 @@ public class PlexAPI {
/**
* API Calls that perform operations with Plex Media Server Statistics
*
*/
public Statistics statistics() {
return statistics;
@@ -286,7 +256,6 @@ public class PlexAPI {
/**
* API Calls that perform search operations with Plex Media Server Sessions
*
*/
public Sessions sessions() {
return sessions;
@@ -295,7 +264,6 @@ public class PlexAPI {
/**
* This describes the API for searching and applying updates to the Plex Media Server.
* Updates to the status can be observed via the Event API.
*
*/
public Updater updater() {
return updater;
@@ -342,6 +310,7 @@ public class PlexAPI {
/**
* Configures the SDK to use a custom security source.
*
* @param securitySource The security source to use for all requests.
* @return The builder instance.
*/
@@ -396,7 +365,9 @@ public class PlexAPI {
return this;
}
/**
* ServerProtocol - The protocol to use for the server connection
* ServerProtocol
*
* <p>The protocol to use for the server connection
*/
public enum ServerProtocol {
HTTP("http"),
@@ -412,6 +383,15 @@ public class PlexAPI {
public String value() {
return value;
}
public static Optional<ServerProtocol> fromValue(String value) {
for (ServerProtocol o: ServerProtocol.values()) {
if (Objects.deepEquals(o.value, value)) {
return Optional.of(o);
}
}
return Optional.empty();
}
}
/**
* Sets the protocol variable for url substitution.
@@ -478,6 +458,7 @@ public class PlexAPI {
/**
* Builds a new instance of the SDK.
*
* @return The SDK instance.
*/
public PlexAPI build() {
@@ -500,6 +481,7 @@ public class PlexAPI {
/**
* Get a new instance of the SDK builder to configure a new instance of the SDK.
*
* @return The SDK builder instance.
*/
public static Builder builder() {
@@ -526,4 +508,5 @@ public class PlexAPI {
this.updater = new Updater(sdkConfiguration);
this.users = new Users(sdkConfiguration);
this.sdkConfiguration.initialize();
}}
}
}

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import dev.plexapi.sdk.hooks.SDKHooks;
@@ -43,8 +42,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.13.1";
public static final String GEN_VERSION = "2.545.4";
public static final String SDK_VERSION = "0.16.0";
public static final String GEN_VERSION = "2.585.2";
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -36,11 +35,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls that perform search operations with Plex Media Server
*
*/
public class Search implements
MethodCallPerformSearch,
@@ -56,18 +54,19 @@ public class Search implements
/**
* Perform a search
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
*
* In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
* <p>This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
*
* - `reason`: The reason for the result, if not because of a direct search term match; can be either:
* <p>In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
*
* <p>- `reason`: The reason for the result, if not because of a direct search term match; can be either:
* - `section`: There are multiple identical results from different sections.
* - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).
* - `&lt;hub identifier&gt;`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor`
* - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold").
* - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID.
*
* This request is intended to be very fast, and called as the user types.
* <p>This request is intended to be very fast, and called as the user types.
*
* @return The call builder
*/
@@ -77,18 +76,19 @@ public class Search implements
/**
* Perform a search
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
*
* In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
* <p>This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
*
* - `reason`: The reason for the result, if not because of a direct search term match; can be either:
* <p>In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
*
* <p>- `reason`: The reason for the result, if not because of a direct search term match; can be either:
* - `section`: There are multiple identical results from different sections.
* - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).
* - `&lt;hub identifier&gt;`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor`
* - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold").
* - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID.
*
* This request is intended to be very fast, and called as the user types.
* <p>This request is intended to be very fast, and called as the user types.
*
* @param query The query term
* @return The response from the API call
@@ -101,18 +101,19 @@ public class Search implements
/**
* Perform a search
* This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
*
* In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
* <p>This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
*
* - `reason`: The reason for the result, if not because of a direct search term match; can be either:
* <p>In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
*
* <p>- `reason`: The reason for the result, if not because of a direct search term match; can be either:
* - `section`: There are multiple identical results from different sections.
* - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).
* - `&lt;hub identifier&gt;`: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor`
* - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold").
* - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID.
*
* This request is intended to be very fast, and called as the user types.
* <p>This request is intended to be very fast, and called as the user types.
*
* @param query The query term
* @param sectionId This gives context to the search, and can result in re-ordering of search result hubs
@@ -156,6 +157,7 @@ public class Search implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"performSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -167,6 +169,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"performSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -176,6 +179,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"performSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -185,6 +189,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"performSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -267,7 +272,8 @@ public class Search implements
/**
* Perform a voice search
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
*
* <p>This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
* It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint.
* Whenever possible, clients should limit the search to the appropriate type.
* Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
@@ -280,7 +286,8 @@ public class Search implements
/**
* Perform a voice search
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
*
* <p>This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
* It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint.
* Whenever possible, clients should limit the search to the appropriate type.
* Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
@@ -296,7 +303,8 @@ public class Search implements
/**
* Perform a voice search
* This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
*
* <p>This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint.
* It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint.
* Whenever possible, clients should limit the search to the appropriate type.
* Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
@@ -343,6 +351,7 @@ public class Search implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"performVoiceSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -354,6 +363,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"performVoiceSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -363,6 +373,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"performVoiceSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -372,6 +383,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"performVoiceSearch",
Optional.of(List.of()),
_hookSecuritySource),
@@ -454,7 +466,9 @@ public class Search implements
/**
* Get Search Results
* This will search the database for the string provided.
*
* <p>This will search the database for the string provided.
*
* @return The call builder
*/
public GetSearchResultsRequestBuilder getSearchResults() {
@@ -463,7 +477,9 @@ public class Search implements
/**
* Get Search Results
* This will search the database for the string provided.
*
* <p>This will search the database for the string provided.
*
* @param query The search query string to use
* @return The response from the API call
* @throws Exception if the API call fails
@@ -500,6 +516,7 @@ public class Search implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getSearchResults",
Optional.of(List.of()),
_hookSecuritySource),
@@ -511,6 +528,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSearchResults",
Optional.of(List.of()),
_hookSecuritySource),
@@ -520,6 +538,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getSearchResults",
Optional.of(List.of()),
_hookSecuritySource),
@@ -529,6 +548,7 @@ public class Search implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSearchResults",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,27 +1,26 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import dev.plexapi.sdk.models.shared.Security;
import dev.plexapi.sdk.utils.HasSecurity;
public interface SecuritySource {
Security getSecurity();
HasSecurity getSecurity();
public static SecuritySource of(Security security) {
public static SecuritySource of(HasSecurity security) {
return new DefaultSecuritySource(security);
}
public static class DefaultSecuritySource implements SecuritySource {
private Security security;
private HasSecurity security;
public DefaultSecuritySource(Security security) {
public DefaultSecuritySource(HasSecurity security) {
this.security = security;
}
public Security getSecurity() {
public HasSecurity getSecurity() {
return security;
}
}

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -64,11 +63,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* Operations against the Plex Media Server System.
*
*/
public class Server implements
MethodCallGetServerCapabilities,
@@ -90,7 +88,9 @@ public class Server implements
/**
* Get Server Capabilities
* Get Server Capabilities
*
* <p>Get Server Capabilities
*
* @return The call builder
*/
public GetServerCapabilitiesRequestBuilder getServerCapabilities() {
@@ -99,7 +99,9 @@ public class Server implements
/**
* Get Server Capabilities
* Get Server Capabilities
*
* <p>Get Server Capabilities
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -123,6 +125,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getServerCapabilities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -134,6 +137,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerCapabilities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -143,6 +147,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getServerCapabilities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -152,6 +157,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerCapabilities",
Optional.of(List.of()),
_hookSecuritySource),
@@ -245,7 +251,9 @@ public class Server implements
/**
* Get Server Preferences
* Get Server Preferences
*
* <p>Get Server Preferences
*
* @return The call builder
*/
public GetServerPreferencesRequestBuilder getServerPreferences() {
@@ -254,7 +262,9 @@ public class Server implements
/**
* Get Server Preferences
* Get Server Preferences
*
* <p>Get Server Preferences
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -278,6 +288,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getServerPreferences",
Optional.of(List.of()),
_hookSecuritySource),
@@ -289,6 +300,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerPreferences",
Optional.of(List.of()),
_hookSecuritySource),
@@ -298,6 +310,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getServerPreferences",
Optional.of(List.of()),
_hookSecuritySource),
@@ -307,6 +320,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerPreferences",
Optional.of(List.of()),
_hookSecuritySource),
@@ -400,7 +414,9 @@ public class Server implements
/**
* Get Available Clients
* Get Available Clients
*
* <p>Get Available Clients
*
* @return The call builder
*/
public GetAvailableClientsRequestBuilder getAvailableClients() {
@@ -409,7 +425,9 @@ public class Server implements
/**
* Get Available Clients
* Get Available Clients
*
* <p>Get Available Clients
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -433,6 +451,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getAvailableClients",
Optional.of(List.of()),
_hookSecuritySource),
@@ -444,6 +463,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getAvailableClients",
Optional.of(List.of()),
_hookSecuritySource),
@@ -453,6 +473,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getAvailableClients",
Optional.of(List.of()),
_hookSecuritySource),
@@ -462,6 +483,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getAvailableClients",
Optional.of(List.of()),
_hookSecuritySource),
@@ -555,7 +577,9 @@ public class Server implements
/**
* Get Devices
* Get Devices
*
* <p>Get Devices
*
* @return The call builder
*/
public GetDevicesRequestBuilder getDevices() {
@@ -564,7 +588,9 @@ public class Server implements
/**
* Get Devices
* Get Devices
*
* <p>Get Devices
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -588,6 +614,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getDevices",
Optional.of(List.of()),
_hookSecuritySource),
@@ -599,6 +626,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getDevices",
Optional.of(List.of()),
_hookSecuritySource),
@@ -608,6 +636,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getDevices",
Optional.of(List.of()),
_hookSecuritySource),
@@ -617,6 +646,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getDevices",
Optional.of(List.of()),
_hookSecuritySource),
@@ -710,7 +740,9 @@ public class Server implements
/**
* Get Server Identity
* This request is useful to determine if the server is online or offline
*
* <p>This request is useful to determine if the server is online or offline
*
* @return The call builder
*/
public GetServerIdentityRequestBuilder getServerIdentity() {
@@ -719,7 +751,9 @@ public class Server implements
/**
* Get Server Identity
* This request is useful to determine if the server is online or offline
*
* <p>This request is useful to determine if the server is online or offline
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -740,6 +774,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-server-identity",
Optional.of(List.of()),
_hookSecuritySource),
@@ -751,6 +786,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-server-identity",
Optional.of(List.of()),
_hookSecuritySource),
@@ -760,6 +796,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-server-identity",
Optional.of(List.of()),
_hookSecuritySource),
@@ -769,6 +806,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-server-identity",
Optional.of(List.of()),
_hookSecuritySource),
@@ -846,7 +884,9 @@ public class Server implements
/**
* Get MyPlex Account
* Returns MyPlex Account Information
*
* <p>Returns MyPlex Account Information
*
* @return The call builder
*/
public GetMyPlexAccountRequestBuilder getMyPlexAccount() {
@@ -855,7 +895,9 @@ public class Server implements
/**
* Get MyPlex Account
* Returns MyPlex Account Information
*
* <p>Returns MyPlex Account Information
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -879,6 +921,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getMyPlexAccount",
Optional.of(List.of()),
_hookSecuritySource),
@@ -890,6 +933,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getMyPlexAccount",
Optional.of(List.of()),
_hookSecuritySource),
@@ -899,6 +943,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getMyPlexAccount",
Optional.of(List.of()),
_hookSecuritySource),
@@ -908,6 +953,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getMyPlexAccount",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1001,7 +1047,8 @@ public class Server implements
/**
* Get a Resized Photo
* Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
*
* <p>Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
*
* @return The call builder
*/
@@ -1011,7 +1058,8 @@ public class Server implements
/**
* Get a Resized Photo
* Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
*
* <p>Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
@@ -1043,6 +1091,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getResizedPhoto",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1054,6 +1103,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getResizedPhoto",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1063,6 +1113,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getResizedPhoto",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1072,6 +1123,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getResizedPhoto",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1154,7 +1206,9 @@ public class Server implements
/**
* Get Media Providers
* Retrieves media providers and their features from the Plex server.
*
* <p>Retrieves media providers and their features from the Plex server.
*
* @return The call builder
*/
public GetMediaProvidersRequestBuilder getMediaProviders() {
@@ -1163,7 +1217,9 @@ public class Server implements
/**
* Get Media Providers
* Retrieves media providers and their features from the Plex server.
*
* <p>Retrieves media providers and their features from the Plex server.
*
* @param xPlexToken An authentication token, obtained from plex.tv
* @return The response from the API call
* @throws Exception if the API call fails
@@ -1196,6 +1252,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-media-providers",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1207,6 +1264,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-media-providers",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1216,6 +1274,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-media-providers",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1225,6 +1284,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-media-providers",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1318,7 +1378,9 @@ public class Server implements
/**
* Get Server List
* Get Server List
*
* <p>Get Server List
*
* @return The call builder
*/
public GetServerListRequestBuilder getServerList() {
@@ -1327,7 +1389,9 @@ public class Server implements
/**
* Get Server List
* Get Server List
*
* <p>Get Server List
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -1351,6 +1415,7 @@ public class Server implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getServerList",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1362,6 +1427,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerList",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1371,6 +1437,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getServerList",
Optional.of(List.of()),
_hookSecuritySource),
@@ -1380,6 +1447,7 @@ public class Server implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getServerList",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -42,11 +41,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls that perform search operations with Plex Media Server Sessions
*
*/
public class Sessions implements
MethodCallGetSessions,
@@ -63,7 +61,9 @@ public class Sessions implements
/**
* Get Active Sessions
* This will retrieve the "Now Playing" Information of the PMS.
*
* <p>This will retrieve the "Now Playing" Information of the PMS.
*
* @return The call builder
*/
public GetSessionsRequestBuilder getSessions() {
@@ -72,7 +72,9 @@ public class Sessions implements
/**
* Get Active Sessions
* This will retrieve the "Now Playing" Information of the PMS.
*
* <p>This will retrieve the "Now Playing" Information of the PMS.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -96,6 +98,7 @@ public class Sessions implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -107,6 +110,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -116,6 +120,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -125,6 +130,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -218,7 +224,9 @@ public class Sessions implements
/**
* Get Session History
* This will Retrieve a listing of all history views.
*
* <p>This will Retrieve a listing of all history views.
*
* @return The call builder
*/
public GetSessionHistoryRequestBuilder getSessionHistory() {
@@ -227,7 +235,9 @@ public class Sessions implements
/**
* Get Session History
* This will Retrieve a listing of all history views.
*
* <p>This will Retrieve a listing of all history views.
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -237,16 +247,18 @@ public class Sessions implements
/**
* Get Session History
* This will Retrieve a listing of all history views.
*
* <p>This will Retrieve a listing of all history views.
*
* @param sort Sorts the results by the specified field followed by the direction (asc, desc)
*
* @param accountId Filter results by those that are related to a specific users id
*
* @param filter Filters content by field and direction/equality
(Unknown if viewedAt is the only supported column)
* (Unknown if viewedAt is the only supported column)
*
* @param librarySectionID Filters the results based on the id of a valid library section
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -288,6 +300,7 @@ public class Sessions implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getSessionHistory",
Optional.of(List.of()),
_hookSecuritySource),
@@ -299,6 +312,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSessionHistory",
Optional.of(List.of()),
_hookSecuritySource),
@@ -308,6 +322,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getSessionHistory",
Optional.of(List.of()),
_hookSecuritySource),
@@ -317,6 +332,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getSessionHistory",
Optional.of(List.of()),
_hookSecuritySource),
@@ -410,7 +426,9 @@ public class Sessions implements
/**
* Get Transcode Sessions
* Get Transcode Sessions
*
* <p>Get Transcode Sessions
*
* @return The call builder
*/
public GetTranscodeSessionsRequestBuilder getTranscodeSessions() {
@@ -419,7 +437,9 @@ public class Sessions implements
/**
* Get Transcode Sessions
* Get Transcode Sessions
*
* <p>Get Transcode Sessions
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -443,6 +463,7 @@ public class Sessions implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getTranscodeSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -454,6 +475,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTranscodeSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -463,6 +485,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getTranscodeSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -472,6 +495,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTranscodeSessions",
Optional.of(List.of()),
_hookSecuritySource),
@@ -565,7 +589,9 @@ public class Sessions implements
/**
* Stop a Transcode Session
* Stop a Transcode Session
*
* <p>Stop a Transcode Session
*
* @return The call builder
*/
public StopTranscodeSessionRequestBuilder stopTranscodeSession() {
@@ -574,7 +600,9 @@ public class Sessions implements
/**
* Stop a Transcode Session
* Stop a Transcode Session
*
* <p>Stop a Transcode Session
*
* @param sessionKey the Key of the transcode session to stop
* @return The response from the API call
* @throws Exception if the API call fails
@@ -608,6 +636,7 @@ public class Sessions implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"stopTranscodeSession",
Optional.of(List.of()),
_hookSecuritySource),
@@ -619,6 +648,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"stopTranscodeSession",
Optional.of(List.of()),
_hookSecuritySource),
@@ -628,6 +658,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"stopTranscodeSession",
Optional.of(List.of()),
_hookSecuritySource),
@@ -637,6 +668,7 @@ public class Sessions implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"stopTranscodeSession",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -38,11 +37,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls that perform operations with Plex Media Server Statistics
*
*/
public class Statistics implements
MethodCallGetStatistics,
@@ -58,7 +56,9 @@ public class Statistics implements
/**
* Get Media Statistics
* This will return the media statistics for the server
*
* <p>This will return the media statistics for the server
*
* @return The call builder
*/
public GetStatisticsRequestBuilder getStatistics() {
@@ -67,7 +67,9 @@ public class Statistics implements
/**
* Get Media Statistics
* This will return the media statistics for the server
*
* <p>This will return the media statistics for the server
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -77,10 +79,12 @@ public class Statistics implements
/**
* Get Media Statistics
* This will return the media statistics for the server
*
* <p>This will return the media statistics for the server
*
* @param timespan The timespan to retrieve statistics for
the exact meaning of this parameter is not known
* the exact meaning of this parameter is not known
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -116,6 +120,7 @@ public class Statistics implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -127,6 +132,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -136,6 +142,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -145,6 +152,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -238,7 +246,9 @@ public class Statistics implements
/**
* Get Resources Statistics
* This will return the resources for the server
*
* <p>This will return the resources for the server
*
* @return The call builder
*/
public GetResourcesStatisticsRequestBuilder getResourcesStatistics() {
@@ -247,7 +257,9 @@ public class Statistics implements
/**
* Get Resources Statistics
* This will return the resources for the server
*
* <p>This will return the resources for the server
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -257,10 +269,12 @@ public class Statistics implements
/**
* Get Resources Statistics
* This will return the resources for the server
*
* <p>This will return the resources for the server
*
* @param timespan The timespan to retrieve statistics for
the exact meaning of this parameter is not known
* the exact meaning of this parameter is not known
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -296,6 +310,7 @@ public class Statistics implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getResourcesStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -307,6 +322,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getResourcesStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -316,6 +332,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getResourcesStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -325,6 +342,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getResourcesStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -418,7 +436,9 @@ public class Statistics implements
/**
* Get Bandwidth Statistics
* This will return the bandwidth statistics for the server
*
* <p>This will return the bandwidth statistics for the server
*
* @return The call builder
*/
public GetBandwidthStatisticsRequestBuilder getBandwidthStatistics() {
@@ -427,7 +447,9 @@ public class Statistics implements
/**
* Get Bandwidth Statistics
* This will return the bandwidth statistics for the server
*
* <p>This will return the bandwidth statistics for the server
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -437,10 +459,12 @@ public class Statistics implements
/**
* Get Bandwidth Statistics
* This will return the bandwidth statistics for the server
*
* <p>This will return the bandwidth statistics for the server
*
* @param timespan The timespan to retrieve statistics for
the exact meaning of this parameter is not known
* the exact meaning of this parameter is not known
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -476,6 +500,7 @@ public class Statistics implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getBandwidthStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -487,6 +512,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getBandwidthStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -496,6 +522,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getBandwidthStatistics",
Optional.of(List.of()),
_hookSecuritySource),
@@ -505,6 +532,7 @@ public class Statistics implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getBandwidthStatistics",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -37,12 +36,11 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* This describes the API for searching and applying updates to the Plex Media Server.
* Updates to the status can be observed via the Event API.
*
*/
public class Updater implements
MethodCallGetUpdateStatus,
@@ -58,7 +56,9 @@ public class Updater implements
/**
* Querying status of updates
* Querying status of updates
*
* <p>Querying status of updates
*
* @return The call builder
*/
public GetUpdateStatusRequestBuilder getUpdateStatus() {
@@ -67,7 +67,9 @@ public class Updater implements
/**
* Querying status of updates
* Querying status of updates
*
* <p>Querying status of updates
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -91,6 +93,7 @@ public class Updater implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getUpdateStatus",
Optional.of(List.of()),
_hookSecuritySource),
@@ -102,6 +105,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getUpdateStatus",
Optional.of(List.of()),
_hookSecuritySource),
@@ -111,6 +115,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getUpdateStatus",
Optional.of(List.of()),
_hookSecuritySource),
@@ -120,6 +125,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getUpdateStatus",
Optional.of(List.of()),
_hookSecuritySource),
@@ -213,7 +219,9 @@ public class Updater implements
/**
* Checking for updates
* Checking for updates
*
* <p>Checking for updates
*
* @return The call builder
*/
public CheckForUpdatesRequestBuilder checkForUpdates() {
@@ -222,7 +230,9 @@ public class Updater implements
/**
* Checking for updates
* Checking for updates
*
* <p>Checking for updates
*
* @return The response from the API call
* @throws Exception if the API call fails
*/
@@ -232,7 +242,9 @@ public class Updater implements
/**
* Checking for updates
* Checking for updates
*
* <p>Checking for updates
*
* @param download Indicate that you want to start download any updates found.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -269,6 +281,7 @@ public class Updater implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"checkForUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -280,6 +293,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"checkForUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -289,6 +303,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"checkForUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -298,6 +313,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"checkForUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -380,7 +396,8 @@ public class Updater implements
/**
* Apply Updates
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
*
* <p>Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
*
* @return The call builder
*/
@@ -390,7 +407,8 @@ public class Updater implements
/**
* Apply Updates
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
*
* <p>Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
*
* @return The response from the API call
* @throws Exception if the API call fails
@@ -401,7 +419,8 @@ public class Updater implements
/**
* Apply Updates
* Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
*
* <p>Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
*
* @param tonight Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
* @param skip Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`.
@@ -442,6 +461,7 @@ public class Updater implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"applyUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -453,6 +473,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"applyUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -462,6 +483,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"applyUpdates",
Optional.of(List.of()),
_hookSecuritySource),
@@ -471,6 +493,7 @@ public class Updater implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"applyUpdates",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -25,7 +24,7 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
public class Users implements
MethodCallGetUsers {
@@ -46,7 +45,9 @@ public class Users implements
/**
* Get list of all connected users
* Get list of all users that are friends and have library access with the provided Plex authentication token
*
* <p>Get list of all users that are friends and have library access with the provided Plex authentication token
*
* @return The call builder
*/
public GetUsersRequestBuilder getUsers() {
@@ -55,7 +56,9 @@ public class Users implements
/**
* Get list of all connected users
* Get list of all users that are friends and have library access with the provided Plex authentication token
*
* <p>Get list of all users that are friends and have library access with the provided Plex authentication token
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -67,7 +70,9 @@ public class Users implements
/**
* Get list of all connected users
* Get list of all users that are friends and have library access with the provided Plex authentication token
*
* <p>Get list of all users that are friends and have library access with the provided Plex authentication token
*
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
@@ -76,9 +81,11 @@ public class Users implements
public GetUsersResponse getUsers(
GetUsersRequest request,
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_USERS_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_USERS_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
_baseUrl,
@@ -95,6 +102,7 @@ public class Users implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
@@ -106,6 +114,7 @@ public class Users implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
@@ -115,6 +124,7 @@ public class Users implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-users",
Optional.of(List.of()),
_hookSecuritySource),
@@ -124,6 +134,7 @@ public class Users implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-users",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -29,11 +28,10 @@ import java.lang.String;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls that perform operations with Plex Media Server Videos
*
*/
public class Video implements
MethodCallGetTimeline,
@@ -48,7 +46,9 @@ public class Video implements
/**
* Get the timeline for a media item
* Get the timeline for a media item
*
* <p>Get the timeline for a media item
*
* @return The call builder
*/
public GetTimelineRequestBuilder getTimeline() {
@@ -57,7 +57,9 @@ public class Video implements
/**
* Get the timeline for a media item
* Get the timeline for a media item
*
* <p>Get the timeline for a media item
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -88,6 +90,7 @@ public class Video implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"getTimeline",
Optional.of(List.of()),
_hookSecuritySource),
@@ -99,6 +102,7 @@ public class Video implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTimeline",
Optional.of(List.of()),
_hookSecuritySource),
@@ -108,6 +112,7 @@ public class Video implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"getTimeline",
Optional.of(List.of()),
_hookSecuritySource),
@@ -117,6 +122,7 @@ public class Video implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"getTimeline",
Optional.of(List.of()),
_hookSecuritySource),
@@ -199,7 +205,9 @@ public class Video implements
/**
* Start Universal Transcode
* Begin a Universal Transcode Session
*
* <p>Begin a Universal Transcode Session
*
* @return The call builder
*/
public StartUniversalTranscodeRequestBuilder startUniversalTranscode() {
@@ -208,7 +216,9 @@ public class Video implements
/**
* Start Universal Transcode
* Begin a Universal Transcode Session
*
* <p>Begin a Universal Transcode Session
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -239,6 +249,7 @@ public class Video implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"startUniversalTranscode",
Optional.of(List.of()),
_hookSecuritySource),
@@ -250,6 +261,7 @@ public class Video implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"startUniversalTranscode",
Optional.of(List.of()),
_hookSecuritySource),
@@ -259,6 +271,7 @@ public class Video implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"startUniversalTranscode",
Optional.of(List.of()),
_hookSecuritySource),
@@ -268,6 +281,7 @@ public class Video implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"startUniversalTranscode",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -26,11 +25,10 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.Optional;
/**
* API Calls that perform operations with Plex Media Server Watchlists
*
*/
public class Watchlist implements
MethodCallGetWatchList {
@@ -54,7 +52,9 @@ public class Watchlist implements
/**
* Get User Watchlist
* Get User Watchlist
*
* <p>Get User Watchlist
*
* @return The call builder
*/
public GetWatchListRequestBuilder getWatchList() {
@@ -63,7 +63,9 @@ public class Watchlist implements
/**
* Get User Watchlist
* Get User Watchlist
*
* <p>Get User Watchlist
*
* @param request The request object containing all of the parameters for the API call.
* @return The response from the API call
* @throws Exception if the API call fails
@@ -75,7 +77,9 @@ public class Watchlist implements
/**
* Get User Watchlist
* Get User Watchlist
*
* <p>Get User Watchlist
*
* @param request The request object containing all of the parameters for the API call.
* @param serverURL Overrides the server URL.
* @return The response from the API call
@@ -84,9 +88,11 @@ public class Watchlist implements
public GetWatchListResponse getWatchList(
GetWatchListRequest request,
Optional<String> serverURL) throws Exception {
String _baseUrl = Utils.templateUrl(GET_WATCH_LIST_SERVERS[0], new HashMap<String, String>());
final String _baseUrl;
if (serverURL.isPresent() && !serverURL.get().isBlank()) {
_baseUrl = serverURL.get();
} else {
_baseUrl = Utils.templateUrl(GET_WATCH_LIST_SERVERS[0], new HashMap<String, String>());
}
String _url = Utils.generateURL(
GetWatchListRequest.class,
@@ -113,6 +119,7 @@ public class Watchlist implements
sdkConfiguration.hooks()
.beforeRequest(
new BeforeRequestContextImpl(
_baseUrl,
"get-watch-list",
Optional.of(List.of()),
_hookSecuritySource),
@@ -124,6 +131,7 @@ public class Watchlist implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-watch-list",
Optional.of(List.of()),
_hookSecuritySource),
@@ -133,6 +141,7 @@ public class Watchlist implements
_httpRes = sdkConfiguration.hooks()
.afterSuccess(
new AfterSuccessContextImpl(
_baseUrl,
"get-watch-list",
Optional.of(List.of()),
_hookSecuritySource),
@@ -142,6 +151,7 @@ public class Watchlist implements
_httpRes = sdkConfiguration.hooks()
.afterError(
new AfterErrorContextImpl(
_baseUrl,
"get-watch-list",
Optional.of(List.of()),
_hookSecuritySource),

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* AddPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* AddPlaylistContentsBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class AddPlaylistContentsBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<AddPlaylistContentsErrors>> errors(){
@JsonIgnore
public Optional<List<AddPlaylistContentsErrors>> errors() {
return (Optional<List<AddPlaylistContentsErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public AddPlaylistContentsBadRequest withErrors(List<AddPlaylistContentsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public AddPlaylistContentsBadRequest withErrors(Optional<? extends List<AddPlaylistContentsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
return false;
}
AddPlaylistContentsBadRequest other = (AddPlaylistContentsBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(AddPlaylistContentsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<AddPlaylistContentsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<AddPlaylistContentsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public AddPlaylistContentsBadRequest build() {
return new AddPlaylistContentsBadRequest(
errors,
@@ -170,3 +177,4 @@ public class AddPlaylistContentsBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class AddPlaylistContentsErrors {
public final static Builder builder() {
return new Builder();
}
}
public AddPlaylistContentsErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class AddPlaylistContentsErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class AddPlaylistContentsErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class AddPlaylistContentsErrors {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class AddPlaylistContentsPlaylistsErrors {
public final static Builder builder() {
return new Builder();
}
}
public AddPlaylistContentsPlaylistsErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class AddPlaylistContentsPlaylistsErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class AddPlaylistContentsPlaylistsErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class AddPlaylistContentsPlaylistsErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* AddPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* AddPlaylistContentsUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class AddPlaylistContentsUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<AddPlaylistContentsPlaylistsErrors>> errors(){
@JsonIgnore
public Optional<List<AddPlaylistContentsPlaylistsErrors>> errors() {
return (Optional<List<AddPlaylistContentsPlaylistsErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public AddPlaylistContentsUnauthorized withErrors(List<AddPlaylistContentsPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public AddPlaylistContentsUnauthorized withErrors(Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
return false;
}
AddPlaylistContentsUnauthorized other = (AddPlaylistContentsUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(AddPlaylistContentsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<AddPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public AddPlaylistContentsUnauthorized build() {
return new AddPlaylistContentsUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class AddPlaylistContentsUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* ApplyUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* ApplyUpdatesBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class ApplyUpdatesBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<ApplyUpdatesErrors>> errors(){
@JsonIgnore
public Optional<List<ApplyUpdatesErrors>> errors() {
return (Optional<List<ApplyUpdatesErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public ApplyUpdatesBadRequest withErrors(List<ApplyUpdatesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ApplyUpdatesBadRequest withErrors(Optional<? extends List<ApplyUpdatesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
return false;
}
ApplyUpdatesBadRequest other = (ApplyUpdatesBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(ApplyUpdatesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<ApplyUpdatesErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<ApplyUpdatesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public ApplyUpdatesBadRequest build() {
return new ApplyUpdatesBadRequest(
errors,
@@ -170,3 +177,4 @@ public class ApplyUpdatesBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class ApplyUpdatesErrors {
public final static Builder builder() {
return new Builder();
}
}
public ApplyUpdatesErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class ApplyUpdatesErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class ApplyUpdatesErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class ApplyUpdatesErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* ApplyUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* ApplyUpdatesUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class ApplyUpdatesUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<ApplyUpdatesUpdaterErrors>> errors(){
@JsonIgnore
public Optional<List<ApplyUpdatesUpdaterErrors>> errors() {
return (Optional<List<ApplyUpdatesUpdaterErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public ApplyUpdatesUnauthorized withErrors(List<ApplyUpdatesUpdaterErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ApplyUpdatesUnauthorized withErrors(Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
return false;
}
ApplyUpdatesUnauthorized other = (ApplyUpdatesUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(ApplyUpdatesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<ApplyUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public ApplyUpdatesUnauthorized build() {
return new ApplyUpdatesUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class ApplyUpdatesUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class ApplyUpdatesUpdaterErrors {
public final static Builder builder() {
return new Builder();
}
}
public ApplyUpdatesUpdaterErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class ApplyUpdatesUpdaterErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class ApplyUpdatesUpdaterErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class ApplyUpdatesUpdaterErrors {
}
}
}

View File

@@ -1,7 +1,6 @@
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
package dev.plexapi.sdk.models.errors;
import java.util.Optional;

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class CancelServerActivitiesActivitiesErrors {
public final static Builder builder() {
return new Builder();
}
}
public CancelServerActivitiesActivitiesErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class CancelServerActivitiesActivitiesErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class CancelServerActivitiesActivitiesErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class CancelServerActivitiesActivitiesErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* CancelServerActivitiesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* CancelServerActivitiesBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class CancelServerActivitiesBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<CancelServerActivitiesErrors>> errors(){
@JsonIgnore
public Optional<List<CancelServerActivitiesErrors>> errors() {
return (Optional<List<CancelServerActivitiesErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public CancelServerActivitiesBadRequest withErrors(List<CancelServerActivitiesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CancelServerActivitiesBadRequest withErrors(Optional<? extends List<CancelServerActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
return false;
}
CancelServerActivitiesBadRequest other = (CancelServerActivitiesBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CancelServerActivitiesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CancelServerActivitiesErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CancelServerActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public CancelServerActivitiesBadRequest build() {
return new CancelServerActivitiesBadRequest(
errors,
@@ -170,3 +177,4 @@ public class CancelServerActivitiesBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class CancelServerActivitiesErrors {
public final static Builder builder() {
return new Builder();
}
}
public CancelServerActivitiesErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class CancelServerActivitiesErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class CancelServerActivitiesErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class CancelServerActivitiesErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* CancelServerActivitiesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* CancelServerActivitiesUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class CancelServerActivitiesUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<CancelServerActivitiesActivitiesErrors>> errors(){
@JsonIgnore
public Optional<List<CancelServerActivitiesActivitiesErrors>> errors() {
return (Optional<List<CancelServerActivitiesActivitiesErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public CancelServerActivitiesUnauthorized withErrors(List<CancelServerActivitiesActivitiesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CancelServerActivitiesUnauthorized withErrors(Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
return false;
}
CancelServerActivitiesUnauthorized other = (CancelServerActivitiesUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CancelServerActivitiesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CancelServerActivitiesActivitiesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public CancelServerActivitiesUnauthorized build() {
return new CancelServerActivitiesUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class CancelServerActivitiesUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* CheckForUpdatesBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* CheckForUpdatesBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class CheckForUpdatesBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<CheckForUpdatesErrors>> errors(){
@JsonIgnore
public Optional<List<CheckForUpdatesErrors>> errors() {
return (Optional<List<CheckForUpdatesErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public CheckForUpdatesBadRequest withErrors(List<CheckForUpdatesErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CheckForUpdatesBadRequest withErrors(Optional<? extends List<CheckForUpdatesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
return false;
}
CheckForUpdatesBadRequest other = (CheckForUpdatesBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CheckForUpdatesBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CheckForUpdatesErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CheckForUpdatesErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public CheckForUpdatesBadRequest build() {
return new CheckForUpdatesBadRequest(
errors,
@@ -170,3 +177,4 @@ public class CheckForUpdatesBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class CheckForUpdatesErrors {
public final static Builder builder() {
return new Builder();
}
}
public CheckForUpdatesErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class CheckForUpdatesErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class CheckForUpdatesErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class CheckForUpdatesErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* CheckForUpdatesUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* CheckForUpdatesUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class CheckForUpdatesUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<CheckForUpdatesUpdaterErrors>> errors(){
@JsonIgnore
public Optional<List<CheckForUpdatesUpdaterErrors>> errors() {
return (Optional<List<CheckForUpdatesUpdaterErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public CheckForUpdatesUnauthorized withErrors(List<CheckForUpdatesUpdaterErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CheckForUpdatesUnauthorized withErrors(Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
return false;
}
CheckForUpdatesUnauthorized other = (CheckForUpdatesUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CheckForUpdatesUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CheckForUpdatesUpdaterErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public CheckForUpdatesUnauthorized build() {
return new CheckForUpdatesUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class CheckForUpdatesUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class CheckForUpdatesUpdaterErrors {
public final static Builder builder() {
return new Builder();
}
}
public CheckForUpdatesUpdaterErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class CheckForUpdatesUpdaterErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class CheckForUpdatesUpdaterErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class CheckForUpdatesUpdaterErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* ClearPlaylistContentsBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* ClearPlaylistContentsBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class ClearPlaylistContentsBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<ClearPlaylistContentsErrors>> errors(){
@JsonIgnore
public Optional<List<ClearPlaylistContentsErrors>> errors() {
return (Optional<List<ClearPlaylistContentsErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public ClearPlaylistContentsBadRequest withErrors(List<ClearPlaylistContentsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ClearPlaylistContentsBadRequest withErrors(Optional<? extends List<ClearPlaylistContentsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
return false;
}
ClearPlaylistContentsBadRequest other = (ClearPlaylistContentsBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(ClearPlaylistContentsBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<ClearPlaylistContentsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<ClearPlaylistContentsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public ClearPlaylistContentsBadRequest build() {
return new ClearPlaylistContentsBadRequest(
errors,
@@ -170,3 +177,4 @@ public class ClearPlaylistContentsBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class ClearPlaylistContentsErrors {
public final static Builder builder() {
return new Builder();
}
}
public ClearPlaylistContentsErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class ClearPlaylistContentsErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class ClearPlaylistContentsErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class ClearPlaylistContentsErrors {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class ClearPlaylistContentsPlaylistsErrors {
public final static Builder builder() {
return new Builder();
}
}
public ClearPlaylistContentsPlaylistsErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class ClearPlaylistContentsPlaylistsErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class ClearPlaylistContentsPlaylistsErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class ClearPlaylistContentsPlaylistsErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* ClearPlaylistContentsUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* ClearPlaylistContentsUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class ClearPlaylistContentsUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<ClearPlaylistContentsPlaylistsErrors>> errors(){
@JsonIgnore
public Optional<List<ClearPlaylistContentsPlaylistsErrors>> errors() {
return (Optional<List<ClearPlaylistContentsPlaylistsErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public ClearPlaylistContentsUnauthorized withErrors(List<ClearPlaylistContentsPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public ClearPlaylistContentsUnauthorized withErrors(Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
return false;
}
ClearPlaylistContentsUnauthorized other = (ClearPlaylistContentsUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(ClearPlaylistContentsUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<ClearPlaylistContentsPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public ClearPlaylistContentsUnauthorized build() {
return new ClearPlaylistContentsUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class ClearPlaylistContentsUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* CreatePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* CreatePlaylistBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class CreatePlaylistBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class CreatePlaylistBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<CreatePlaylistErrors>> errors(){
@JsonIgnore
public Optional<List<CreatePlaylistErrors>> errors() {
return (Optional<List<CreatePlaylistErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class CreatePlaylistBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public CreatePlaylistBadRequest withErrors(List<CreatePlaylistErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CreatePlaylistBadRequest withErrors(Optional<? extends List<CreatePlaylistErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class CreatePlaylistBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class CreatePlaylistBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class CreatePlaylistBadRequest extends RuntimeException {
return false;
}
CreatePlaylistBadRequest other = (CreatePlaylistBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CreatePlaylistBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CreatePlaylistErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class CreatePlaylistBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CreatePlaylistErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class CreatePlaylistBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class CreatePlaylistBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public CreatePlaylistBadRequest build() {
return new CreatePlaylistBadRequest(
errors,
@@ -170,3 +177,4 @@ public class CreatePlaylistBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class CreatePlaylistErrors {
public final static Builder builder() {
return new Builder();
}
}
public CreatePlaylistErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class CreatePlaylistErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class CreatePlaylistErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class CreatePlaylistErrors {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class CreatePlaylistPlaylistsErrors {
public final static Builder builder() {
return new Builder();
}
}
public CreatePlaylistPlaylistsErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class CreatePlaylistPlaylistsErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class CreatePlaylistPlaylistsErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class CreatePlaylistPlaylistsErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* CreatePlaylistUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* CreatePlaylistUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class CreatePlaylistUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<CreatePlaylistPlaylistsErrors>> errors(){
@JsonIgnore
public Optional<List<CreatePlaylistPlaylistsErrors>> errors() {
return (Optional<List<CreatePlaylistPlaylistsErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public CreatePlaylistUnauthorized withErrors(List<CreatePlaylistPlaylistsErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public CreatePlaylistUnauthorized withErrors(Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
return false;
}
CreatePlaylistUnauthorized other = (CreatePlaylistUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(CreatePlaylistUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<CreatePlaylistPlaylistsErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public CreatePlaylistUnauthorized build() {
return new CreatePlaylistUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class CreatePlaylistUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* DeleteLibraryBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* DeleteLibraryBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class DeleteLibraryBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class DeleteLibraryBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<DeleteLibraryErrors>> errors(){
@JsonIgnore
public Optional<List<DeleteLibraryErrors>> errors() {
return (Optional<List<DeleteLibraryErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class DeleteLibraryBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public DeleteLibraryBadRequest withErrors(List<DeleteLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeleteLibraryBadRequest withErrors(Optional<? extends List<DeleteLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class DeleteLibraryBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class DeleteLibraryBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class DeleteLibraryBadRequest extends RuntimeException {
return false;
}
DeleteLibraryBadRequest other = (DeleteLibraryBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(DeleteLibraryBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<DeleteLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class DeleteLibraryBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<DeleteLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class DeleteLibraryBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class DeleteLibraryBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public DeleteLibraryBadRequest build() {
return new DeleteLibraryBadRequest(
errors,
@@ -170,3 +177,4 @@ public class DeleteLibraryBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class DeleteLibraryErrors {
public final static Builder builder() {
return new Builder();
}
}
public DeleteLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class DeleteLibraryErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class DeleteLibraryErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class DeleteLibraryErrors {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class DeleteLibraryLibraryErrors {
public final static Builder builder() {
return new Builder();
}
}
public DeleteLibraryLibraryErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class DeleteLibraryLibraryErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class DeleteLibraryLibraryErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class DeleteLibraryLibraryErrors {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* DeleteLibraryUnauthorized - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
* DeleteLibraryUnauthorized
*
* <p>Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
*/
@SuppressWarnings("serial")
public class DeleteLibraryUnauthorized extends RuntimeException {
@@ -49,7 +53,8 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<DeleteLibraryLibraryErrors>> errors(){
@JsonIgnore
public Optional<List<DeleteLibraryLibraryErrors>> errors() {
return (Optional<List<DeleteLibraryLibraryErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public DeleteLibraryUnauthorized withErrors(List<DeleteLibraryLibraryErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeleteLibraryUnauthorized withErrors(Optional<? extends List<DeleteLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
return false;
}
DeleteLibraryUnauthorized other = (DeleteLibraryUnauthorized) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(DeleteLibraryUnauthorized.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<DeleteLibraryLibraryErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<DeleteLibraryLibraryErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public DeleteLibraryUnauthorized build() {
return new DeleteLibraryUnauthorized(
errors,
@@ -170,3 +177,4 @@ public class DeleteLibraryUnauthorized extends RuntimeException {
}
}
}

View File

@@ -1,24 +1,28 @@
/*
* 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.io.InputStream;
import java.lang.Override;
import java.lang.RuntimeException;
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;
/**
* DeletePlaylistBadRequest - Bad Request - A parameter was not specified, or was specified incorrectly.
* DeletePlaylistBadRequest
*
* <p>Bad Request - A parameter was not specified, or was specified incorrectly.
*/
@SuppressWarnings("serial")
public class DeletePlaylistBadRequest extends RuntimeException {
@@ -49,7 +53,8 @@ public class DeletePlaylistBadRequest extends RuntimeException {
}
@SuppressWarnings("unchecked")
public Optional<List<DeletePlaylistErrors>> errors(){
@JsonIgnore
public Optional<List<DeletePlaylistErrors>> errors() {
return (Optional<List<DeletePlaylistErrors>>) errors;
}
@@ -57,20 +62,21 @@ public class DeletePlaylistBadRequest extends RuntimeException {
* Raw HTTP response; suitable for custom response parsing
*/
@SuppressWarnings("unchecked")
public Optional<HttpResponse<InputStream>> rawResponse(){
@JsonIgnore
public Optional<HttpResponse<InputStream>> rawResponse() {
return (Optional<HttpResponse<InputStream>>) rawResponse;
}
public final static Builder builder() {
return new Builder();
}
}
public DeletePlaylistBadRequest withErrors(List<DeletePlaylistErrors> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = Optional.ofNullable(errors);
return this;
}
public DeletePlaylistBadRequest withErrors(Optional<? extends List<DeletePlaylistErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -85,7 +91,7 @@ public class DeletePlaylistBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -95,6 +101,7 @@ public class DeletePlaylistBadRequest extends RuntimeException {
return this;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -104,31 +111,31 @@ public class DeletePlaylistBadRequest extends RuntimeException {
return false;
}
DeletePlaylistBadRequest other = (DeletePlaylistBadRequest) o;
return
return
Objects.deepEquals(this.errors, other.errors) &&
Objects.deepEquals(this.rawResponse, other.rawResponse);
}
@Override
public int hashCode() {
return java.util.Objects.hash(
return Objects.hash(
errors,
rawResponse);
}
@Override
public String toString() {
return Utils.toString(DeletePlaylistBadRequest.class,
"errors", errors,
"rawResponse", rawResponse);
}
public final static class Builder {
private Optional<? extends List<DeletePlaylistErrors>> errors = Optional.empty();
private Optional<? extends HttpResponse<InputStream>> rawResponse;
private Builder() {
// force use of static builder() method
}
@@ -138,7 +145,7 @@ public class DeletePlaylistBadRequest extends RuntimeException {
this.errors = Optional.ofNullable(errors);
return this;
}
public Builder errors(Optional<? extends List<DeletePlaylistErrors>> errors) {
Utils.checkNotNull(errors, "errors");
this.errors = errors;
@@ -153,7 +160,7 @@ public class DeletePlaylistBadRequest extends RuntimeException {
this.rawResponse = Optional.ofNullable(rawResponse);
return this;
}
/**
* Raw HTTP response; suitable for custom response parsing
*/
@@ -162,7 +169,7 @@ public class DeletePlaylistBadRequest extends RuntimeException {
this.rawResponse = rawResponse;
return this;
}
public DeletePlaylistBadRequest build() {
return new DeletePlaylistBadRequest(
errors,
@@ -170,3 +177,4 @@ public class DeletePlaylistBadRequest extends RuntimeException {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class DeletePlaylistErrors {
public final static Builder builder() {
return new Builder();
}
}
public DeletePlaylistErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class DeletePlaylistErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class DeletePlaylistErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class DeletePlaylistErrors {
}
}
}

View File

@@ -1,9 +1,8 @@
/*
* 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;
@@ -64,7 +63,7 @@ public class DeletePlaylistPlaylistsErrors {
public final static Builder builder() {
return new Builder();
}
}
public DeletePlaylistPlaylistsErrors withCode(int code) {
Utils.checkNotNull(code, "code");
@@ -101,6 +100,7 @@ public class DeletePlaylistPlaylistsErrors {
this.status = status;
return this;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -139,7 +139,7 @@ public class DeletePlaylistPlaylistsErrors {
private Optional<String> message = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Optional<Integer> status = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -189,4 +189,3 @@ public class DeletePlaylistPlaylistsErrors {
}
}
}

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