mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-07 12:37:44 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.228.1
This commit is contained in:
@@ -27,6 +27,7 @@ except errors.SDKError as e:
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
{/* End Python Errors */}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import GetTransientToken from "./get_transient_token/get_transient_token.mdx";
|
||||
import GetSourceConnectionInformation from "./get_source_connection_information/get_source_connection_information.mdx";
|
||||
|
||||
## Authentication
|
||||
API Calls regarding authentication for Plex Media Server
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [Get Transient Token](/python/authentication/get_transient_token) - Get a Transient Token.
|
||||
* [Get Source Connection Information](/python/authentication/get_source_connection_information) - Get Source Connection Information
|
||||
|
||||
---
|
||||
<GetTransientToken />
|
||||
|
||||
---
|
||||
<GetSourceConnectionInformation />
|
||||
@@ -0,0 +1,4 @@
|
||||
## Get Source Connection Information
|
||||
|
||||
If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
|
||||
Note: requires Plex Media Server >= 1.15.4.
|
||||
@@ -0,0 +1,6 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `source` *{`str`}*
|
||||
The source identifier with an included prefix.
|
||||
<br/>
|
||||
**Example:** `server://client-identifier`
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetSourceConnectionInformationResponse from "/content/types/models/operations/get_source_connection_information_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.GetSourceConnectionInformationResponse`}*
|
||||
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetSourceConnectionInformationResponse />
|
||||
</Collapsible>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetSourceConnectionInformation.py
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.authentication.get_source_connection_information(source='server://client-identifier')
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
],
|
||||
"HttpMeta": {}
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -2,7 +2,7 @@ import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Plex*
|
||||
###### *Authentication*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
@@ -0,0 +1,3 @@
|
||||
## Get Transient Token
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,21 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetTransientTokenQueryParamType from "/content/types/models/operations/get_transient_token_query_param_type/python.mdx"
|
||||
import Scope from "/content/types/models/operations/scope/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### `type` *{`operations.GetTransientTokenQueryParamType`}*
|
||||
`delegation` \- This is the only supported `type` parameter.
|
||||
|
||||
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetTransientTokenQueryParamType />
|
||||
</Collapsible>
|
||||
|
||||
---
|
||||
##### `scope` *{`operations.Scope`}*
|
||||
`all` \- This is the only supported `scope` parameter.
|
||||
|
||||
<Collapsible openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<Scope />
|
||||
</Collapsible>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetTokenResponse from "/content/types/models/operations/get_token_response/python.mdx"
|
||||
import GetTransientTokenResponse from "/content/types/models/operations/get_transient_token_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.GetTokenResponse`}*
|
||||
##### *{`operations.GetTransientTokenResponse`}*
|
||||
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetTokenResponse />
|
||||
<GetTransientTokenResponse />
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetTransientToken.py
|
||||
import plex_api
|
||||
from plex_api.models import operations
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.authentication.get_transient_token(type=operations.GetTransientTokenQueryParamType.DELEGATION, scope=operations.Scope.ALL)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"errors": [
|
||||
{
|
||||
"code": 1001,
|
||||
"message": "User could not be authenticated",
|
||||
"status": 401
|
||||
}
|
||||
],
|
||||
"HttpMeta": {}
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -2,7 +2,7 @@ import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Plex*
|
||||
###### *Authentication*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
@@ -1,3 +0,0 @@
|
||||
## Get Pin
|
||||
|
||||
Retrieve a Pin from Plex.tv for authentication flows
|
||||
@@ -1,18 +0,0 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `x_plex_client_identifier` *{`str`}*
|
||||
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)
|
||||
|
||||
|
||||
---
|
||||
##### `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.
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{/* 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>
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetPin.py
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.plex.get_pin(x_plex_client_identifier='<value>', 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": "None",
|
||||
"newRegistration": "None"
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -1,3 +0,0 @@
|
||||
## Get Token
|
||||
|
||||
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
|
||||
@@ -1,15 +0,0 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `pin_id` *{`str`}*
|
||||
The PinID to retrieve an access token for
|
||||
|
||||
---
|
||||
##### `x_plex_client_identifier` *{`str`}*
|
||||
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)
|
||||
|
||||
|
||||
---
|
||||
##### `server_url` *{`Optional[str]`}*
|
||||
An optional server URL to use.
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetToken.py
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.plex.get_token(pin_id='<value>', x_plex_client_identifier='<value>')
|
||||
|
||||
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>
|
||||
@@ -13,7 +13,7 @@ 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 Authentication from "./authentication/authentication.mdx";
|
||||
import Statistics from "./statistics/statistics.mdx";
|
||||
import Sessions from "./sessions/sessions.mdx";
|
||||
import Updater from "./updater/updater.mdx";
|
||||
@@ -51,7 +51,7 @@ import Updater from "./updater/updater.mdx";
|
||||
<Playlists/>
|
||||
|
||||
---
|
||||
<Security/>
|
||||
<Authentication/>
|
||||
|
||||
---
|
||||
<Statistics/>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
## Get Statistics
|
||||
|
||||
This will return the media statistics for the server
|
||||
@@ -1,6 +0,0 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
##### `timespan` *{`Optional[int]`}*
|
||||
The timespan to retrieve statistics for
|
||||
the exact meaning of this parameter is not known
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{/* Autogenerated DO NOT EDIT */}
|
||||
import GetStatisticsResponse from "/content/types/models/operations/get_statistics_response/python.mdx"
|
||||
import Collapsible from "/src/components/Collapsible";
|
||||
import Labels from "/src/lib/labels";
|
||||
|
||||
##### *{`operations.GetStatisticsResponse`}*
|
||||
|
||||
<Collapsible defaultOpen openLabel={Labels.showProperties} closeLabel={Labels.hideProperties}>
|
||||
<GetStatisticsResponse />
|
||||
</Collapsible>
|
||||
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
|
||||
<CH.Code>
|
||||
```python GetStatistics.py
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.statistics.get_statistics(timespan=944669)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
```
|
||||
---
|
||||
|
||||
```json Example Response
|
||||
{
|
||||
"MediaContainer": {
|
||||
"size": 5497,
|
||||
"Device": [],
|
||||
"Account": [],
|
||||
"StatisticsMedia": []
|
||||
}
|
||||
}
|
||||
```
|
||||
</CH.Code>
|
||||
@@ -1,12 +0,0 @@
|
||||
import CurlHeader from './_header.mdx';
|
||||
import SDKHeader from './_header.mdx';
|
||||
import OperationHeader from '/src/components/OperationHeader';
|
||||
|
||||
###### *Statistics*
|
||||
|
||||
<OperationHeader
|
||||
sdkHeader={<SDKHeader />}
|
||||
curlHeader={<CurlHeader />}
|
||||
/>
|
||||
|
||||
{/* render operation */}
|
||||
@@ -1,12 +0,0 @@
|
||||
import GetStatistics from "./get_statistics/get_statistics.mdx";
|
||||
|
||||
## Statistics
|
||||
API Calls that perform operations with Plex Media Server Statistics
|
||||
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [Get Statistics](/python/statistics/get_statistics) - Get Media Statistics
|
||||
|
||||
---
|
||||
<GetStatistics />
|
||||
@@ -19,5 +19,6 @@ res = s.server.get_server_capabilities()
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
{/* End Python Security Options */}
|
||||
|
||||
@@ -22,6 +22,7 @@ res = s.server.get_server_capabilities()
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
#### Variables
|
||||
@@ -48,6 +49,7 @@ res = s.server.get_server_capabilities()
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Override Server URL Per-Operation
|
||||
@@ -56,9 +58,7 @@ The server URL can also be overridden on a per-operation basis, provided a serve
|
||||
```python
|
||||
import plex_api
|
||||
|
||||
s = plex_api.PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
)
|
||||
s = plex_api.PlexAPI()
|
||||
|
||||
|
||||
res = s.plex.get_pin(server_url="https://plex.tv/api/v2", x_plex_client_identifier='<value>', strong=False)
|
||||
@@ -66,5 +66,6 @@ res = s.plex.get_pin(server_url="https://plex.tv/api/v2", x_plex_client_identifi
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
{/* End Python Server Options */}
|
||||
|
||||
Reference in New Issue
Block a user