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.362.0
This commit is contained in:
@@ -31,15 +31,13 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
use LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -49,16 +47,16 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\CreatePlaylistRequest();
|
||||
$request->title = '<value>';
|
||||
$request->type = Operations\QueryParamType::Photo;
|
||||
$request->smart = Operations\Smart::One;
|
||||
$request->uri = 'https://inborn-brochure.biz';
|
||||
$request->playQueueID = 3686.33;;
|
||||
|
||||
$request = new Operations\CreatePlaylistRequest(
|
||||
title: '<value>',
|
||||
type: Operations\QueryParamType::Photo,
|
||||
smart: Operations\Smart::One,
|
||||
uri: 'https://inborn-brochure.biz',
|
||||
playQueueID: 3686.33,
|
||||
);
|
||||
$response = $sdk->playlists->createPlaylist($request);
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
@@ -68,15 +66,20 @@ try {
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| `$request` | [\LukeHagar\Plex_API\Models\Operations\CreatePlaylistRequest](../../Models/Operations/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `$request` | [Operations\CreatePlaylistRequest](../../Models/Operations/CreatePlaylistRequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\CreatePlaylistResponse](../../Models/Operations/CreatePlaylistResponse.md)**
|
||||
**[?Operations\CreatePlaylistResponse](../../Models/Operations/CreatePlaylistResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\CreatePlaylistResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## getPlaylists
|
||||
|
||||
@@ -85,15 +88,13 @@ Get All Playlists given the specified filters.
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
use LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -103,11 +104,10 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->getPlaylists(Operations\PlaylistType::Audio, Operations\QueryParamSmart::Zero);
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
@@ -117,16 +117,21 @@ try {
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `playlistType` | [\LukeHagar\Plex_API\Models\Operations\PlaylistType](../../Models/Operations/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. |
|
||||
| `smart` | [\LukeHagar\Plex_API\Models\Operations\QueryParamSmart](../../Models/Operations/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). |
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `playlistType` | [Operations\PlaylistType](../../Models/Operations/PlaylistType.md) | :heavy_minus_sign: | limit to a type of playlist. |
|
||||
| `smart` | [Operations\QueryParamSmart](../../Models/Operations/QueryParamSmart.md) | :heavy_minus_sign: | type of playlists to return (default is all). |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\GetPlaylistsResponse](../../Models/Operations/GetPlaylistsResponse.md)**
|
||||
**[?Operations\GetPlaylistsResponse](../../Models/Operations/GetPlaylistsResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\GetPlaylistsResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## getPlaylist
|
||||
|
||||
@@ -137,15 +142,12 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -155,11 +157,10 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->getPlaylist(4109.48);
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
@@ -176,8 +177,13 @@ try {
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\GetPlaylistResponse](../../Models/Operations/GetPlaylistResponse.md)**
|
||||
**[?Operations\GetPlaylistResponse](../../Models/Operations/GetPlaylistResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\GetPlaylistResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## deletePlaylist
|
||||
|
||||
@@ -187,15 +193,12 @@ This endpoint will delete a playlist
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -205,7 +208,6 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->deletePlaylist(216.22);
|
||||
|
||||
@@ -226,8 +228,13 @@ try {
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\DeletePlaylistResponse](../../Models/Operations/DeletePlaylistResponse.md)**
|
||||
**[?Operations\DeletePlaylistResponse](../../Models/Operations/DeletePlaylistResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\DeletePlaylistResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## updatePlaylist
|
||||
|
||||
@@ -237,15 +244,12 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -255,7 +259,6 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->updatePlaylist(3915, '<value>', '<value>');
|
||||
|
||||
@@ -278,8 +281,13 @@ try {
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\UpdatePlaylistResponse](../../Models/Operations/UpdatePlaylistResponse.md)**
|
||||
**[?Operations\UpdatePlaylistResponse](../../Models/Operations/UpdatePlaylistResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\UpdatePlaylistResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## getPlaylistContents
|
||||
|
||||
@@ -292,15 +300,12 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -310,11 +315,10 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->getPlaylistContents(5004.46, 9403.59);
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
@@ -332,8 +336,13 @@ try {
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\GetPlaylistContentsResponse](../../Models/Operations/GetPlaylistContentsResponse.md)**
|
||||
**[?Operations\GetPlaylistContentsResponse](../../Models/Operations/GetPlaylistContentsResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\GetPlaylistContentsResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## clearPlaylistContents
|
||||
|
||||
@@ -343,15 +352,12 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -361,7 +367,6 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->clearPlaylistContents(1893.18);
|
||||
|
||||
@@ -382,8 +387,13 @@ try {
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\ClearPlaylistContentsResponse](../../Models/Operations/ClearPlaylistContentsResponse.md)**
|
||||
**[?Operations\ClearPlaylistContentsResponse](../../Models/Operations/ClearPlaylistContentsResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\ClearPlaylistContentsResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## addPlaylistContents
|
||||
|
||||
@@ -394,15 +404,12 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -412,11 +419,10 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->addPlaylistContents(8502.01, 'server://12345/com.plexapp.plugins.library/library/metadata/1', 123);
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
if ($response->object !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
@@ -435,8 +441,13 @@ try {
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\AddPlaylistContentsResponse](../../Models/Operations/AddPlaylistContentsResponse.md)**
|
||||
**[?Operations\AddPlaylistContentsResponse](../../Models/Operations/AddPlaylistContentsResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\AddPlaylistContentsResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
## uploadPlaylist
|
||||
|
||||
@@ -446,15 +457,13 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
||||
### Example Usage
|
||||
|
||||
```php
|
||||
<?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;
|
||||
use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
use LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
@@ -464,7 +473,6 @@ $sdk = Plex_API\PlexAPI::builder()
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->playlists->uploadPlaylist('/home/barkley/playlist.m3u', Operations\Force::Zero);
|
||||
|
||||
@@ -481,10 +489,15 @@ try {
|
||||
| Parameter | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `path` | *string* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||
| `force` | [\LukeHagar\Plex_API\Models\Operations\Force](../../Models/Operations/Force.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
||||
| `force` | [Operations\Force](../../Models/Operations/Force.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.<br/> | |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[?\LukeHagar\Plex_API\Models\Operations\UploadPlaylistResponse](../../Models/Operations/UploadPlaylistResponse.md)**
|
||||
**[?Operations\UploadPlaylistResponse](../../Models/Operations/UploadPlaylistResponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| Errors\UploadPlaylistResponseBody | 401 | application/json |
|
||||
| LukeHagar\Plex_API\Models\Errors.SDKException | 4xx-5xx | */* |
|
||||
|
||||
Reference in New Issue
Block a user