ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.161.0

This commit is contained in:
speakeasybot
2024-02-01 00:31:41 +00:00
parent 64a942a910
commit bbed03f967
208 changed files with 3319 additions and 46 deletions

View File

@@ -0,0 +1,5 @@
import Tv from "./tv/tv.mdx";
## Plex
<Tv />

View File

@@ -0,0 +1,3 @@
## Get Pin
Retrieve a Pin from Plex.tv for authentication flows

View File

@@ -0,0 +1,15 @@
{/* Autogenerated DO NOT EDIT */}
##### `x_plex_client_identifier` *{`str`}*
Plex Authentication Token
---
##### `strong` *{`Optional[bool]`}*
Determines the kind of code returned by the API call
Strong codes are used for Pin authentication flows
Non\-Strong codes are used for `Plex.tv/link`
---
##### `server_url` *{`Optional[str]`}*
An optional server URL to use.

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
import GetPinResponse from "/content/types/models/operations/get_pin_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetPinResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetPinResponse />
</Collapsible>

View File

@@ -0,0 +1,47 @@
<CH.Code>
```python GetPin.py
import plex_api
from plex_api.models import operations
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.plex.tv.get_pin(x_plex_client_identifier='string', strong=False)
if res.object is not None:
# handle response
pass
```
---
```json Example Response
{
"id": 1272322473,
"code": "3patfx1a78ukcbr7x0n9bl26t",
"product": "Plex Web",
"trusted": false,
"qr": "https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t",
"clientIdentifier": "Postman",
"location": {
"code": "US",
"european_union_member": false,
"continent_code": "NA",
"country": "United States",
"city": "Austin",
"time_zone": "America/Chicago",
"postal_code": 78732,
"in_privacy_restricted_country": false,
"subdivisions": "Texas",
"coordinates": "30.3768 -97.8935"
},
"expiresIn": 1800,
"createdAt": "2023-04-12T17:00:03Z",
"expiresAt": "2023-04-12T17:30:03Z",
"authToken": "string",
"newRegistration": "string"
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Plex* / *Tv*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,3 @@
## Get Token
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated

View File

@@ -0,0 +1,12 @@
{/* Autogenerated DO NOT EDIT */}
##### `pin_id` *{`str`}*
The PinID to retrieve an access token for
---
##### `x_plex_client_identifier` *{`str`}*
Plex Authentication Token
---
##### `server_url` *{`Optional[str]`}*
An optional server URL to use.

View File

@@ -0,0 +1,13 @@
{/* Autogenerated DO NOT EDIT */}
import GetTokenResponse from "/content/types/models/operations/get_token_response/python.mdx"
import Collapsible from "/src/components/Collapsible";
import Labels from "/src/lib/labels";
##### *{`operations.GetTokenResponse`}*
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
<GetTokenResponse />
</Collapsible>

View File

@@ -0,0 +1,31 @@
<CH.Code>
```python GetToken.py
import plex_api
from plex_api.models import operations
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.plex.tv.get_token(pin_id='string', x_plex_client_identifier='string')
if res.status_code == 200:
# handle response
pass
```
---
```json Example Response
{
"errors": [
{
"code": 1000,
"message": "X-Plex-Client-Identifier is missing",
"status": 400
}
]
}
```
</CH.Code>

View File

@@ -0,0 +1,12 @@
import CurlHeader from './_header.mdx';
import SDKHeader from './_header.mdx';
import OperationHeader from '/src/components/OperationHeader';
###### *Plex* / *Tv*
<OperationHeader
sdkHeader={<SDKHeader />}
curlHeader={<CurlHeader />}
/>
{/* render operation */}

View File

@@ -0,0 +1,15 @@
import GetPin from "./get_pin/get_pin.mdx";
import GetToken from "./get_token/get_token.mdx";
## Tv
### Available Operations
* [Get Pin](/python/plex/tv/get_pin) - Get a Pin
* [Get Token](/python/plex/tv/get_token) - Get Access Token
---
<GetPin />
---
<GetToken />

View File

@@ -10,6 +10,7 @@ import Hubs from "./hubs/hubs.mdx";
import Search from "./search/search.mdx";
import Library from "./library/library.mdx";
import Log from "./log/log.mdx";
import Plex from "./plex/plex.mdx";
import Playlists from "./playlists/playlists.mdx";
import Security from "./security/security.mdx";
import Sessions from "./sessions/sessions.mdx";
@@ -39,6 +40,9 @@ import Video from "./video/video.mdx";
---
<Log/>
---
<Plex/>
---
<Playlists/>

View File

@@ -45,6 +45,25 @@ s = plex_api.PlexAPI(
res = s.server.get_server_capabilities()
if res.object is not None:
# handle response
pass
```
### Override Server URL Per-Operation
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
```python
import plex_api
from plex_api.models import operations
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
)
res = s.plex.tv.get_pin(server_url="https://plex.tv/api/v2", x_plex_client_identifier='string', strong=False)
if res.object is not None:
# handle response
pass