ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.528.1

This commit is contained in:
speakeasybot
2025-04-04 00:12:23 +00:00
parent 3214d399de
commit eda0eaa60d
38 changed files with 1525 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,7 @@ generation:
oAuth2ClientCredentialsEnabled: false oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false oAuth2PasswordEnabled: false
php: php:
version: 0.14.2 version: 0.14.3
additionalDependencies: additionalDependencies:
autoload: {} autoload: {}
autoload-dev: {} autoload-dev: {}

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.526.6 speakeasyVersion: 1.528.1
sources: sources:
my-source: my-source:
sourceNamespace: my-source sourceNamespace: my-source
@@ -9,19 +9,19 @@ sources:
- main - main
plexapi: plexapi:
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351 sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1743440871 - speakeasy-sdk-regen-1743725451
targets: targets:
plexphp: plexphp:
source: plexapi source: plexapi
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf sourceRevisionDigest: sha256:b5580df6ec4a386e12249ff13f35b916fe5559e101de4a816b53e47d6947f1a5
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351 sourceBlobDigest: sha256:6108b6c35fbe7e9163ffe0c804170f5e3a6edb63b8e745454ea8ee249bd790c3
codeSamplesNamespace: code-samples-php-plexphp codeSamplesNamespace: code-samples-php-plexphp
codeSamplesRevisionDigest: sha256:3dcf3d6a964ac2772b260e917ed4812bf243c7ab915d00cf61d39f63c5ab5392 codeSamplesRevisionDigest: sha256:de28f90452840202074947777b608436c2102f493423853b74d94710ee4630e3
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: latest speakeasyVersion: latest

View File

@@ -177,7 +177,9 @@ if ($response->object !== null) {
* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media * [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media
* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details * [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items * [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 * [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 * [getRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added
* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library * [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries * [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 * [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children * [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content * [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) ### [log](docs/sdks/log/README.md)

View File

@@ -823,3 +823,13 @@ Based on:
- [php v0.14.2] . - [php v0.14.2] .
### Releases ### Releases
- [Composer v0.14.2] https://packagist.org/packages/lukehagar/plex-api#v0.14.2 - . - [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 - .

View File

@@ -807,6 +807,63 @@ actions:
if ($response->object !== null) { if ($response->object !== null) {
// handle response // 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"] - target: $["paths"]["/library/metadata/{ratingKey}/banner"]["get"]
update: update:
x-codeSamples: x-codeSamples:
@@ -871,6 +928,63 @@ actions:
if ($response->object !== null) { if ($response->object !== null) {
// handle response // 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"] - target: $["paths"]["/library/metadata/{ratingKey}/thumb"]["get"]
update: update:
x-codeSamples: x-codeSamples:

View File

@@ -17,7 +17,7 @@
"brick/math": "^0.12.1" "brick/math": "^0.12.1"
}, },
"require-dev": { "require-dev": {
"laravel/pint": "^1.18.1", "laravel/pint": "^1.21.2",
"phpstan/phpstan": "^2.1.0", "phpstan/phpstan": "^2.1.0",
"phpunit/phpunit": "^10", "phpunit/phpunit": "^10",
"roave/security-advisories": "dev-latest" "roave/security-advisories": "dev-latest"

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` | *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 | |

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 |
| `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 |

View 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 |

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` | [\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. |

View 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 |

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` | *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 | |

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 |
| `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 |

View 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 |

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` | [\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. |

View 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 |

View 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 | |

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` | [\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 |

View 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 | |

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` | [\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 |

View File

@@ -16,7 +16,9 @@ API Calls interacting with Plex Media Server Libraries
* [getGenresLibrary](#getgenreslibrary) - Get Genres of library media * [getGenresLibrary](#getgenreslibrary) - Get Genres of library media
* [getLibraryDetails](#getlibrarydetails) - Get Library Details * [getLibraryDetails](#getlibrarydetails) - Get Library Details
* [getLibraryItems](#getlibraryitems) - Get Library Items * [getLibraryItems](#getlibraryitems) - Get Library Items
* [getMediaArts](#getmediaarts) - Get Media Background Artwork
* [getMediaMetaData](#getmediametadata) - Get Media Metadata * [getMediaMetaData](#getmediametadata) - Get Media Metadata
* [getMediaPosters](#getmediaposters) - Get Media Posters
* [getRecentlyAddedLibrary](#getrecentlyaddedlibrary) - Get Recently Added * [getRecentlyAddedLibrary](#getrecentlyaddedlibrary) - Get Recently Added
* [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library * [getRefreshLibraryMetadata](#getrefreshlibrarymetadata) - Refresh Metadata Of The Library
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries * [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
@@ -24,6 +26,8 @@ API Calls interacting with Plex Media Server Libraries
* [getFileHash](#getfilehash) - Get Hash Value * [getFileHash](#getfilehash) - Get Hash Value
* [getMetadataChildren](#getmetadatachildren) - Get Items Children * [getMetadataChildren](#getmetadatachildren) - Get Items Children
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content * [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
* [postMediaArts](#postmediaarts) - Upload Media Background Artwork
* [postMediaPoster](#postmediaposter) - Upload Media Poster
## deleteLibrary ## deleteLibrary
@@ -498,6 +502,52 @@ if ($response->object !== null) {
| Errors\GetLibraryItemsUnauthorized | 401 | application/json | | Errors\GetLibraryItemsUnauthorized | 401 | application/json |
| Errors\SDKException | 4XX, 5XX | \*/\* | | 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 ## getMediaMetaData
This endpoint will return all the (meta)data of a library item specified with by the ratingKey. 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\GetMediaMetaDataUnauthorized | 401 | application/json |
| Errors\SDKException | 4XX, 5XX | \*/\* | | 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 ## getRecentlyAddedLibrary
This endpoint will return the recently added content. This endpoint will return the recently added content.
@@ -965,3 +1061,105 @@ if ($response->object !== null) {
| Errors\GetTopWatchedContentBadRequest | 400 | application/json | | Errors\GetTopWatchedContentBadRequest | 400 | application/json |
| Errors\GetTopWatchedContentUnauthorized | 401 | application/json | | Errors\GetTopWatchedContentUnauthorized | 401 | application/json |
| Errors\SDKException | 4XX, 5XX | \*/\* | | 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 | \*/\* |

View File

@@ -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 * 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 * 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);
}
}
} }

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View 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;
}
}

View File

@@ -33,11 +33,11 @@ class SDKConfiguration
public string $openapiDocVersion = '0.0.3'; 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; public ?RetryConfig $retryConfig = null;