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.397.2
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# Media
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
API Calls interacting with Plex Media Server Media
|
||||
@@ -11,6 +10,8 @@ API Calls interacting with Plex Media Server Media
|
||||
* [markPlayed](#markplayed) - Mark Media Played
|
||||
* [markUnplayed](#markunplayed) - Mark Media Unplayed
|
||||
* [updatePlayProgress](#updateplayprogress) - Update Media Play Progress
|
||||
* [getBannerImage](#getbannerimage) - Get Banner Image
|
||||
* [getThumbImage](#getthumbimage) - Get Thumb Image
|
||||
|
||||
## markPlayed
|
||||
|
||||
@@ -26,11 +27,12 @@ require 'vendor/autoload.php';
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
$security = new Components\Security(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
);
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('Postman')
|
||||
->setXPlexClientIdentifier('gcgzw5rz2xovp84b4vha3a40')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
@@ -51,17 +53,19 @@ try {
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| `key` | *float* | :heavy_check_mark: | The media key to mark as played | 59398 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\MarkPlayedResponse](../../Models/Operations/MarkPlayedResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\MarkPlayedResponseBody | 401 | application/json |
|
||||
| Errors\MarkPlayedBadRequest | 400 | application/json |
|
||||
| Errors\MarkPlayedUnauthorized | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## markUnplayed
|
||||
|
||||
This will mark the provided media key as Unplayed.
|
||||
@@ -76,11 +80,12 @@ require 'vendor/autoload.php';
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
$security = new Components\Security(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
);
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('Postman')
|
||||
->setXPlexClientIdentifier('gcgzw5rz2xovp84b4vha3a40')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
@@ -101,17 +106,19 @@ try {
|
||||
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
|
||||
| `key` | *float* | :heavy_check_mark: | The media key to mark as Unplayed | 59398 |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\MarkUnplayedResponse](../../Models/Operations/MarkUnplayedResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\MarkUnplayedResponseBody | 401 | application/json |
|
||||
| Errors\MarkUnplayedBadRequest | 400 | application/json |
|
||||
| Errors\MarkUnplayedUnauthorized | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## updatePlayProgress
|
||||
|
||||
This API command can be used to update the play progress of a media item.
|
||||
@@ -127,16 +134,17 @@ require 'vendor/autoload.php';
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
$security = new Components\Security(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
);
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('Postman')
|
||||
->setXPlexClientIdentifier('gcgzw5rz2xovp84b4vha3a40')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
$response = $sdk->media->updatePlayProgress('<value>', 90000, 'played');
|
||||
$response = $sdk->media->updatePlayProgress('<key>', 90000, 'played');
|
||||
|
||||
if ($response->statusCode === 200) {
|
||||
// handle response
|
||||
@@ -154,13 +162,136 @@ try {
|
||||
| `time` | *float* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
|
||||
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | played |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\UpdatePlayProgressResponse](../../Models/Operations/UpdatePlayProgressResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\UpdatePlayProgressResponseBody | 401 | application/json |
|
||||
| Errors\UpdatePlayProgressBadRequest | 400 | application/json |
|
||||
| Errors\UpdatePlayProgressUnauthorized | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## getBannerImage
|
||||
|
||||
Gets the banner image of the media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
use LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$security = new Components\Security(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
);
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('gcgzw5rz2xovp84b4vha3a40')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\GetBannerImageRequest(
|
||||
ratingKey: 9518,
|
||||
width: 396,
|
||||
height: 396,
|
||||
minSize: 1,
|
||||
upscale: 1,
|
||||
xPlexToken: 'CV5xoxjTpFKUzBTShsaf',
|
||||
);
|
||||
$response = $sdk->media->getBannerImage($request);
|
||||
|
||||
if ($response->bytes !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
// handle exception
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `$request` | [Operations\GetBannerImageRequest](../../Models/Operations/GetBannerImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\GetBannerImageResponse](../../Models/Operations/GetBannerImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\GetBannerImageBadRequest | 400 | application/json |
|
||||
| Errors\GetBannerImageUnauthorized | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
|
||||
## getThumbImage
|
||||
|
||||
Gets the thumbnail image of the media item
|
||||
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
declare(strict_types=1);
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
use LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$security = new Components\Security(
|
||||
accessToken: "<YOUR_API_KEY_HERE>",
|
||||
);
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('gcgzw5rz2xovp84b4vha3a40')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\GetThumbImageRequest(
|
||||
ratingKey: 9518,
|
||||
width: 396,
|
||||
height: 396,
|
||||
minSize: 1,
|
||||
upscale: 1,
|
||||
xPlexToken: 'CV5xoxjTpFKUzBTShsaf',
|
||||
);
|
||||
$response = $sdk->media->getThumbImage($request);
|
||||
|
||||
if ($response->bytes !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
// handle exception
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `$request` | [Operations\GetThumbImageRequest](../../Models/Operations/GetThumbImageRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
### Response
|
||||
|
||||
**[?Operations\GetThumbImageResponse](../../Models/Operations/GetThumbImageResponse.md)**
|
||||
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\GetThumbImageBadRequest | 400 | application/json |
|
||||
| Errors\GetThumbImageUnauthorized | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user