ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.150.0

This commit is contained in:
speakeasybot
2024-01-23 20:47:44 +00:00
parent fea0f897f2
commit c55fe761e8
32 changed files with 687 additions and 76 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 01a51eb2-5d90-4a24-b154-68e491d02c36
management:
docChecksum: 7aba498c024534142941d65a7c2e649c
docChecksum: 49e77b550f057eb568502dc74fee7cce
docVersion: 0.0.3
speakeasyVersion: internal
generationVersion: 2.237.3
releaseVersion: 0.1.5
configChecksum: d1a80abb6909ae5574949ec03fa95fb9
releaseVersion: 0.1.6
configChecksum: b9566d846ca2859cb3952c40928e9e1b
repoURL: https://github.com/LukeHagar/plexphp.git
repoSubDirectory: .
installationURL: https://github.com/LukeHagar/plexphp
@@ -250,6 +250,12 @@ generatedFiles:
- src/Models/Operations/RefreshLibraryErrors.php
- src/Models/Operations/RefreshLibraryResponseBody.php
- src/Models/Operations/RefreshLibraryResponse.php
- src/Models/Operations/Type.php
- src/Models/Operations/SearchLibraryRequest.php
- src/Models/Operations/SearchLibraryMetadata.php
- src/Models/Operations/SearchLibraryMediaContainer.php
- src/Models/Operations/SearchLibraryResponseBody.php
- src/Models/Operations/SearchLibraryResponse.php
- src/Models/Operations/GetMetadataRequest.php
- src/Models/Operations/GetMetadataErrors.php
- src/Models/Operations/GetMetadataLibraryResponseBody.php
@@ -297,7 +303,7 @@ generatedFiles:
- src/Models/Operations/EnablePaperTrailErrors.php
- src/Models/Operations/EnablePaperTrailResponseBody.php
- src/Models/Operations/EnablePaperTrailResponse.php
- src/Models/Operations/Type.php
- src/Models/Operations/QueryParamType.php
- src/Models/Operations/Smart.php
- src/Models/Operations/CreatePlaylistRequest.php
- src/Models/Operations/CreatePlaylistErrors.php
@@ -360,7 +366,7 @@ generatedFiles:
- src/Models/Operations/UploadPlaylistErrors.php
- src/Models/Operations/UploadPlaylistResponseBody.php
- src/Models/Operations/UploadPlaylistResponse.php
- src/Models/Operations/QueryParamType.php
- src/Models/Operations/GetTransientTokenQueryParamType.php
- src/Models/Operations/Scope.php
- src/Models/Operations/GetTransientTokenRequest.php
- src/Models/Operations/GetTransientTokenErrors.php
@@ -622,6 +628,12 @@ generatedFiles:
- docs/Models/Operations/RefreshLibraryErrors.md
- docs/Models/Operations/RefreshLibraryResponseBody.md
- docs/Models/Operations/RefreshLibraryResponse.md
- docs/Models/Operations/Type.md
- docs/Models/Operations/SearchLibraryRequest.md
- docs/Models/Operations/SearchLibraryMetadata.md
- docs/Models/Operations/SearchLibraryMediaContainer.md
- docs/Models/Operations/SearchLibraryResponseBody.md
- docs/Models/Operations/SearchLibraryResponse.md
- docs/Models/Operations/GetMetadataRequest.md
- docs/Models/Operations/GetMetadataErrors.md
- docs/Models/Operations/GetMetadataLibraryResponseBody.md
@@ -669,7 +681,7 @@ generatedFiles:
- docs/Models/Operations/EnablePaperTrailErrors.md
- docs/Models/Operations/EnablePaperTrailResponseBody.md
- docs/Models/Operations/EnablePaperTrailResponse.md
- docs/Models/Operations/Type.md
- docs/Models/Operations/QueryParamType.md
- docs/Models/Operations/Smart.md
- docs/Models/Operations/CreatePlaylistRequest.md
- docs/Models/Operations/CreatePlaylistErrors.md
@@ -732,7 +744,7 @@ generatedFiles:
- docs/Models/Operations/UploadPlaylistErrors.md
- docs/Models/Operations/UploadPlaylistResponseBody.md
- docs/Models/Operations/UploadPlaylistResponse.md
- docs/Models/Operations/QueryParamType.md
- docs/Models/Operations/GetTransientTokenQueryParamType.md
- docs/Models/Operations/Scope.md
- docs/Models/Operations/GetTransientTokenRequest.md
- docs/Models/Operations/GetTransientTokenErrors.md

View File

@@ -122,6 +122,7 @@ try {
* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section
* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items
* [refreshLibrary](docs/sdks/library/README.md#refreshlibrary) - Refresh Library
* [searchLibrary](docs/sdks/library/README.md#searchlibrary) - Search Library
* [getMetadata](docs/sdks/library/README.md#getmetadata) - Get Items Metadata
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
* [getOnDeck](docs/sdks/library/README.md#getondeck) - Get On Deck

View File

@@ -55,3 +55,11 @@ Based on:
- Speakeasy CLI 1.148.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v0.1.5] .
## 2024-01-23 20:47:26
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.150.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [php v0.1.6] .

View File

@@ -3,10 +3,10 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `title` | *string* | :heavy_check_mark: | name of the playlist |
| `type` | [\LukeHagar\Plex_API\Models\Operations\Type](../../Models/Operations/Type.md) | :heavy_check_mark: | type of playlist to create |
| `smart` | [\LukeHagar\Plex_API\Models\Operations\Smart](../../Models/Operations/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist |
| `playQueueID` | *?float* | :heavy_minus_sign: | the play queue to copy to a playlist |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `title` | *string* | :heavy_check_mark: | name of the playlist |
| `type` | [\LukeHagar\Plex_API\Models\Operations\QueryParamType](../../Models/Operations/QueryParamType.md) | :heavy_check_mark: | type of playlist to create |
| `smart` | [\LukeHagar\Plex_API\Models\Operations\Smart](../../Models/Operations/Smart.md) | :heavy_check_mark: | whether the playlist is smart or not |
| `uri` | *string* | :heavy_check_mark: | the content URI for the playlist |
| `playQueueID` | *?float* | :heavy_minus_sign: | the play queue to copy to a playlist |

View File

@@ -0,0 +1,10 @@
# GetTransientTokenQueryParamType
`delegation` - This is the only supported `type` parameter.
## Values
| Name | Value |
| ------------ | ------------ |
| `Delegation` | delegation |

View File

@@ -3,7 +3,7 @@
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `type` | [\LukeHagar\Plex_API\Models\Operations\QueryParamType](../../Models/Operations/QueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `scope` | [\LukeHagar\Plex_API\Models\Operations\Scope](../../Models/Operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `type` | [\LukeHagar\Plex_API\Models\Operations\GetTransientTokenQueryParamType](../../Models/Operations/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `scope` | [\LukeHagar\Plex_API\Models\Operations\Scope](../../Models/Operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |

View File

@@ -1,10 +1,12 @@
# QueryParamType
`delegation` - This is the only supported `type` parameter.
type of playlist to create
## Values
| Name | Value |
| ------------ | ------------ |
| `Delegation` | delegation |
| Name | Value |
| ------- | ------- |
| `Audio` | audio |
| `Video` | video |
| `Photo` | photo |

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,27 @@
# SearchLibraryMetadata
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ratingKey` | *?string* | :heavy_minus_sign: | N/A | 2 |
| `key` | *?string* | :heavy_minus_sign: | N/A | /library/metadata/2/children |
| `parentRatingKey` | *?string* | :heavy_minus_sign: | N/A | 1 |
| `guid` | *?string* | :heavy_minus_sign: | N/A | plex://season/602e67e766dfdb002c0a1b5b |
| `parentGuid` | *?string* | :heavy_minus_sign: | N/A | plex://show/5d9c086c7d06d9001ffd27aa |
| `parentStudio` | *?string* | :heavy_minus_sign: | N/A | Mutant Enemy Productions |
| `type` | *?string* | :heavy_minus_sign: | N/A | season |
| `title` | *?string* | :heavy_minus_sign: | N/A | Season 1 |
| `parentKey` | *?string* | :heavy_minus_sign: | N/A | /library/metadata/1 |
| `parentTitle` | *?string* | :heavy_minus_sign: | N/A | Firefly |
| `summary` | *?string* | :heavy_minus_sign: | N/A | Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship "Serenity". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government "The Alliance"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space. |
| `index` | *?int* | :heavy_minus_sign: | N/A | 1 |
| `parentIndex` | *?int* | :heavy_minus_sign: | N/A | 1 |
| `parentYear` | *?int* | :heavy_minus_sign: | N/A | 2002 |
| `thumb` | *?string* | :heavy_minus_sign: | N/A | /library/metadata/2/thumb/1705636920 |
| `art` | *?string* | :heavy_minus_sign: | N/A | /library/metadata/1/art/1705636920 |
| `parentThumb` | *?string* | :heavy_minus_sign: | N/A | /library/metadata/1/thumb/1705636920 |
| `parentTheme` | *?string* | :heavy_minus_sign: | N/A | /library/metadata/1/theme/1705636920 |
| `addedAt` | *?int* | :heavy_minus_sign: | N/A | 1705636916 |
| `updatedAt` | *?int* | :heavy_minus_sign: | N/A | 1705636920 |

View File

@@ -0,0 +1,9 @@
# SearchLibraryRequest
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `sectionId` | *int* | :heavy_check_mark: | the Id of the library to query |
| `type` | [\LukeHagar\Plex_API\Models\Operations\Type](../../Models/Operations/Type.md) | :heavy_check_mark: | Plex content type to search for |

View File

@@ -0,0 +1,11 @@
# SearchLibraryResponse
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `object` | [?\LukeHagar\Plex_API\Models\Operations\SearchLibraryResponseBody](../../Models/Operations/SearchLibraryResponseBody.md) | :heavy_minus_sign: | The contents of the library by section and type |

View File

@@ -0,0 +1,10 @@
# SearchLibraryResponseBody
The contents of the library by section and type
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `mediaContainer` | [?\LukeHagar\Plex_API\Models\Operations\SearchLibraryMediaContainer](../../Models/Operations/SearchLibraryMediaContainer.md) | :heavy_minus_sign: | N/A |

View File

@@ -5,25 +5,24 @@ A key representing a specific tag within the section.
## Values
| Name | Value |
| ------------------ | ------------------ |
| `All` | all |
| `Unwatched` | unwatched |
| `Newest` | newest |
| `RecentlyAdded` | recentlyAdded |
| `RecentlyViewed` | recentlyViewed |
| `OnDeck` | onDeck |
| `Collection` | collection |
| `Edition` | edition |
| `Genre` | genre |
| `Year` | year |
| `Decade` | decade |
| `Director` | director |
| `Actor` | actor |
| `Country` | country |
| `ContentRating` | contentRating |
| `Rating` | rating |
| `Resolution` | resolution |
| `FirstCharacter` | firstCharacter |
| `Folder` | folder |
| `SearchTypeEqual1` | search?type=1 |
| Name | Value |
| ---------------- | ---------------- |
| `All` | all |
| `Unwatched` | unwatched |
| `Newest` | newest |
| `RecentlyAdded` | recentlyAdded |
| `RecentlyViewed` | recentlyViewed |
| `OnDeck` | onDeck |
| `Collection` | collection |
| `Edition` | edition |
| `Genre` | genre |
| `Year` | year |
| `Decade` | decade |
| `Director` | director |
| `Actor` | actor |
| `Country` | country |
| `ContentRating` | contentRating |
| `Rating` | rating |
| `Resolution` | resolution |
| `FirstCharacter` | firstCharacter |
| `Folder` | folder |

View File

@@ -1,12 +1,13 @@
# Type
type of playlist to create
Plex content type to search for
## Values
| Name | Value |
| ------- | ------- |
| `Audio` | audio |
| `Video` | video |
| `Photo` | photo |
| `One` | 1 |
| `Two` | 2 |
| `Three` | 3 |
| `Four` | 4 |

View File

@@ -15,6 +15,7 @@ API Calls interacting with Plex Media Server Libraries
* [deleteLibrary](#deletelibrary) - Delete Library Section
* [getLibraryItems](#getlibraryitems) - Get Library Items
* [refreshLibrary](#refreshlibrary) - Refresh Library
* [searchLibrary](#searchlibrary) - Search Library
* [getMetadata](#getmetadata) - Get Items Metadata
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
* [getOnDeck](#getondeck) - Get On Deck
@@ -301,7 +302,6 @@ Fetches details from a specific section of the library identified by a section k
- `resolution`: Items categorized by resolution.
- `firstCharacter`: Items categorized by the first letter.
- `folder`: Items categorized by folder.
- `search?type=1`: Search functionality within the section.
### Example Usage
@@ -394,6 +394,71 @@ try {
**[?\LukeHagar\Plex_API\Models\Operations\RefreshLibraryResponse](../../Models/Operations/RefreshLibraryResponse.md)**
## searchLibrary
Search for content within a specific section of the library.
### Types
Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls:
- **Type Object Attributes**:
- `type`: Metadata type (if standard Plex type).
- `title`: Title for this content type (e.g., "Movies").
- **Filter Objects**:
- Subset of the media query language.
- Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`.
- **Sort Objects**:
- Description of sort fields.
- Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`.
> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
### Example Usage
```php
<?php
declare(strict_types=1);
require_once 'vendor/autoload.php';
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>';
$sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
try {
$response = $sdk->library->searchLibrary(933505, Operations\Type::Four);
if ($response->object !== null) {
// handle response
}
} catch (Exception $e) {
// handle exception
}
```
### Parameters
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `sectionId` | *int* | :heavy_check_mark: | the Id of the library to query |
| `type` | [\LukeHagar\Plex_API\Models\Operations\Type](../../Models/Operations/Type.md) | :heavy_check_mark: | Plex content type to search for |
### Response
**[?\LukeHagar\Plex_API\Models\Operations\SearchLibraryResponse](../../Models/Operations/SearchLibraryResponse.md)**
## getMetadata
This endpoint will return the metadata of a library item specified with the ratingKey.

View File

@@ -48,7 +48,7 @@ $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
try {
$request = new Operations\CreatePlaylistRequest();
$request->title = 'string';
$request->type = Operations\Type::Photo;
$request->type = Operations\QueryParamType::Photo;
$request->smart = Operations\Smart::One;
$request->uri = 'https://inborn-brochure.biz';
$request->playQueueID = 3686.33;;

View File

@@ -36,7 +36,7 @@ $sdk = Plex_API\PlexAPI::builder()->setSecurity($security)->build();
try {
$response = $sdk->security->getTransientToken(Operations\QueryParamType::Delegation, Operations\Scope::All);
$response = $sdk->security->getTransientToken(Operations\GetTransientTokenQueryParamType::Delegation, Operations\Scope::All);
if ($response->statusCode === 200) {
// handle response
@@ -48,10 +48,10 @@ try {
### Parameters
| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `type` | [\LukeHagar\Plex_API\Models\Operations\QueryParamType](../../Models/Operations/QueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `scope` | [\LukeHagar\Plex_API\Models\Operations\Scope](../../Models/Operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
| Parameter | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `type` | [\LukeHagar\Plex_API\Models\Operations\GetTransientTokenQueryParamType](../../Models/Operations/GetTransientTokenQueryParamType.md) | :heavy_check_mark: | `delegation` - This is the only supported `type` parameter. |
| `scope` | [\LukeHagar\Plex_API\Models\Operations\Scope](../../Models/Operations/Scope.md) | :heavy_check_mark: | `all` - This is the only supported `scope` parameter. |
### Response

View File

@@ -8,7 +8,7 @@ generation:
fixes:
nameResolutionDec2023: false
php:
version: 0.1.5
version: 0.1.6
imports:
option: openapi
paths:

View File

@@ -331,7 +331,6 @@ class Library
* - `resolution`: Items categorized by resolution.
* - `firstCharacter`: Items categorized by the first letter.
* - `folder`: Items categorized by folder.
* - `search?type=1`: Search functionality within the section.
*
*
* @param int $sectionId
@@ -421,6 +420,71 @@ class Library
return $response;
}
/**
* Search Library
*
* Search for content within a specific section of the library.
*
* ### Types
* Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls:
*
* - **Type Object Attributes**:
* - `type`: Metadata type (if standard Plex type).
* - `title`: Title for this content type (e.g., "Movies").
*
* - **Filter Objects**:
* - Subset of the media query language.
* - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`.
*
* - **Sort Objects**:
* - Description of sort fields.
* - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`.
*
* > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
*
*
* @param int $sectionId
* @param \LukeHagar\Plex_API\Models\Operations\Type $type
* @return \LukeHagar\Plex_API\Models\Operations\SearchLibraryResponse
*/
public function searchLibrary(
int $sectionId,
\LukeHagar\Plex_API\Models\Operations\Type $type,
): \LukeHagar\Plex_API\Models\Operations\SearchLibraryResponse
{
$request = new \LukeHagar\Plex_API\Models\Operations\SearchLibraryRequest();
$request->sectionId = $sectionId;
$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);
$options = ['http_errors' => false];
$options = array_merge_recursive($options, Utils\Utils::getQueryParams(\LukeHagar\Plex_API\Models\Operations\SearchLibraryRequest::class, $request, null));
$options['headers']['Accept'] = 'application/json';
$options['headers']['user-agent'] = $this->sdkConfiguration->userAgent;
$httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options);
$contentType = $httpResponse->getHeader('Content-Type')[0] ?? '';
$statusCode = $httpResponse->getStatusCode();
$response = new \LukeHagar\Plex_API\Models\Operations\SearchLibraryResponse();
$response->statusCode = $statusCode;
$response->contentType = $contentType;
$response->rawResponse = $httpResponse;
if ($httpResponse->getStatusCode() === 200) {
if (Utils\Utils::matchContentType($contentType, 'application/json')) {
$serializer = Utils\JSON::createSerializer();
$response->object = $serializer->deserialize((string)$httpResponse->getBody(), 'LukeHagar\Plex_API\Models\Operations\SearchLibraryResponseBody', 'json');
}
}
return $response;
}
/**
* Get Items Metadata
*

View File

@@ -22,10 +22,10 @@ class CreatePlaylistRequest
/**
* type of playlist to create
*
* @var \LukeHagar\Plex_API\Models\Operations\Type $type
* @var \LukeHagar\Plex_API\Models\Operations\QueryParamType $type
*/
#[SpeakeasyMetadata('queryParam:style=form,explode=true,name=type')]
public Type $type;
public QueryParamType $type;
/**
* whether the playlist is smart or not
@@ -54,7 +54,7 @@ class CreatePlaylistRequest
public function __construct()
{
$this->title = "";
$this->type = \LukeHagar\Plex_API\Models\Operations\Type::Audio;
$this->type = \LukeHagar\Plex_API\Models\Operations\QueryParamType::Audio;
$this->smart = \LukeHagar\Plex_API\Models\Operations\Smart::Zero;
$this->uri = "";
$this->playQueueID = null;

View File

@@ -0,0 +1,16 @@
<?php
/**
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
/** `delegation` - This is the only supported `type` parameter. */
enum GetTransientTokenQueryParamType: string
{
case Delegation = 'delegation';
}

View File

@@ -14,10 +14,10 @@ class GetTransientTokenRequest
/**
* `delegation` - This is the only supported `type` parameter.
*
* @var \LukeHagar\Plex_API\Models\Operations\QueryParamType $type
* @var \LukeHagar\Plex_API\Models\Operations\GetTransientTokenQueryParamType $type
*/
#[SpeakeasyMetadata('queryParam:style=form,explode=true,name=type')]
public QueryParamType $type;
public GetTransientTokenQueryParamType $type;
/**
* `all` - This is the only supported `scope` parameter.
@@ -29,7 +29,7 @@ class GetTransientTokenRequest
public function __construct()
{
$this->type = \LukeHagar\Plex_API\Models\Operations\QueryParamType::Delegation;
$this->type = \LukeHagar\Plex_API\Models\Operations\GetTransientTokenQueryParamType::Delegation;
$this->scope = \LukeHagar\Plex_API\Models\Operations\Scope::All;
}
}

View File

@@ -9,8 +9,10 @@ declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
/** `delegation` - This is the only supported `type` parameter. */
/** type of playlist to create */
enum QueryParamType: string
{
case Delegation = 'delegation';
case Audio = 'audio';
case Video = 'video';
case Photo = 'photo';
}

View File

@@ -0,0 +1,100 @@
<?php
/**
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
class SearchLibraryMediaContainer
{
#[\JMS\Serializer\Annotation\SerializedName('size')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $size = null;
#[\JMS\Serializer\Annotation\SerializedName('allowSync')]
#[\JMS\Serializer\Annotation\Type('bool')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?bool $allowSync = null;
#[\JMS\Serializer\Annotation\SerializedName('art')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $art = null;
#[\JMS\Serializer\Annotation\SerializedName('identifier')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $identifier = null;
#[\JMS\Serializer\Annotation\SerializedName('mediaTagPrefix')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $mediaTagPrefix = null;
#[\JMS\Serializer\Annotation\SerializedName('mediaTagVersion')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $mediaTagVersion = null;
#[\JMS\Serializer\Annotation\SerializedName('nocache')]
#[\JMS\Serializer\Annotation\Type('bool')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?bool $nocache = null;
#[\JMS\Serializer\Annotation\SerializedName('thumb')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $thumb = null;
#[\JMS\Serializer\Annotation\SerializedName('title1')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $title1 = null;
#[\JMS\Serializer\Annotation\SerializedName('title2')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $title2 = null;
#[\JMS\Serializer\Annotation\SerializedName('viewGroup')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $viewGroup = null;
#[\JMS\Serializer\Annotation\SerializedName('viewMode')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $viewMode = null;
/**
* $metadata
*
* @var ?array<\LukeHagar\Plex_API\Models\Operations\SearchLibraryMetadata> $metadata
*/
#[\JMS\Serializer\Annotation\SerializedName('Metadata')]
#[\JMS\Serializer\Annotation\Type('array<LukeHagar\Plex_API\Models\Operations\SearchLibraryMetadata>')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?array $metadata = null;
public function __construct()
{
$this->size = null;
$this->allowSync = null;
$this->art = null;
$this->identifier = null;
$this->mediaTagPrefix = null;
$this->mediaTagVersion = null;
$this->nocache = null;
$this->thumb = null;
$this->title1 = null;
$this->title2 = null;
$this->viewGroup = null;
$this->viewMode = null;
$this->metadata = null;
}
}

View File

@@ -0,0 +1,137 @@
<?php
/**
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
class SearchLibraryMetadata
{
#[\JMS\Serializer\Annotation\SerializedName('ratingKey')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $ratingKey = null;
#[\JMS\Serializer\Annotation\SerializedName('key')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $key = null;
#[\JMS\Serializer\Annotation\SerializedName('parentRatingKey')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentRatingKey = null;
#[\JMS\Serializer\Annotation\SerializedName('guid')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $guid = null;
#[\JMS\Serializer\Annotation\SerializedName('parentGuid')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentGuid = null;
#[\JMS\Serializer\Annotation\SerializedName('parentStudio')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentStudio = null;
#[\JMS\Serializer\Annotation\SerializedName('type')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $type = null;
#[\JMS\Serializer\Annotation\SerializedName('title')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $title = null;
#[\JMS\Serializer\Annotation\SerializedName('parentKey')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentKey = null;
#[\JMS\Serializer\Annotation\SerializedName('parentTitle')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentTitle = null;
#[\JMS\Serializer\Annotation\SerializedName('summary')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $summary = null;
#[\JMS\Serializer\Annotation\SerializedName('index')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $index = null;
#[\JMS\Serializer\Annotation\SerializedName('parentIndex')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $parentIndex = null;
#[\JMS\Serializer\Annotation\SerializedName('parentYear')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $parentYear = null;
#[\JMS\Serializer\Annotation\SerializedName('thumb')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $thumb = null;
#[\JMS\Serializer\Annotation\SerializedName('art')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $art = null;
#[\JMS\Serializer\Annotation\SerializedName('parentThumb')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentThumb = null;
#[\JMS\Serializer\Annotation\SerializedName('parentTheme')]
#[\JMS\Serializer\Annotation\Type('string')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?string $parentTheme = null;
#[\JMS\Serializer\Annotation\SerializedName('addedAt')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $addedAt = null;
#[\JMS\Serializer\Annotation\SerializedName('updatedAt')]
#[\JMS\Serializer\Annotation\Type('int')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?int $updatedAt = null;
public function __construct()
{
$this->ratingKey = null;
$this->key = null;
$this->parentRatingKey = null;
$this->guid = null;
$this->parentGuid = null;
$this->parentStudio = null;
$this->type = null;
$this->title = null;
$this->parentKey = null;
$this->parentTitle = null;
$this->summary = null;
$this->index = null;
$this->parentIndex = null;
$this->parentYear = null;
$this->thumb = null;
$this->art = null;
$this->parentThumb = null;
$this->parentTheme = null;
$this->addedAt = null;
$this->updatedAt = null;
}
}

View File

@@ -0,0 +1,35 @@
<?php
/**
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
use \LukeHagar\Plex_API\Utils\SpeakeasyMetadata;
class SearchLibraryRequest
{
/**
* the Id of the library to query
*
* @var int $sectionId
*/
#[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=sectionId')]
public int $sectionId;
/**
* Plex content type to search for
*
* @var \LukeHagar\Plex_API\Models\Operations\Type $type
*/
#[SpeakeasyMetadata('queryParam:style=form,explode=true,name=type')]
public Type $type;
public function __construct()
{
$this->sectionId = 0;
$this->type = \LukeHagar\Plex_API\Models\Operations\Type::One;
}
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
class SearchLibraryResponse
{
/**
* HTTP response content type for this operation
*
* @var string $contentType
*/
public string $contentType;
/**
* HTTP response status code for this operation
*
* @var int $statusCode
*/
public int $statusCode;
/**
* Raw HTTP response; suitable for custom response parsing
*
* @var ?\Psr\Http\Message\ResponseInterface $rawResponse
*/
public ?\Psr\Http\Message\ResponseInterface $rawResponse;
/**
* The contents of the library by section and type
*
* @var ?\LukeHagar\Plex_API\Models\Operations\SearchLibraryResponseBody $object
*/
public ?SearchLibraryResponseBody $object = null;
public function __construct()
{
$this->contentType = "";
$this->statusCode = 0;
$this->rawResponse = null;
$this->object = null;
}
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
/**
* SearchLibraryResponseBody - The contents of the library by section and type
*
* @package LukeHagar\Plex_API\Models\Operations
* @access public
*/
class SearchLibraryResponseBody
{
#[\JMS\Serializer\Annotation\SerializedName('MediaContainer')]
#[\JMS\Serializer\Annotation\Type('LukeHagar\Plex_API\Models\Operations\SearchLibraryMediaContainer')]
#[\JMS\Serializer\Annotation\SkipWhenEmpty]
public ?SearchLibraryMediaContainer $mediaContainer = null;
public function __construct()
{
$this->mediaContainer = null;
}
}

View File

@@ -31,5 +31,4 @@ enum Tag: string
case Resolution = 'resolution';
case FirstCharacter = 'firstCharacter';
case Folder = 'folder';
case SearchTypeEqual1 = 'search?type=1';
}

View File

@@ -9,10 +9,11 @@ declare(strict_types=1);
namespace LukeHagar\Plex_API\Models\Operations;
/** type of playlist to create */
enum Type: string
/** Plex content type to search for */
enum Type: int
{
case Audio = 'audio';
case Video = 'video';
case Photo = 'photo';
case One = 1;
case Two = 2;
case Three = 3;
case Four = 4;
}

View File

@@ -25,9 +25,9 @@ class SDKConfiguration
];
public string $language = 'php';
public string $openapiDocVersion = '0.0.3';
public string $sdkVersion = '0.1.5';
public string $sdkVersion = '0.1.6';
public string $genVersion = '2.237.3';
public string $userAgent = 'speakeasy-sdk/php 0.1.5 2.237.3 0.0.3 lukehagar/plex-api';
public string $userAgent = 'speakeasy-sdk/php 0.1.6 2.237.3 0.0.3 lukehagar/plex-api';
public function getServerUrl(): string

View File

@@ -27,12 +27,12 @@ class Security
* This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
*
*
* @param \LukeHagar\Plex_API\Models\Operations\QueryParamType $type
* @param \LukeHagar\Plex_API\Models\Operations\GetTransientTokenQueryParamType $type
* @param \LukeHagar\Plex_API\Models\Operations\Scope $scope
* @return \LukeHagar\Plex_API\Models\Operations\GetTransientTokenResponse
*/
public function getTransientToken(
\LukeHagar\Plex_API\Models\Operations\QueryParamType $type,
\LukeHagar\Plex_API\Models\Operations\GetTransientTokenQueryParamType $type,
\LukeHagar\Plex_API\Models\Operations\Scope $scope,
): \LukeHagar\Plex_API\Models\Operations\GetTransientTokenResponse
{