mirror of
https://github.com/LukeHagar/plexphp.git
synced 2025-12-06 04:20:51 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.528.1
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -15,7 +15,7 @@ generation:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
oAuth2PasswordEnabled: false
|
||||
php:
|
||||
version: 0.14.2
|
||||
version: 0.14.3
|
||||
additionalDependencies:
|
||||
autoload: {}
|
||||
autoload-dev: {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.526.6
|
||||
speakeasyVersion: 1.528.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -9,19 +9,19 @@ sources:
|
||||
- main
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
|
||||
sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1743440871
|
||||
- speakeasy-sdk-regen-1743725451
|
||||
targets:
|
||||
plexphp:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
|
||||
sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
|
||||
codeSamplesNamespace: code-samples-php-plexphp
|
||||
codeSamplesRevisionDigest: sha256:3dcf3d6a964ac2772b260e917ed4812bf243c7ab915d00cf61d39f63c5ab5392
|
||||
codeSamplesRevisionDigest: sha256:de28f90452840202074947777b608436c2102f493423853b74d94710ee4630e3
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
@@ -177,7 +177,9 @@ if ($response->object !== null) {
|
||||
* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
|
||||
* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
|
||||
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
|
||||
* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||
* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||
* [getRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
|
||||
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||
@@ -185,6 +187,8 @@ if ($response->object !== null) {
|
||||
* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
|
||||
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||
* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||
* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||
|
||||
### [log](docs/sdks/log/README.md)
|
||||
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -823,3 +823,13 @@ Based on:
|
||||
- [php v0.14.2] .
|
||||
### Releases
|
||||
- [Composer v0.14.2] https://packagist.org/packages/lukehagar/plex-api#v0.14.2 - .
|
||||
|
||||
## 2025-04-04 00:10:34
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [php v0.14.3] .
|
||||
### Releases
|
||||
- [Composer v0.14.3] https://packagist.org/packages/lukehagar/plex-api#v0.14.3 - .
|
||||
114
codeSamples.yaml
114
codeSamples.yaml
@@ -807,6 +807,63 @@ actions:
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: php
|
||||
label: PlexPHP
|
||||
source: |-
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->getMediaArts(
|
||||
ratingKey: 16099
|
||||
);
|
||||
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/arts"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: php
|
||||
label: PlexPHP
|
||||
source: |-
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->postMediaArts(
|
||||
ratingKey: 2268,
|
||||
url: 'https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b',
|
||||
requestBody: '0xee51EFC6De'
|
||||
|
||||
);
|
||||
|
||||
if ($response->statusCode === 200) {
|
||||
// handle response
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
@@ -871,6 +928,63 @@ actions:
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: php
|
||||
label: PlexPHP
|
||||
source: |-
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->getMediaPosters(
|
||||
ratingKey: 16099
|
||||
);
|
||||
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/posters"]["post"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: php
|
||||
label: PlexPHP
|
||||
source: |-
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->postMediaPoster(
|
||||
ratingKey: 2268,
|
||||
url: 'https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b',
|
||||
requestBody: '0x7C3d45ad4B'
|
||||
|
||||
);
|
||||
|
||||
if ($response->statusCode === 200) {
|
||||
// handle response
|
||||
}
|
||||
- target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
|
||||
update:
|
||||
x-codeSamples:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"brick/math": "^0.12.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.18.1",
|
||||
"laravel/pint": "^1.21.2",
|
||||
"phpstan/phpstan": "^2.1.0",
|
||||
"phpunit/phpunit": "^10",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
|
||||
12
docs/Models/Operations/GetMediaArtsMediaContainer.md
Normal file
12
docs/Models/Operations/GetMediaArtsMediaContainer.md
Normal 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` | *int* | :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` | array<[Operations\GetMediaArtsMetadata](../../Models/Operations/GetMediaArtsMetadata.md)> | :heavy_check_mark: | N/A | |
|
||||
12
docs/Models/Operations/GetMediaArtsMetadata.md
Normal file
12
docs/Models/Operations/GetMediaArtsMetadata.md
Normal 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 |
|
||||
| `ratingKey` | *string* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||
| `selected` | *bool* | :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 |
|
||||
| `provider` | *?string* | :heavy_minus_sign: | The provider of the artwork. | tmdb |
|
||||
8
docs/Models/Operations/GetMediaArtsRequest.md
Normal file
8
docs/Models/Operations/GetMediaArtsRequest.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetMediaArtsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||
11
docs/Models/Operations/GetMediaArtsResponse.md
Normal file
11
docs/Models/Operations/GetMediaArtsResponse.md
Normal 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` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `object` | [?Operations\GetMediaArtsResponseBody](../../Models/Operations/GetMediaArtsResponseBody.md) | :heavy_minus_sign: | The available background artwork for the library item. |
|
||||
10
docs/Models/Operations/GetMediaArtsResponseBody.md
Normal file
10
docs/Models/Operations/GetMediaArtsResponseBody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetMediaArtsResponseBody
|
||||
|
||||
The available background artwork for the library item.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [?Operations\GetMediaArtsMediaContainer](../../Models/Operations/GetMediaArtsMediaContainer.md) | :heavy_minus_sign: | N/A |
|
||||
12
docs/Models/Operations/GetMediaPostersMediaContainer.md
Normal file
12
docs/Models/Operations/GetMediaPostersMediaContainer.md
Normal 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` | *int* | :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` | array<[Operations\GetMediaPostersMetadata](../../Models/Operations/GetMediaPostersMetadata.md)> | :heavy_check_mark: | N/A | |
|
||||
12
docs/Models/Operations/GetMediaPostersMetadata.md
Normal file
12
docs/Models/Operations/GetMediaPostersMetadata.md
Normal 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 |
|
||||
| `ratingKey` | *string* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||
| `selected` | *bool* | :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 |
|
||||
| `provider` | *?string* | :heavy_minus_sign: | The provider of the poster. | tmdb |
|
||||
8
docs/Models/Operations/GetMediaPostersRequest.md
Normal file
8
docs/Models/Operations/GetMediaPostersRequest.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# GetMediaPostersRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||
11
docs/Models/Operations/GetMediaPostersResponse.md
Normal file
11
docs/Models/Operations/GetMediaPostersResponse.md
Normal 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` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
| `object` | [?Operations\GetMediaPostersResponseBody](../../Models/Operations/GetMediaPostersResponseBody.md) | :heavy_minus_sign: | The available posters for the library item. |
|
||||
10
docs/Models/Operations/GetMediaPostersResponseBody.md
Normal file
10
docs/Models/Operations/GetMediaPostersResponseBody.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# GetMediaPostersResponseBody
|
||||
|
||||
The available posters for the library item.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [?Operations\GetMediaPostersMediaContainer](../../Models/Operations/GetMediaPostersMediaContainer.md) | :heavy_minus_sign: | N/A |
|
||||
10
docs/Models/Operations/PostMediaArtsRequest.md
Normal file
10
docs/Models/Operations/PostMediaArtsRequest.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# PostMediaArtsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||
| `url` | *?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` | *?string* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
10
docs/Models/Operations/PostMediaArtsResponse.md
Normal file
10
docs/Models/Operations/PostMediaArtsResponse.md
Normal 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` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
10
docs/Models/Operations/PostMediaPosterRequest.md
Normal file
10
docs/Models/Operations/PostMediaPosterRequest.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# PostMediaPosterRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||
| `url` | *?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` | *?string* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
10
docs/Models/Operations/PostMediaPosterResponse.md
Normal file
10
docs/Models/Operations/PostMediaPosterResponse.md
Normal 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` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||
@@ -16,7 +16,9 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media
|
||||
* [getLibraryDetails](#getlibrarydetails) - Get Library Details
|
||||
* [getLibraryItems](#getlibraryitems) - Get Library Items
|
||||
* [getMediaArts](#getmediaarts) - Get Media Background Artwork
|
||||
* [getMediaMetaData](#getmediametadata) - Get Media Metadata
|
||||
* [getMediaPosters](#getmediaposters) - Get Media Posters
|
||||
* [getRecentlyAddedLibrary](#getrecentlyaddedlibrary) - Get Recently Added
|
||||
* [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
|
||||
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
||||
@@ -24,6 +26,8 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [getFileHash](#getfilehash) - Get Hash Value
|
||||
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
|
||||
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
||||
* [postMediaArts](#postmediaarts) - Upload Media Background Artwork
|
||||
* [postMediaPoster](#postmediaposter) - Upload Media Poster
|
||||
|
||||
## deleteLibrary
|
||||
|
||||
@@ -498,6 +502,52 @@ if ($response->object !== null) {
|
||||
| Errors\GetLibraryItemsUnauthorized | 401 | application/json |
|
||||
| Errors\SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getMediaArts
|
||||
|
||||
Returns the background artwork for a library item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->getMediaArts(
|
||||
ratingKey: 16099
|
||||
);
|
||||
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\GetMediaArtsResponse](../../Models/Operations/GetMediaArtsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------- | ------------------- | ------------------- |
|
||||
| Errors\SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getMediaMetaData
|
||||
|
||||
This endpoint will return all the (meta)data of a library item specified with by the ratingKey.
|
||||
@@ -563,6 +613,52 @@ if ($response->object !== null) {
|
||||
| Errors\GetMediaMetaDataUnauthorized | 401 | application/json |
|
||||
| Errors\SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getMediaPosters
|
||||
|
||||
Returns the available posters for a library item.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->getMediaPosters(
|
||||
ratingKey: 16099
|
||||
);
|
||||
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\GetMediaPostersResponse](../../Models/Operations/GetMediaPostersResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------- | ------------------- | ------------------- |
|
||||
| Errors\SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## getRecentlyAddedLibrary
|
||||
|
||||
This endpoint will return the recently added content.
|
||||
@@ -965,3 +1061,105 @@ if ($response->object !== null) {
|
||||
| Errors\GetTopWatchedContentBadRequest | 400 | application/json |
|
||||
| Errors\GetTopWatchedContentUnauthorized | 401 | application/json |
|
||||
| Errors\SDKException | 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
|
||||
|
||||
```php
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->postMediaArts(
|
||||
ratingKey: 2268,
|
||||
url: 'https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b',
|
||||
requestBody: '0xee51EFC6De'
|
||||
|
||||
);
|
||||
|
||||
if ($response->statusCode === 200) {
|
||||
// handle response
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||
| `url` | *?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` | *?string* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\PostMediaArtsResponse](../../Models/Operations/PostMediaArtsResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------- | ------------------- | ------------------- |
|
||||
| Errors\SDKException | 4XX, 5XX | \*/\* |
|
||||
|
||||
## postMediaPoster
|
||||
|
||||
Uploads a poster to a library item, either from a local file or a remote URL
|
||||
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity(
|
||||
'<YOUR_API_KEY_HERE>'
|
||||
)
|
||||
->build();
|
||||
|
||||
|
||||
|
||||
$response = $sdk->library->postMediaPoster(
|
||||
ratingKey: 2268,
|
||||
url: 'https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b',
|
||||
requestBody: '0x7C3d45ad4B'
|
||||
|
||||
);
|
||||
|
||||
if ($response->statusCode === 200) {
|
||||
// handle response
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `ratingKey` | *int* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||
| `url` | *?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` | *?string* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\PostMediaPosterResponse](../../Models/Operations/PostMediaPosterResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Type | Status Code | Content Type |
|
||||
| ------------------- | ------------------- | ------------------- |
|
||||
| Errors\SDKException | 4XX, 5XX | \*/\* |
|
||||
260
src/Library.php
260
src/Library.php
@@ -825,6 +825,70 @@ class Library
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Media Background Artwork
|
||||
*
|
||||
* Returns the background artwork for a library item.
|
||||
*
|
||||
* @param int $ratingKey
|
||||
* @return Operations\GetMediaArtsResponse
|
||||
* @throws \LukeHagar\Plex_API\Models\Errors\SDKException
|
||||
*/
|
||||
public function getMediaArts(int $ratingKey, ?Options $options = null): Operations\GetMediaArtsResponse
|
||||
{
|
||||
$request = new Operations\GetMediaArtsRequest(
|
||||
ratingKey: $ratingKey,
|
||||
);
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}/arts', Operations\GetMediaArtsRequest::class, $request);
|
||||
$urlOverride = null;
|
||||
$httpOptions = ['http_errors' => false];
|
||||
$httpOptions['headers']['Accept'] = 'application/json';
|
||||
$httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
$httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url);
|
||||
$hookContext = new HookContext($baseUrl, 'get-media-arts', [], $this->sdkConfiguration->securitySource);
|
||||
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
|
||||
$httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions);
|
||||
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
|
||||
try {
|
||||
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions);
|
||||
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';
|
||||
|
||||
$statusCode = $httpResponse->getStatusCode();
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX', '5XX'])) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) {
|
||||
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
|
||||
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);
|
||||
|
||||
$serializer = Utils\JSON::createSerializer();
|
||||
$responseData = (string) $httpResponse->getBody();
|
||||
$obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Operations\GetMediaArtsResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
|
||||
$response = new Operations\GetMediaArtsResponse(
|
||||
statusCode: $statusCode,
|
||||
contentType: $contentType,
|
||||
rawResponse: $httpResponse,
|
||||
object: $obj);
|
||||
|
||||
return $response;
|
||||
} else {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
}
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} else {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Media Metadata
|
||||
*
|
||||
@@ -914,6 +978,70 @@ class Library
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Media Posters
|
||||
*
|
||||
* Returns the available posters for a library item.
|
||||
*
|
||||
* @param int $ratingKey
|
||||
* @return Operations\GetMediaPostersResponse
|
||||
* @throws \LukeHagar\Plex_API\Models\Errors\SDKException
|
||||
*/
|
||||
public function getMediaPosters(int $ratingKey, ?Options $options = null): Operations\GetMediaPostersResponse
|
||||
{
|
||||
$request = new Operations\GetMediaPostersRequest(
|
||||
ratingKey: $ratingKey,
|
||||
);
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}/posters', Operations\GetMediaPostersRequest::class, $request);
|
||||
$urlOverride = null;
|
||||
$httpOptions = ['http_errors' => false];
|
||||
$httpOptions['headers']['Accept'] = 'application/json';
|
||||
$httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
$httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url);
|
||||
$hookContext = new HookContext($baseUrl, 'get-media-posters', [], $this->sdkConfiguration->securitySource);
|
||||
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
|
||||
$httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions);
|
||||
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
|
||||
try {
|
||||
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions);
|
||||
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';
|
||||
|
||||
$statusCode = $httpResponse->getStatusCode();
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX', '5XX'])) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) {
|
||||
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
|
||||
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);
|
||||
|
||||
$serializer = Utils\JSON::createSerializer();
|
||||
$responseData = (string) $httpResponse->getBody();
|
||||
$obj = $serializer->deserialize($responseData, '\LukeHagar\Plex_API\Models\Operations\GetMediaPostersResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true));
|
||||
$response = new Operations\GetMediaPostersResponse(
|
||||
statusCode: $statusCode,
|
||||
contentType: $contentType,
|
||||
rawResponse: $httpResponse,
|
||||
object: $obj);
|
||||
|
||||
return $response;
|
||||
} else {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
}
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} else {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Recently Added
|
||||
*
|
||||
@@ -1564,4 +1692,136 @@ class Library
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Media Background Artwork
|
||||
*
|
||||
* Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||
*
|
||||
* @param int $ratingKey
|
||||
* @param ?string $requestBody
|
||||
* @param ?string $url
|
||||
* @return Operations\PostMediaArtsResponse
|
||||
* @throws \LukeHagar\Plex_API\Models\Errors\SDKException
|
||||
*/
|
||||
public function postMediaArts(int $ratingKey, ?string $requestBody = null, ?string $url = null, ?Options $options = null): Operations\PostMediaArtsResponse
|
||||
{
|
||||
$request = new Operations\PostMediaArtsRequest(
|
||||
ratingKey: $ratingKey,
|
||||
url: $url,
|
||||
requestBody: $requestBody,
|
||||
);
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}/arts', Operations\PostMediaArtsRequest::class, $request);
|
||||
$urlOverride = null;
|
||||
$httpOptions = ['http_errors' => false];
|
||||
$body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'raw');
|
||||
if ($body !== null) {
|
||||
$httpOptions = array_merge_recursive($httpOptions, $body);
|
||||
}
|
||||
|
||||
$qp = Utils\Utils::getQueryParams(Operations\PostMediaArtsRequest::class, $request, $urlOverride);
|
||||
$httpOptions['headers']['Accept'] = '*/*';
|
||||
$httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
$httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url);
|
||||
$hookContext = new HookContext($baseUrl, 'post-media-arts', [], $this->sdkConfiguration->securitySource);
|
||||
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
|
||||
$httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp);
|
||||
$httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions);
|
||||
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
|
||||
try {
|
||||
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions);
|
||||
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';
|
||||
|
||||
$statusCode = $httpResponse->getStatusCode();
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX', '5XX'])) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) {
|
||||
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);
|
||||
|
||||
return new Operations\PostMediaArtsResponse(
|
||||
statusCode: $statusCode,
|
||||
contentType: $contentType,
|
||||
rawResponse: $httpResponse
|
||||
);
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} else {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Media Poster
|
||||
*
|
||||
* Uploads a poster to a library item, either from a local file or a remote URL
|
||||
*
|
||||
* @param int $ratingKey
|
||||
* @param ?string $requestBody
|
||||
* @param ?string $url
|
||||
* @return Operations\PostMediaPosterResponse
|
||||
* @throws \LukeHagar\Plex_API\Models\Errors\SDKException
|
||||
*/
|
||||
public function postMediaPoster(int $ratingKey, ?string $requestBody = null, ?string $url = null, ?Options $options = null): Operations\PostMediaPosterResponse
|
||||
{
|
||||
$request = new Operations\PostMediaPosterRequest(
|
||||
ratingKey: $ratingKey,
|
||||
url: $url,
|
||||
requestBody: $requestBody,
|
||||
);
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}/posters', Operations\PostMediaPosterRequest::class, $request);
|
||||
$urlOverride = null;
|
||||
$httpOptions = ['http_errors' => false];
|
||||
$body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'raw');
|
||||
if ($body !== null) {
|
||||
$httpOptions = array_merge_recursive($httpOptions, $body);
|
||||
}
|
||||
|
||||
$qp = Utils\Utils::getQueryParams(Operations\PostMediaPosterRequest::class, $request, $urlOverride);
|
||||
$httpOptions['headers']['Accept'] = '*/*';
|
||||
$httpOptions['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
$httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url);
|
||||
$hookContext = new HookContext($baseUrl, 'post-media-poster', [], $this->sdkConfiguration->securitySource);
|
||||
$httpRequest = $this->sdkConfiguration->hooks->beforeRequest(new Hooks\BeforeRequestContext($hookContext), $httpRequest);
|
||||
$httpOptions['query'] = Utils\QueryParameters::standardizeQueryParams($httpRequest, $qp);
|
||||
$httpOptions = Utils\Utils::convertHeadersToOptions($httpRequest, $httpOptions);
|
||||
$httpRequest = Utils\Utils::removeHeaders($httpRequest);
|
||||
try {
|
||||
$httpResponse = $this->sdkConfiguration->client->send($httpRequest, $httpOptions);
|
||||
} catch (\GuzzleHttp\Exception\GuzzleException $error) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), null, $error);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';
|
||||
|
||||
$statusCode = $httpResponse->getStatusCode();
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX', '5XX'])) {
|
||||
$res = $this->sdkConfiguration->hooks->afterError(new Hooks\AfterErrorContext($hookContext), $httpResponse, null);
|
||||
$httpResponse = $res;
|
||||
}
|
||||
if (Utils\Utils::matchStatusCodes($statusCode, ['200'])) {
|
||||
$httpResponse = $this->sdkConfiguration->hooks->afterSuccess(new Hooks\AfterSuccessContext($hookContext), $httpResponse);
|
||||
|
||||
return new Operations\PostMediaPosterResponse(
|
||||
statusCode: $statusCode,
|
||||
contentType: $contentType,
|
||||
rawResponse: $httpResponse
|
||||
);
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['404', '4XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} elseif (Utils\Utils::matchStatusCodes($statusCode, ['5XX'])) {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
} else {
|
||||
throw new \LukeHagar\Plex_API\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
71
src/Models/Operations/GetMediaArtsMediaContainer.php
Normal file
71
src/Models/Operations/GetMediaArtsMediaContainer.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class GetMediaArtsMediaContainer
|
||||
{
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*
|
||||
* @var int $size
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('size')]
|
||||
public int $size;
|
||||
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*
|
||||
* @var int $mediaTagVersion
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('mediaTagVersion')]
|
||||
public int $mediaTagVersion;
|
||||
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*
|
||||
* @var string $mediaTagPrefix
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('mediaTagPrefix')]
|
||||
public string $mediaTagPrefix;
|
||||
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*
|
||||
* @var string $identifier
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('identifier')]
|
||||
public string $identifier;
|
||||
|
||||
/**
|
||||
* $metadata
|
||||
*
|
||||
* @var array<GetMediaArtsMetadata> $metadata
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('Metadata')]
|
||||
#[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Operations\GetMediaArtsMetadata>')]
|
||||
public array $metadata;
|
||||
|
||||
/**
|
||||
* @param int $size
|
||||
* @param int $mediaTagVersion
|
||||
* @param string $mediaTagPrefix
|
||||
* @param string $identifier
|
||||
* @param array<GetMediaArtsMetadata> $metadata
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(int $size, int $mediaTagVersion, string $mediaTagPrefix, string $identifier, array $metadata)
|
||||
{
|
||||
$this->size = $size;
|
||||
$this->mediaTagVersion = $mediaTagVersion;
|
||||
$this->mediaTagPrefix = $mediaTagPrefix;
|
||||
$this->identifier = $identifier;
|
||||
$this->metadata = $metadata;
|
||||
}
|
||||
}
|
||||
71
src/Models/Operations/GetMediaArtsMetadata.php
Normal file
71
src/Models/Operations/GetMediaArtsMetadata.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class GetMediaArtsMetadata
|
||||
{
|
||||
/**
|
||||
* The URL of the artwork.
|
||||
*
|
||||
* @var string $key
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('key')]
|
||||
public string $key;
|
||||
|
||||
/**
|
||||
* The URL of the artwork.
|
||||
*
|
||||
* @var string $ratingKey
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('ratingKey')]
|
||||
public string $ratingKey;
|
||||
|
||||
/**
|
||||
* Whether this is the selected artwork.
|
||||
*
|
||||
* @var bool $selected
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('selected')]
|
||||
public bool $selected;
|
||||
|
||||
/**
|
||||
* The URL of the artwork thumbnail.
|
||||
*
|
||||
* @var string $thumb
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('thumb')]
|
||||
public string $thumb;
|
||||
|
||||
/**
|
||||
* The provider of the artwork.
|
||||
*
|
||||
* @var ?string $provider
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('provider')]
|
||||
#[\Speakeasy\Serializer\Annotation\SkipWhenNull]
|
||||
public ?string $provider = null;
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param string $ratingKey
|
||||
* @param bool $selected
|
||||
* @param string $thumb
|
||||
* @param ?string $provider
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(string $key, string $ratingKey, bool $selected, string $thumb, ?string $provider = null)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->ratingKey = $ratingKey;
|
||||
$this->selected = $selected;
|
||||
$this->thumb = $thumb;
|
||||
$this->provider = $provider;
|
||||
}
|
||||
}
|
||||
30
src/Models/Operations/GetMediaArtsRequest.php
Normal file
30
src/Models/Operations/GetMediaArtsRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
use LukeHagar\Plex_API\Utils\SpeakeasyMetadata;
|
||||
class GetMediaArtsRequest
|
||||
{
|
||||
/**
|
||||
* the id of the library item to return the artwork of.
|
||||
*
|
||||
* @var int $ratingKey
|
||||
*/
|
||||
#[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=ratingKey')]
|
||||
public int $ratingKey;
|
||||
|
||||
/**
|
||||
* @param int $ratingKey
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(int $ratingKey)
|
||||
{
|
||||
$this->ratingKey = $ratingKey;
|
||||
}
|
||||
}
|
||||
56
src/Models/Operations/GetMediaArtsResponse.php
Normal file
56
src/Models/Operations/GetMediaArtsResponse.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class GetMediaArtsResponse
|
||||
{
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*
|
||||
* @var string $contentType
|
||||
*/
|
||||
public string $contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*
|
||||
* @var int $statusCode
|
||||
*/
|
||||
public int $statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*
|
||||
* @var \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
*/
|
||||
public \Psr\Http\Message\ResponseInterface $rawResponse;
|
||||
|
||||
/**
|
||||
* The available background artwork for the library item.
|
||||
*
|
||||
* @var ?GetMediaArtsResponseBody $object
|
||||
*/
|
||||
public ?GetMediaArtsResponseBody $object = null;
|
||||
|
||||
/**
|
||||
* @param string $contentType
|
||||
* @param int $statusCode
|
||||
* @param \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
* @param ?GetMediaArtsResponseBody $object
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetMediaArtsResponseBody $object = null)
|
||||
{
|
||||
$this->contentType = $contentType;
|
||||
$this->statusCode = $statusCode;
|
||||
$this->rawResponse = $rawResponse;
|
||||
$this->object = $object;
|
||||
}
|
||||
}
|
||||
32
src/Models/Operations/GetMediaArtsResponseBody.php
Normal file
32
src/Models/Operations/GetMediaArtsResponseBody.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
/** GetMediaArtsResponseBody - The available background artwork for the library item. */
|
||||
class GetMediaArtsResponseBody
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var ?GetMediaArtsMediaContainer $mediaContainer
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('MediaContainer')]
|
||||
#[\Speakeasy\Serializer\Annotation\Type('\LukeHagar\Plex_API\Models\Operations\GetMediaArtsMediaContainer|null')]
|
||||
#[\Speakeasy\Serializer\Annotation\SkipWhenNull]
|
||||
public ?GetMediaArtsMediaContainer $mediaContainer = null;
|
||||
|
||||
/**
|
||||
* @param ?GetMediaArtsMediaContainer $mediaContainer
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(?GetMediaArtsMediaContainer $mediaContainer = null)
|
||||
{
|
||||
$this->mediaContainer = $mediaContainer;
|
||||
}
|
||||
}
|
||||
71
src/Models/Operations/GetMediaPostersMediaContainer.php
Normal file
71
src/Models/Operations/GetMediaPostersMediaContainer.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class GetMediaPostersMediaContainer
|
||||
{
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*
|
||||
* @var int $size
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('size')]
|
||||
public int $size;
|
||||
|
||||
/**
|
||||
* The version number for media tags.
|
||||
*
|
||||
* @var int $mediaTagVersion
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('mediaTagVersion')]
|
||||
public int $mediaTagVersion;
|
||||
|
||||
/**
|
||||
* The prefix used for media tag resource paths.
|
||||
*
|
||||
* @var string $mediaTagPrefix
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('mediaTagPrefix')]
|
||||
public string $mediaTagPrefix;
|
||||
|
||||
/**
|
||||
* An plugin identifier for the media container.
|
||||
*
|
||||
* @var string $identifier
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('identifier')]
|
||||
public string $identifier;
|
||||
|
||||
/**
|
||||
* $metadata
|
||||
*
|
||||
* @var array<GetMediaPostersMetadata> $metadata
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('Metadata')]
|
||||
#[\Speakeasy\Serializer\Annotation\Type('array<\LukeHagar\Plex_API\Models\Operations\GetMediaPostersMetadata>')]
|
||||
public array $metadata;
|
||||
|
||||
/**
|
||||
* @param int $size
|
||||
* @param int $mediaTagVersion
|
||||
* @param string $mediaTagPrefix
|
||||
* @param string $identifier
|
||||
* @param array<GetMediaPostersMetadata> $metadata
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(int $size, int $mediaTagVersion, string $mediaTagPrefix, string $identifier, array $metadata)
|
||||
{
|
||||
$this->size = $size;
|
||||
$this->mediaTagVersion = $mediaTagVersion;
|
||||
$this->mediaTagPrefix = $mediaTagPrefix;
|
||||
$this->identifier = $identifier;
|
||||
$this->metadata = $metadata;
|
||||
}
|
||||
}
|
||||
71
src/Models/Operations/GetMediaPostersMetadata.php
Normal file
71
src/Models/Operations/GetMediaPostersMetadata.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class GetMediaPostersMetadata
|
||||
{
|
||||
/**
|
||||
* The URL of the poster.
|
||||
*
|
||||
* @var string $key
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('key')]
|
||||
public string $key;
|
||||
|
||||
/**
|
||||
* The URL of the poster.
|
||||
*
|
||||
* @var string $ratingKey
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('ratingKey')]
|
||||
public string $ratingKey;
|
||||
|
||||
/**
|
||||
* Whether this is the selected poster.
|
||||
*
|
||||
* @var bool $selected
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('selected')]
|
||||
public bool $selected;
|
||||
|
||||
/**
|
||||
* The URL of the poster thumbnail.
|
||||
*
|
||||
* @var string $thumb
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('thumb')]
|
||||
public string $thumb;
|
||||
|
||||
/**
|
||||
* The provider of the poster.
|
||||
*
|
||||
* @var ?string $provider
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('provider')]
|
||||
#[\Speakeasy\Serializer\Annotation\SkipWhenNull]
|
||||
public ?string $provider = null;
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param string $ratingKey
|
||||
* @param bool $selected
|
||||
* @param string $thumb
|
||||
* @param ?string $provider
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(string $key, string $ratingKey, bool $selected, string $thumb, ?string $provider = null)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->ratingKey = $ratingKey;
|
||||
$this->selected = $selected;
|
||||
$this->thumb = $thumb;
|
||||
$this->provider = $provider;
|
||||
}
|
||||
}
|
||||
30
src/Models/Operations/GetMediaPostersRequest.php
Normal file
30
src/Models/Operations/GetMediaPostersRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
use LukeHagar\Plex_API\Utils\SpeakeasyMetadata;
|
||||
class GetMediaPostersRequest
|
||||
{
|
||||
/**
|
||||
* the id of the library item to return the posters of.
|
||||
*
|
||||
* @var int $ratingKey
|
||||
*/
|
||||
#[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=ratingKey')]
|
||||
public int $ratingKey;
|
||||
|
||||
/**
|
||||
* @param int $ratingKey
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(int $ratingKey)
|
||||
{
|
||||
$this->ratingKey = $ratingKey;
|
||||
}
|
||||
}
|
||||
56
src/Models/Operations/GetMediaPostersResponse.php
Normal file
56
src/Models/Operations/GetMediaPostersResponse.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class GetMediaPostersResponse
|
||||
{
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*
|
||||
* @var string $contentType
|
||||
*/
|
||||
public string $contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*
|
||||
* @var int $statusCode
|
||||
*/
|
||||
public int $statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*
|
||||
* @var \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
*/
|
||||
public \Psr\Http\Message\ResponseInterface $rawResponse;
|
||||
|
||||
/**
|
||||
* The available posters for the library item.
|
||||
*
|
||||
* @var ?GetMediaPostersResponseBody $object
|
||||
*/
|
||||
public ?GetMediaPostersResponseBody $object = null;
|
||||
|
||||
/**
|
||||
* @param string $contentType
|
||||
* @param int $statusCode
|
||||
* @param \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
* @param ?GetMediaPostersResponseBody $object
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?GetMediaPostersResponseBody $object = null)
|
||||
{
|
||||
$this->contentType = $contentType;
|
||||
$this->statusCode = $statusCode;
|
||||
$this->rawResponse = $rawResponse;
|
||||
$this->object = $object;
|
||||
}
|
||||
}
|
||||
32
src/Models/Operations/GetMediaPostersResponseBody.php
Normal file
32
src/Models/Operations/GetMediaPostersResponseBody.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
/** GetMediaPostersResponseBody - The available posters for the library item. */
|
||||
class GetMediaPostersResponseBody
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var ?GetMediaPostersMediaContainer $mediaContainer
|
||||
*/
|
||||
#[\Speakeasy\Serializer\Annotation\SerializedName('MediaContainer')]
|
||||
#[\Speakeasy\Serializer\Annotation\Type('\LukeHagar\Plex_API\Models\Operations\GetMediaPostersMediaContainer|null')]
|
||||
#[\Speakeasy\Serializer\Annotation\SkipWhenNull]
|
||||
public ?GetMediaPostersMediaContainer $mediaContainer = null;
|
||||
|
||||
/**
|
||||
* @param ?GetMediaPostersMediaContainer $mediaContainer
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(?GetMediaPostersMediaContainer $mediaContainer = null)
|
||||
{
|
||||
$this->mediaContainer = $mediaContainer;
|
||||
}
|
||||
}
|
||||
50
src/Models/Operations/PostMediaArtsRequest.php
Normal file
50
src/Models/Operations/PostMediaArtsRequest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
use LukeHagar\Plex_API\Utils\SpeakeasyMetadata;
|
||||
class PostMediaArtsRequest
|
||||
{
|
||||
/**
|
||||
* the id of the library item to return the posters of.
|
||||
*
|
||||
* @var int $ratingKey
|
||||
*/
|
||||
#[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=ratingKey')]
|
||||
public int $ratingKey;
|
||||
|
||||
/**
|
||||
* The URL of the image, if uploading a remote image
|
||||
*
|
||||
* @var ?string $url
|
||||
*/
|
||||
#[SpeakeasyMetadata('queryParam:style=form,explode=true,name=url')]
|
||||
public ?string $url = null;
|
||||
|
||||
/**
|
||||
* The contents of the image, if uploading a local file
|
||||
*
|
||||
* @var ?string $requestBody
|
||||
*/
|
||||
#[SpeakeasyMetadata('request:mediaType=image/*')]
|
||||
public ?string $requestBody = null;
|
||||
|
||||
/**
|
||||
* @param int $ratingKey
|
||||
* @param ?string $url
|
||||
* @param ?string $requestBody
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(int $ratingKey, ?string $url = null, ?string $requestBody = null)
|
||||
{
|
||||
$this->ratingKey = $ratingKey;
|
||||
$this->url = $url;
|
||||
$this->requestBody = $requestBody;
|
||||
}
|
||||
}
|
||||
47
src/Models/Operations/PostMediaArtsResponse.php
Normal file
47
src/Models/Operations/PostMediaArtsResponse.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class PostMediaArtsResponse
|
||||
{
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*
|
||||
* @var string $contentType
|
||||
*/
|
||||
public string $contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*
|
||||
* @var int $statusCode
|
||||
*/
|
||||
public int $statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*
|
||||
* @var \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
*/
|
||||
public \Psr\Http\Message\ResponseInterface $rawResponse;
|
||||
|
||||
/**
|
||||
* @param string $contentType
|
||||
* @param int $statusCode
|
||||
* @param \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse)
|
||||
{
|
||||
$this->contentType = $contentType;
|
||||
$this->statusCode = $statusCode;
|
||||
$this->rawResponse = $rawResponse;
|
||||
}
|
||||
}
|
||||
50
src/Models/Operations/PostMediaPosterRequest.php
Normal file
50
src/Models/Operations/PostMediaPosterRequest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
use LukeHagar\Plex_API\Utils\SpeakeasyMetadata;
|
||||
class PostMediaPosterRequest
|
||||
{
|
||||
/**
|
||||
* the id of the library item to return the posters of.
|
||||
*
|
||||
* @var int $ratingKey
|
||||
*/
|
||||
#[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=ratingKey')]
|
||||
public int $ratingKey;
|
||||
|
||||
/**
|
||||
* The URL of the image, if uploading a remote image
|
||||
*
|
||||
* @var ?string $url
|
||||
*/
|
||||
#[SpeakeasyMetadata('queryParam:style=form,explode=true,name=url')]
|
||||
public ?string $url = null;
|
||||
|
||||
/**
|
||||
* The contents of the image, if uploading a local file
|
||||
*
|
||||
* @var ?string $requestBody
|
||||
*/
|
||||
#[SpeakeasyMetadata('request:mediaType=image/*')]
|
||||
public ?string $requestBody = null;
|
||||
|
||||
/**
|
||||
* @param int $ratingKey
|
||||
* @param ?string $url
|
||||
* @param ?string $requestBody
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(int $ratingKey, ?string $url = null, ?string $requestBody = null)
|
||||
{
|
||||
$this->ratingKey = $ratingKey;
|
||||
$this->url = $url;
|
||||
$this->requestBody = $requestBody;
|
||||
}
|
||||
}
|
||||
47
src/Models/Operations/PostMediaPosterResponse.php
Normal file
47
src/Models/Operations/PostMediaPosterResponse.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
|
||||
class PostMediaPosterResponse
|
||||
{
|
||||
/**
|
||||
* HTTP response content type for this operation
|
||||
*
|
||||
* @var string $contentType
|
||||
*/
|
||||
public string $contentType;
|
||||
|
||||
/**
|
||||
* HTTP response status code for this operation
|
||||
*
|
||||
* @var int $statusCode
|
||||
*/
|
||||
public int $statusCode;
|
||||
|
||||
/**
|
||||
* Raw HTTP response; suitable for custom response parsing
|
||||
*
|
||||
* @var \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
*/
|
||||
public \Psr\Http\Message\ResponseInterface $rawResponse;
|
||||
|
||||
/**
|
||||
* @param string $contentType
|
||||
* @param int $statusCode
|
||||
* @param \Psr\Http\Message\ResponseInterface $rawResponse
|
||||
* @phpstan-pure
|
||||
*/
|
||||
public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse)
|
||||
{
|
||||
$this->contentType = $contentType;
|
||||
$this->statusCode = $statusCode;
|
||||
$this->rawResponse = $rawResponse;
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,11 @@ class SDKConfiguration
|
||||
|
||||
public string $openapiDocVersion = '0.0.3';
|
||||
|
||||
public string $sdkVersion = '0.14.2';
|
||||
public string $sdkVersion = '0.14.3';
|
||||
|
||||
public string $genVersion = '2.563.1';
|
||||
public string $genVersion = '2.565.1';
|
||||
|
||||
public string $userAgent = 'speakeasy-sdk/php 0.14.2 2.563.1 0.0.3 lukehagar/plex-api';
|
||||
public string $userAgent = 'speakeasy-sdk/php 0.14.3 2.565.1 0.0.3 lukehagar/plex-api';
|
||||
|
||||
public ?RetryConfig $retryConfig = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user