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.228.1
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: 01a51eb2-5d90-4a24-b154-68e491d02c36
|
||||
management:
|
||||
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
|
||||
docChecksum: a91eaf9ec1e6a3a6f4bf0571f5b18bae
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.227.0
|
||||
generationVersion: 2.291.0
|
||||
releaseVersion: 0.3.5
|
||||
configChecksum: ef02193b521e814b08b92aedaea619d7
|
||||
speakeasyVersion: 1.228.1
|
||||
generationVersion: 2.292.0
|
||||
releaseVersion: 0.4.0
|
||||
configChecksum: 26b18017f71e11721ba0604c741dc08c
|
||||
repoURL: https://github.com/LukeHagar/plexphp.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexphp
|
||||
@@ -16,6 +16,7 @@ features:
|
||||
flattening: 2.81.1
|
||||
globalSecurity: 2.81.6
|
||||
globalServerURLs: 2.82.1
|
||||
globals: 2.82.1
|
||||
methodServerURLs: 2.82.1
|
||||
nameOverrides: 2.81.1
|
||||
generatedFiles:
|
||||
|
||||
@@ -12,7 +12,7 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
php:
|
||||
version: 0.3.5
|
||||
version: 0.4.0
|
||||
imports:
|
||||
option: openapi
|
||||
paths:
|
||||
|
||||
57
README.md
57
README.md
@@ -54,6 +54,7 @@ $security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)
|
||||
->build();
|
||||
|
||||
@@ -220,10 +221,12 @@ use LukeHagar\Plex_API;
|
||||
use LukeHagar\Plex_API\Models\Components;
|
||||
use LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->plex->getPin('https://plex.tv/api/v2', '<value>', false);
|
||||
$response = $sdk->plex->getPin('https://plex.tv/api/v2', false, '<value>');
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
// handle response
|
||||
@@ -235,6 +238,56 @@ try {
|
||||
```
|
||||
<!-- End Server Selection [server] -->
|
||||
|
||||
<!-- Start Global Parameters [global-parameters] -->
|
||||
## Global Parameters
|
||||
|
||||
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||
|
||||
For example, you can set `X-Plex-Client-Identifier` to `'<value>'` at SDK initialization and then you do not have to pass the same value on calls to operations like `getPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
||||
|
||||
|
||||
### Available Globals
|
||||
|
||||
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
| ---- | ---- |:--------:| ----------- |
|
||||
| xPlexClientIdentifier | string | ✔️ | The unique identifier for the client application
|
||||
This is used to track the client application and its usage
|
||||
(UUID, serial number, or other number unique per device)
|
||||
|
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```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;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->plex->getPin(false, '<value>');
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
// handle response
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
// handle exception
|
||||
}
|
||||
|
||||
```
|
||||
<!-- End Global Parameters [global-parameters] -->
|
||||
|
||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||
|
||||
# Development
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -110,4 +110,12 @@ Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [php v0.3.5] .
|
||||
- [php v0.3.5] .
|
||||
|
||||
## 2024-03-29 16:36:43
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.228.1 (2.292.0) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [php v0.4.0] .
|
||||
1
USAGE.md
1
USAGE.md
@@ -13,6 +13,7 @@ $security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)
|
||||
->build();
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
| `strong` | *?bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
|
||||
| `strong` | *?bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
|
||||
| `xPlexClientIdentifier` | *?string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
@@ -6,4 +6,4 @@
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
| `xPlexClientIdentifier` | *?string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
@@ -36,7 +36,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->activities->getServerActivities();
|
||||
@@ -75,7 +77,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -82,7 +84,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -33,7 +33,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->butler->getButlerTasks();
|
||||
@@ -76,7 +78,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->butler->startAllTasks();
|
||||
@@ -115,7 +119,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->butler->stopAllTasks();
|
||||
@@ -159,7 +165,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -207,7 +215,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -80,7 +82,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -88,7 +90,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->library->getRecentlyAdded();
|
||||
@@ -132,7 +136,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->library->getLibraries();
|
||||
@@ -210,7 +216,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -258,7 +266,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -325,7 +335,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -374,7 +386,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -439,7 +453,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -488,7 +504,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -536,7 +554,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -583,7 +603,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->library->getOnDeck();
|
||||
|
||||
@@ -33,7 +33,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -102,7 +104,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
'level=4&message=Test%20message%201&source=postman
|
||||
@@ -151,7 +155,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->log->enablePaperTrail();
|
||||
|
||||
@@ -32,7 +32,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -79,7 +81,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -127,7 +131,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\CreatePlaylistRequest();
|
||||
@@ -96,7 +98,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -146,7 +150,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -194,7 +200,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -242,7 +250,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -295,7 +305,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -344,7 +356,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -393,7 +407,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -443,7 +459,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -28,12 +28,14 @@ use \LukeHagar\Plex_API;
|
||||
use \LukeHagar\Plex_API\Models\Components;
|
||||
use \LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$response = $sdk->plex->getPin('<value>', false);
|
||||
$response = $sdk->plex->getPin(false, '<value>');
|
||||
|
||||
if ($response->twoHundredApplicationJsonObject !== null) {
|
||||
// handle response
|
||||
@@ -47,8 +49,8 @@ try {
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
| `strong` | *bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
| `$serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
|
||||
@@ -74,7 +76,9 @@ use \LukeHagar\Plex_API;
|
||||
use \LukeHagar\Plex_API\Models\Components;
|
||||
use \LukeHagar\Plex_API\Models\Operations;
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -94,7 +98,7 @@ try {
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
||||
| `$serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -97,7 +99,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -146,7 +150,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getServerCapabilities();
|
||||
@@ -74,7 +76,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getServerPreferences();
|
||||
@@ -112,7 +116,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getAvailableClients();
|
||||
@@ -150,7 +156,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getDevices();
|
||||
@@ -188,7 +196,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getServerIdentity();
|
||||
@@ -226,7 +236,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getMyPlexAccount();
|
||||
@@ -266,7 +278,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\GetResizedPhotoRequest();
|
||||
@@ -319,7 +333,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->server->getServerList();
|
||||
|
||||
@@ -32,7 +32,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->sessions->getSessions();
|
||||
@@ -70,7 +72,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->sessions->getSessionHistory();
|
||||
@@ -108,7 +112,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->sessions->getTranscodeSessions();
|
||||
@@ -147,7 +153,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ use \LukeHagar\Plex_API\Models\Components;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$response = $sdk->updater->getUpdateStatus();
|
||||
@@ -71,7 +73,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
@@ -119,7 +123,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\GetTimelineRequest();
|
||||
@@ -88,7 +90,9 @@ use \LukeHagar\Plex_API\Models\Operations;
|
||||
$security = new Components\Security();
|
||||
$security->accessToken = '<YOUR_API_KEY_HERE>';
|
||||
|
||||
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
|
||||
$sdk = Plex_API\PlexAPI::builder()
|
||||
->setXPlexClientIdentifier('<value>')
|
||||
->setSecurity($security)->build();
|
||||
|
||||
try {
|
||||
$request = new Operations\StartUniversalTranscodeRequest();
|
||||
|
||||
@@ -83,7 +83,7 @@ class Activities
|
||||
$request->activityUUID = $activityUUID;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/activities/{activityUUID}', \LukeHagar\Plex_API\Models\Operations\CancelServerActivitiesRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/activities/{activityUUID}', \LukeHagar\Plex_API\Models\Operations\CancelServerActivitiesRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
|
||||
@@ -44,7 +44,7 @@ class Authentication
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/security/token');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetTransientTokenRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetTransientTokenRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -92,7 +92,7 @@ class Authentication
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/security/resources');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetSourceConnectionInformationRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetSourceConnectionInformationRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class Butler
|
||||
$request->taskName = $taskName;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/butler/{taskName}', \LukeHagar\Plex_API\Models\Operations\StartTaskRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/butler/{taskName}', \LukeHagar\Plex_API\Models\Operations\StartTaskRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -220,7 +220,7 @@ class Butler
|
||||
$request->taskName = $taskName;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/butler/{taskName}', \LukeHagar\Plex_API\Models\Operations\StopTaskRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/butler/{taskName}', \LukeHagar\Plex_API\Models\Operations\StopTaskRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
|
||||
@@ -43,7 +43,7 @@ class Hubs
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/hubs');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetGlobalHubsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetGlobalHubsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -99,10 +99,10 @@ class Hubs
|
||||
$request->onlyTransient = $onlyTransient;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/hubs/sections/{sectionId}', \LukeHagar\Plex_API\Models\Operations\GetLibraryHubsRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/hubs/sections/{sectionId}', \LukeHagar\Plex_API\Models\Operations\GetLibraryHubsRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetLibraryHubsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetLibraryHubsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class Library
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/hashes');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetFileHashRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetFileHashRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -227,10 +227,10 @@ class Library
|
||||
$request->includeDetails = $includeDetails;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}', \LukeHagar\Plex_API\Models\Operations\GetLibraryRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}', \LukeHagar\Plex_API\Models\Operations\GetLibraryRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetLibraryRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetLibraryRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -279,7 +279,7 @@ class Library
|
||||
$request->sectionId = $sectionId;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}', \LukeHagar\Plex_API\Models\Operations\DeleteLibraryRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}', \LukeHagar\Plex_API\Models\Operations\DeleteLibraryRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -347,7 +347,7 @@ class Library
|
||||
$request->tag = $tag;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}/{tag}', \LukeHagar\Plex_API\Models\Operations\GetLibraryItemsRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}/{tag}', \LukeHagar\Plex_API\Models\Operations\GetLibraryItemsRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -391,7 +391,7 @@ class Library
|
||||
$request->sectionId = $sectionId;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}/refresh', \LukeHagar\Plex_API\Models\Operations\RefreshLibraryRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}/refresh', \LukeHagar\Plex_API\Models\Operations\RefreshLibraryRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -457,10 +457,10 @@ class Library
|
||||
$request->type = $type;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}/search', \LukeHagar\Plex_API\Models\Operations\SearchLibraryRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/sections/{sectionId}/search', \LukeHagar\Plex_API\Models\Operations\SearchLibraryRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\SearchLibraryRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\SearchLibraryRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -502,7 +502,7 @@ class Library
|
||||
$request->ratingKey = $ratingKey;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}', \LukeHagar\Plex_API\Models\Operations\GetMetadataRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}', \LukeHagar\Plex_API\Models\Operations\GetMetadataRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -554,7 +554,7 @@ class Library
|
||||
$request->ratingKey = $ratingKey;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}/children', \LukeHagar\Plex_API\Models\Operations\GetMetadataChildrenRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/library/metadata/{ratingKey}/children', \LukeHagar\Plex_API\Models\Operations\GetMetadataChildrenRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
|
||||
@@ -47,7 +47,7 @@ class Log
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/log');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\LogLineRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\LogLineRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class Media
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/:/scrobble');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\MarkPlayedRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\MarkPlayedRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -86,7 +86,7 @@ class Media
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/:/unscrobble');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\MarkUnplayedRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\MarkUnplayedRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -139,7 +139,7 @@ class Media
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/:/progress');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\UpdatePlayProgressRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\UpdatePlayProgressRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -11,18 +11,6 @@ namespace LukeHagar\Plex_API\Models\Operations;
|
||||
use \LukeHagar\Plex_API\Utils\SpeakeasyMetadata;
|
||||
class GetPinRequest
|
||||
{
|
||||
/**
|
||||
* The unique identifier for the client application
|
||||
*
|
||||
* This is used to track the client application and its usage
|
||||
* (UUID, serial number, or other number unique per device)
|
||||
*
|
||||
*
|
||||
* @var string $xPlexClientIdentifier
|
||||
*/
|
||||
#[SpeakeasyMetadata('header:style=simple,explode=false,name=X-Plex-Client-Identifier')]
|
||||
public string $xPlexClientIdentifier;
|
||||
|
||||
/**
|
||||
* Determines the kind of code returned by the API call
|
||||
*
|
||||
@@ -35,9 +23,21 @@ class GetPinRequest
|
||||
#[SpeakeasyMetadata('queryParam:style=form,explode=true,name=strong')]
|
||||
public ?bool $strong = null;
|
||||
|
||||
/**
|
||||
* The unique identifier for the client application
|
||||
*
|
||||
* This is used to track the client application and its usage
|
||||
* (UUID, serial number, or other number unique per device)
|
||||
*
|
||||
*
|
||||
* @var ?string $xPlexClientIdentifier
|
||||
*/
|
||||
#[SpeakeasyMetadata('header:style=simple,explode=false,name=X-Plex-Client-Identifier')]
|
||||
public ?string $xPlexClientIdentifier = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->xPlexClientIdentifier = "";
|
||||
$this->strong = null;
|
||||
$this->xPlexClientIdentifier = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,14 @@ class GetTokenRequest
|
||||
* (UUID, serial number, or other number unique per device)
|
||||
*
|
||||
*
|
||||
* @var string $xPlexClientIdentifier
|
||||
* @var ?string $xPlexClientIdentifier
|
||||
*/
|
||||
#[SpeakeasyMetadata('header:style=simple,explode=false,name=X-Plex-Client-Identifier')]
|
||||
public string $xPlexClientIdentifier;
|
||||
public ?string $xPlexClientIdentifier = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->pinID = "";
|
||||
$this->xPlexClientIdentifier = "";
|
||||
$this->xPlexClientIdentifier = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class Playlists
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\CreatePlaylistRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\CreatePlaylistRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -95,7 +95,7 @@ class Playlists
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetPlaylistsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetPlaylistsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -146,7 +146,7 @@ class Playlists
|
||||
$request->playlistID = $playlistID;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}', \LukeHagar\Plex_API\Models\Operations\GetPlaylistRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}', \LukeHagar\Plex_API\Models\Operations\GetPlaylistRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -198,7 +198,7 @@ class Playlists
|
||||
$request->playlistID = $playlistID;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}', \LukeHagar\Plex_API\Models\Operations\DeletePlaylistRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}', \LukeHagar\Plex_API\Models\Operations\DeletePlaylistRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -250,10 +250,10 @@ class Playlists
|
||||
$request->summary = $summary;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}', \LukeHagar\Plex_API\Models\Operations\UpdatePlaylistRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}', \LukeHagar\Plex_API\Models\Operations\UpdatePlaylistRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\UpdatePlaylistRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\UpdatePlaylistRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -303,10 +303,10 @@ class Playlists
|
||||
$request->type = $type;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}/items', \LukeHagar\Plex_API\Models\Operations\GetPlaylistContentsRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}/items', \LukeHagar\Plex_API\Models\Operations\GetPlaylistContentsRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetPlaylistContentsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetPlaylistContentsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -356,7 +356,7 @@ class Playlists
|
||||
$request->playlistID = $playlistID;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}/items', \LukeHagar\Plex_API\Models\Operations\ClearPlaylistContentsRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}/items', \LukeHagar\Plex_API\Models\Operations\ClearPlaylistContentsRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
@@ -409,10 +409,10 @@ class Playlists
|
||||
$request->playQueueID = $playQueueID;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}/items', \LukeHagar\Plex_API\Models\Operations\AddPlaylistContentsRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/{playlistID}/items', \LukeHagar\Plex_API\Models\Operations\AddPlaylistContentsRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\AddPlaylistContentsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\AddPlaylistContentsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -468,7 +468,7 @@ class Playlists
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/playlists/upload');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\UploadPlaylistRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\UploadPlaylistRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
18
src/Plex.php
18
src/Plex.php
@@ -34,20 +34,20 @@ class Plex
|
||||
*
|
||||
* Retrieve a Pin from Plex.tv for authentication flows
|
||||
*
|
||||
* @param string $xPlexClientIdentifier
|
||||
* @param ?bool $strong
|
||||
* @param ?string $xPlexClientIdentifier
|
||||
* @param string $serverURL
|
||||
* @return \LukeHagar\Plex_API\Models\Operations\GetPinResponse
|
||||
*/
|
||||
public function getPin(
|
||||
string $xPlexClientIdentifier,
|
||||
?bool $strong = null,
|
||||
?string $xPlexClientIdentifier = null,
|
||||
?string $serverURL = null,
|
||||
): \LukeHagar\Plex_API\Models\Operations\GetPinResponse
|
||||
{
|
||||
$request = new \LukeHagar\Plex_API\Models\Operations\GetPinRequest();
|
||||
$request->xPlexClientIdentifier = $xPlexClientIdentifier;
|
||||
$request->strong = $strong;
|
||||
$request->xPlexClientIdentifier = $xPlexClientIdentifier;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl(Plex::GET_PIN_SERVERS[0], array(
|
||||
));
|
||||
@@ -58,8 +58,8 @@ class Plex
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/pins');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetPinRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getHeaders($request));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetPinRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals));
|
||||
if (!array_key_exists('headers', $options)) {
|
||||
$options['headers'] = [];
|
||||
}
|
||||
@@ -99,13 +99,13 @@ class Plex
|
||||
* Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
||||
*
|
||||
* @param string $pinID
|
||||
* @param string $xPlexClientIdentifier
|
||||
* @param ?string $xPlexClientIdentifier
|
||||
* @param string $serverURL
|
||||
* @return \LukeHagar\Plex_API\Models\Operations\GetTokenResponse
|
||||
*/
|
||||
public function getToken(
|
||||
string $pinID,
|
||||
string $xPlexClientIdentifier,
|
||||
?string $xPlexClientIdentifier = null,
|
||||
?string $serverURL = null,
|
||||
): \LukeHagar\Plex_API\Models\Operations\GetTokenResponse
|
||||
{
|
||||
@@ -119,10 +119,10 @@ class Plex
|
||||
$baseUrl = $serverURL;
|
||||
}
|
||||
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/pins/{pinID}', \LukeHagar\Plex_API\Models\Operations\GetTokenRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/pins/{pinID}', \LukeHagar\Plex_API\Models\Operations\GetTokenRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getHeaders($request));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getHeaders($request, $this->sdkConfiguration->globals));
|
||||
if (!array_key_exists('headers', $options)) {
|
||||
$options['headers'] = [];
|
||||
}
|
||||
|
||||
@@ -130,6 +130,24 @@ class PlexAPIBuilder
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* setXPlexClientIdentifier is used to configure the X-Plex-Client-Identifier parameter for the SDK.
|
||||
*
|
||||
* @param string $xPlexClientIdentifier
|
||||
* @return PlexAPIBuilder
|
||||
*/
|
||||
public function setXPlexClientIdentifier(string $xPlexClientIdentifier): PlexAPIBuilder
|
||||
{
|
||||
if (!array_key_exists('header', $this->sdkConfig->globals['parameters']))
|
||||
{
|
||||
$this->sdkConfig->globals['parameters']['header'] = [];
|
||||
}
|
||||
|
||||
$this->sdkConfig->globals['parameters']['header']['xPlexClientIdentifier'] = $xPlexClientIdentifier;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* build is used to build the SDK with any of the configured options.
|
||||
*
|
||||
|
||||
@@ -25,10 +25,13 @@ class SDKConfiguration
|
||||
];
|
||||
public string $language = 'php';
|
||||
public string $openapiDocVersion = '0.0.3';
|
||||
public string $sdkVersion = '0.3.5';
|
||||
public string $genVersion = '2.291.0';
|
||||
public string $userAgent = 'speakeasy-sdk/php 0.3.5 2.291.0 0.0.3 lukehagar/plex-api';
|
||||
|
||||
public string $sdkVersion = '0.4.0';
|
||||
public string $genVersion = '2.292.0';
|
||||
public string $userAgent = 'speakeasy-sdk/php 0.4.0 2.292.0 0.0.3 lukehagar/plex-api';
|
||||
/** @var array<string, array<string, array<string, mixed>>> */
|
||||
public ?array $globals = [
|
||||
'parameters' => []
|
||||
];
|
||||
|
||||
public function getServerUrl(): string
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ class Search
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/hubs/search');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\PerformSearchRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\PerformSearchRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -114,7 +114,7 @@ class Search
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/hubs/search/voice');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\PerformVoiceSearchRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\PerformVoiceSearchRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -160,7 +160,7 @@ class Search
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/search');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetSearchResultsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetSearchResultsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ class Server
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/photo/:/transcode');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetResizedPhotoRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetResizedPhotoRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ class Sessions
|
||||
$request->sessionKey = $sessionKey;
|
||||
|
||||
$baseUrl = Utils\Utils::templateUrl($this->sdkConfiguration->getServerUrl(), $this->sdkConfiguration->getServerDefaults());
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/transcode/sessions/{sessionKey}', \LukeHagar\Plex_API\Models\Operations\StopTranscodeSessionRequest::class, $request);
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/transcode/sessions/{sessionKey}', \LukeHagar\Plex_API\Models\Operations\StopTranscodeSessionRequest::class, $request, $this->sdkConfiguration->globals);
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
|
||||
@@ -40,7 +40,7 @@ class Statistics
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/statistics/media');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetStatisticsRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetStatisticsRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class Updater
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/updater/check');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\CheckForUpdatesRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\CheckForUpdatesRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -136,7 +136,7 @@ class Updater
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/updater/apply');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\ApplyUpdatesRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\ApplyUpdatesRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class Video
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/:/timeline');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetTimelineRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\GetTimelineRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
@@ -80,7 +80,7 @@ class Video
|
||||
$url = Utils\Utils::generateUrl($baseUrl, '/video/:/transcode/universal/start.mpd');
|
||||
|
||||
$options = ['http_errors' => false];
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\StartUniversalTranscodeRequest::class, $request, null));
|
||||
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\StartUniversalTranscodeRequest::class, $request, $this->sdkConfiguration->globals));
|
||||
$options['headers']['Accept'] = 'application/json';
|
||||
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user