mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.4
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -7,13 +7,15 @@ generation:
|
||||
useClassNamesForArrayFields: true
|
||||
fixes:
|
||||
nameResolutionDec2023: true
|
||||
nameResolutionFeb2025: false
|
||||
parameterOrderingFeb2024: true
|
||||
requestResponseComponentNamesFeb2024: true
|
||||
securityFeb2025: false
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
python:
|
||||
version: 0.23.0
|
||||
version: 0.24.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
@@ -44,5 +46,6 @@ python:
|
||||
outputModelSuffix: output
|
||||
packageName: plex-api-client
|
||||
projectUrls: {}
|
||||
pytestTimeout: 0
|
||||
responseFormat: envelope
|
||||
templateVersion: v2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.488.0
|
||||
speakeasyVersion: 1.513.4
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -8,19 +8,19 @@ sources:
|
||||
- latest
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:0efb9039972533bf1190dfc1ffb377429a8e486b6299442e732f662c1ffbeca6
|
||||
sourceBlobDigest: sha256:038d73166cc9db17f514d511cfe4365ea032f4ebcb247fa86b7aa1bba0e1ab46
|
||||
sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
|
||||
sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1739232088
|
||||
- speakeasy-sdk-regen-1741392085
|
||||
targets:
|
||||
plexpy:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:0efb9039972533bf1190dfc1ffb377429a8e486b6299442e732f662c1ffbeca6
|
||||
sourceBlobDigest: sha256:038d73166cc9db17f514d511cfe4365ea032f4ebcb247fa86b7aa1bba0e1ab46
|
||||
sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
|
||||
sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
|
||||
codeSamplesNamespace: code-samples-python-plexpy
|
||||
codeSamplesRevisionDigest: sha256:ea7739f0814edaf28e2308c9478c39068ee69344b69a79449ce4540562cf9f37
|
||||
codeSamplesRevisionDigest: sha256:409d05f3fbbabe4d7f85ab58a2f14287c524e610e99207650bdab9dc0f6ad72d
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
43
README.md
43
README.md
@@ -139,6 +139,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
|
||||
# Synchronous Example
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -160,6 +161,7 @@ import asyncio
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
async def main():
|
||||
|
||||
async with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -327,6 +329,7 @@ To change the default retry strategy for a single API call, simply provide a `Re
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.utils import BackoffStrategy, RetryConfig
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -346,6 +349,7 @@ If you'd like to override the default retry strategy for all operations that sup
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.utils import BackoffStrategy, RetryConfig
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
@@ -389,6 +393,7 @@ When custom error responses are specified for an operation, the SDK may also rai
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import errors
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -420,16 +425,42 @@ with PlexAPI(
|
||||
### Server Variables
|
||||
|
||||
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following parameters are available when initializing the SDK client instance:
|
||||
* `protocol: models.ServerProtocol`
|
||||
* `ip: str`
|
||||
* `port: str`
|
||||
|
||||
| Variable | Parameter | Supported Values | Default | Description |
|
||||
| ---------- | --------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |
|
||||
| `protocol` | `protocol: models.ServerProtocol` | - `"http"`<br/>- `"https"` | `"https"` | The protocol to use for the server connection |
|
||||
| `ip` | `ip: str` | str | `"10.10.10.47"` | The IP address or hostname of your Plex Server |
|
||||
| `port` | `port: str` | str | `"32400"` | The port of your Plex Server |
|
||||
|
||||
#### Example
|
||||
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
protocol="https"
|
||||
ip="e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9"
|
||||
port="40311"
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.server.get_server_capabilities()
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
```
|
||||
|
||||
### Override Server URL Per-Client
|
||||
|
||||
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
||||
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
server_url="https://10.10.10.47:32400",
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
@@ -450,6 +481,7 @@ The server URL can also be overridden on a per-operation basis, provided a serve
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -560,6 +592,7 @@ To authenticate with the API the `access_token` parameter must be set when initi
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -584,6 +617,7 @@ The `PlexAPI` class implements the context manager protocol and registers a fina
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
def main():
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -592,6 +626,7 @@ def main():
|
||||
|
||||
# Or when using async:
|
||||
async def amain():
|
||||
|
||||
async with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
10
RELEASES.md
10
RELEASES.md
@@ -949,3 +949,13 @@ Based on:
|
||||
- [python v0.23.0] .
|
||||
### Releases
|
||||
- [PyPI v0.23.0] https://pypi.org/project/plex-api-client/0.23.0 - .
|
||||
|
||||
## 2025-03-08 00:01:10
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.513.4 (2.545.4) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.24.0] .
|
||||
### Releases
|
||||
- [PyPI v0.24.0] https://pypi.org/project/plex-api-client/0.24.0 - .
|
||||
2
USAGE.md
2
USAGE.md
@@ -3,6 +3,7 @@
|
||||
# Synchronous Example
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -24,6 +25,7 @@ import asyncio
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
async def main():
|
||||
|
||||
async with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
129
codeSamples.yaml
129
codeSamples.yaml
@@ -11,6 +11,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -29,6 +30,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -47,6 +49,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -65,6 +68,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -84,6 +88,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -113,6 +118,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -131,6 +137,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -149,6 +156,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -167,6 +175,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -185,6 +194,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -203,6 +213,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -222,6 +233,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -241,6 +253,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -259,6 +272,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -277,6 +291,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -295,6 +310,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -313,6 +329,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -331,6 +348,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_geo_data()
|
||||
@@ -347,6 +365,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -365,6 +384,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -379,11 +399,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: added
|
||||
label: get-recently-added
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -406,6 +427,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -424,6 +446,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -442,6 +465,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -456,10 +480,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: identity
|
||||
label: get-server-identity
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.server.get_server_identity()
|
||||
@@ -477,6 +502,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -495,6 +521,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -509,10 +536,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: data
|
||||
label: get-media-meta-data
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -542,10 +570,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: image
|
||||
label: get-banner-image
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -571,6 +600,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -585,10 +615,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: image
|
||||
label: get-thumb-image
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -614,6 +645,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -628,11 +660,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: library
|
||||
label: get-recently-added-library
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -665,11 +698,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: libraries
|
||||
label: get-search-all-libraries
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -690,10 +724,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: libraries
|
||||
label: get-all-libraries
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -708,11 +743,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: list
|
||||
label: get-watch-list
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -734,6 +770,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -748,10 +785,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: details
|
||||
label: get-library-details
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -766,11 +804,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: library
|
||||
label: get-actors-library
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -785,11 +824,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: library
|
||||
label: get-all-media-library
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -807,11 +847,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: library
|
||||
label: get-countries-library
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -826,11 +867,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: library
|
||||
label: get-genres-library
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -845,11 +887,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: metadata
|
||||
label: get-refresh-library-metadata
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -864,11 +907,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: library
|
||||
label: get-search-library
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -883,11 +927,12 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: items
|
||||
label: get-library-items
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -911,6 +956,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -929,13 +975,14 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.log.log_multi_line(request="level=4&message=Test%20message%201&source=postman\n" +
|
||||
"level=3&message=Test%20message%202&source=postman\n" +
|
||||
"level=1&message=Test%20message%203&source=postman")
|
||||
res = plex_api.log.log_multi_line(request=("level=4&message=Test%20message%201&source=postman\n"
|
||||
"level=3&message=Test%20message%202&source=postman\n"
|
||||
"level=1&message=Test%20message%203&source=postman"))
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -949,6 +996,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -963,10 +1011,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: providers
|
||||
label: get-media-providers
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -985,6 +1034,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1004,6 +1054,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1030,6 +1081,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_pin(request={
|
||||
@@ -1052,6 +1104,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_token_by_pin_id(request={
|
||||
@@ -1075,6 +1128,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1094,6 +1148,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1118,6 +1173,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1136,6 +1192,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1154,6 +1211,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1172,6 +1230,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1190,6 +1249,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1209,6 +1269,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1227,6 +1288,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1241,10 +1303,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: resources
|
||||
label: get-server-resources
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1263,6 +1326,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1281,6 +1345,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1300,6 +1365,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1318,6 +1384,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1336,6 +1403,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1354,6 +1422,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1372,6 +1441,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1390,6 +1460,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1408,6 +1479,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1426,6 +1498,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1444,6 +1517,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1463,6 +1537,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1482,6 +1557,7 @@ actions:
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1500,6 +1576,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1518,6 +1595,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -1532,10 +1610,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: users
|
||||
label: get-users
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.users.get_users(request={
|
||||
@@ -1562,10 +1641,11 @@ actions:
|
||||
update:
|
||||
x-codeSamples:
|
||||
- lang: python
|
||||
label: data
|
||||
label: post-users-sign-in-data
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.authentication.post_users_sign_in_data(request={
|
||||
@@ -1593,6 +1673,7 @@ actions:
|
||||
source: |-
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -27,7 +27,6 @@ Logged in user details
|
||||
| `services` | List[[operations.Services](../../models/operations/services.md)] | :heavy_check_mark: | N/A | |
|
||||
| `subscription` | [operations.Subscription](../../models/operations/subscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | |
|
||||
| `subscription_description` | *Nullable[str]* | :heavy_check_mark: | Description of the Plex Pass subscription | |
|
||||
| `subscriptions` | List[[operations.GetTokenDetailsSubscription](../../models/operations/gettokendetailssubscription.md)] | :heavy_check_mark: | N/A | |
|
||||
| `thumb` | *str* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 |
|
||||
| `title` | *str* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle |
|
||||
| `username` | *str* | :heavy_check_mark: | The account username | Username |
|
||||
@@ -47,4 +46,5 @@ Logged in user details
|
||||
| `protected` | *Optional[bool]* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
|
||||
| `restricted` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
|
||||
| `roles` | List[*str*] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
|
||||
| `subscriptions` | List[[operations.GetTokenDetailsSubscription](../../models/operations/gettokendetailssubscription.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `two_factor_enabled` | *Optional[bool]* | :heavy_minus_sign: | If two-factor authentication is enabled | |
|
||||
@@ -27,7 +27,6 @@ Returns the user account data with a valid auth token
|
||||
| `services` | List[[operations.PostUsersSignInDataServices](../../models/operations/postuserssignindataservices.md)] | :heavy_check_mark: | N/A | |
|
||||
| `subscription` | [operations.PostUsersSignInDataSubscription](../../models/operations/postuserssignindatasubscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | |
|
||||
| `subscription_description` | *Nullable[str]* | :heavy_check_mark: | Description of the Plex Pass subscription | |
|
||||
| `subscriptions` | List[[operations.PostUsersSignInDataAuthenticationSubscription](../../models/operations/postuserssignindataauthenticationsubscription.md)] | :heavy_check_mark: | N/A | |
|
||||
| `thumb` | *str* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 |
|
||||
| `title` | *str* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle |
|
||||
| `username` | *str* | :heavy_check_mark: | The account username | Username |
|
||||
@@ -49,4 +48,5 @@ Returns the user account data with a valid auth token
|
||||
| `protected` | *Optional[bool]* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
|
||||
| `restricted` | *Optional[bool]* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
|
||||
| `roles` | List[*str*] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
|
||||
| `subscriptions` | List[[operations.PostUsersSignInDataAuthenticationSubscription](../../models/operations/postuserssignindataauthenticationsubscription.md)] | :heavy_minus_sign: | N/A | |
|
||||
| `two_factor_enabled` | *Optional[bool]* | :heavy_minus_sign: | If two-factor authentication is enabled | |
|
||||
@@ -26,6 +26,7 @@ Get Server Activities
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -66,6 +67,7 @@ Cancel Server Activities
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -24,6 +24,7 @@ This endpoint provides the caller with a temporary token with the same access le
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -68,6 +69,7 @@ Note: requires Plex Media Server >= 1.15.4.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -109,6 +111,7 @@ Get the User data from the provided X-Plex-Token
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -150,6 +153,7 @@ Sign in user with username and password and return user data with Plex authentic
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.authentication.post_users_sign_in_data(request={
|
||||
|
||||
@@ -23,6 +23,7 @@ Returns a list of butler tasks
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -68,6 +69,7 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -109,6 +111,7 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -155,6 +158,7 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -198,6 +202,7 @@ This endpoint will stop a currently running task by name, or remove it from the
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -21,6 +21,7 @@ Get Global Hubs filtered by the parameters provided.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -65,6 +66,7 @@ This endpoint will return the recently added content.
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -109,6 +111,7 @@ This endpoint will return a list of library specific hubs
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -35,6 +35,7 @@ This resource returns hash values for local files
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -79,6 +80,7 @@ This endpoint will return the recently added content.
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -144,6 +146,7 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -223,6 +226,7 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -265,6 +269,7 @@ Delete a library using a specific section id
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -328,6 +333,7 @@ Fetches details from a specific section of the library identified by a section k
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -375,6 +381,7 @@ Retrieves a list of all general media data for this library.
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -421,6 +428,7 @@ This endpoint Refreshes all the Metadata of the library.
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -482,6 +490,7 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -526,6 +535,7 @@ Retrieves a list of all the genres that are found for the media in this library.
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -570,6 +580,7 @@ Retrieves a list of all the countries that are found for the media in this libra
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -614,6 +625,7 @@ Retrieves a list of all the actors that are found for the media in this library.
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -658,6 +670,7 @@ Search the provided query across all library sections, or a single section, and
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -706,6 +719,7 @@ This endpoint will return all the (meta)data of a library item specified with by
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -763,6 +777,7 @@ This endpoint will return the children of of a library item specified with the r
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -807,6 +822,7 @@ This endpoint will return the top watched content from libraries of a certain ty
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -850,6 +866,7 @@ This endpoint will return the on deck content.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -23,6 +23,7 @@ This endpoint will write a single-line log message, including a level and source
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -87,13 +88,14 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.log.log_multi_line(request="level=4&message=Test%20message%201&source=postman\n" +
|
||||
"level=3&message=Test%20message%202&source=postman\n" +
|
||||
"level=1&message=Test%20message%203&source=postman")
|
||||
res = plex_api.log.log_multi_line(request=("level=4&message=Test%20message%201&source=postman\n"
|
||||
"level=3&message=Test%20message%202&source=postman\n"
|
||||
"level=1&message=Test%20message%203&source=postman"))
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -131,6 +133,7 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -23,6 +23,7 @@ This will mark the provided media key as Played.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -64,6 +65,7 @@ This will mark the provided media key as Unplayed.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -106,6 +108,7 @@ This API command can be used to update the play progress of a media item.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -149,6 +152,7 @@ Gets the banner image of the media item
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -197,6 +201,7 @@ Gets the thumbnail image of the media item
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -34,6 +34,7 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -80,6 +81,7 @@ Get All Playlists given the specified filters.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -124,6 +126,7 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -166,6 +169,7 @@ This endpoint will delete a playlist
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -208,6 +212,7 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -256,6 +261,7 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -299,6 +305,7 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -342,6 +349,7 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -387,6 +395,7 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -25,6 +25,7 @@ Get Companions Data
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -66,6 +67,7 @@ Get friends of provided auth token.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -107,6 +109,7 @@ Returns the geolocation and locale data of the caller
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_geo_data()
|
||||
@@ -146,6 +149,7 @@ Retrieves the home data for the authenticated user, including details like home
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -186,6 +190,7 @@ Get Plex server access tokens and server connections
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -231,6 +236,7 @@ Retrieve a Pin ID from Plex.tv to use for authentication flows
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_pin(request={
|
||||
@@ -276,6 +282,7 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_token_by_pin_id(request={
|
||||
|
||||
@@ -33,6 +33,7 @@ This request is intended to be very fast, and called as the user types.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -80,6 +81,7 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -123,6 +125,7 @@ This will search the database for the string provided.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -27,6 +27,7 @@ Get Server Capabilities
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -67,6 +68,7 @@ Get Server Preferences
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -107,6 +109,7 @@ Get Available Clients
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -147,6 +150,7 @@ Get Devices
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -187,6 +191,7 @@ This request is useful to determine if the server is online or offline
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.server.get_server_identity()
|
||||
@@ -224,6 +229,7 @@ Returns MyPlex Account Information
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -266,6 +272,7 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -315,6 +322,7 @@ Retrieves media providers and their features from the Plex server.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -356,6 +364,7 @@ Get Server List
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -22,6 +22,7 @@ This will retrieve the "Now Playing" Information of the PMS.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -62,6 +63,7 @@ This will Retrieve a listing of all history views.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -106,6 +108,7 @@ Get Transcode Sessions
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -146,6 +149,7 @@ Stop a Transcode Session
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -21,6 +21,7 @@ This will return the media statistics for the server
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -62,6 +63,7 @@ This will return the resources for the server
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -103,6 +105,7 @@ This will return the bandwidth statistics for the server
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -22,6 +22,7 @@ Querying status of updates
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -63,6 +64,7 @@ Checking for updates
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -106,6 +108,7 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -16,6 +16,7 @@ Get list of all users that are friends and have library access with the provided
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.users.get_users(request={
|
||||
|
||||
@@ -21,6 +21,7 @@ Get the timeline for a media item
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
@@ -73,6 +74,7 @@ Begin a Universal Transcode Session
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
@@ -20,6 +20,7 @@ Get User Watchlist
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
29
poetry.lock
generated
29
poetry.lock
generated
@@ -1,4 +1,4 @@
|
||||
# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "annotated-types"
|
||||
@@ -32,7 +32,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
|
||||
|
||||
[package.extras]
|
||||
doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
|
||||
test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
|
||||
test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\""]
|
||||
trio = ["trio (>=0.23)"]
|
||||
|
||||
[[package]]
|
||||
@@ -175,7 +175,7 @@ httpcore = "==1.*"
|
||||
idna = "*"
|
||||
|
||||
[package.extras]
|
||||
brotli = ["brotli", "brotlicffi"]
|
||||
brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""]
|
||||
cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"]
|
||||
http2 = ["h2 (>=3,<5)"]
|
||||
socks = ["socksio (==1.*)"]
|
||||
@@ -286,7 +286,7 @@ version = "1.0.0"
|
||||
description = "Type system extensions for programs checked with the mypy type checker."
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
groups = ["main", "dev"]
|
||||
groups = ["dev"]
|
||||
files = [
|
||||
{file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
|
||||
{file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
|
||||
@@ -328,7 +328,7 @@ typing-extensions = ">=4.12.2"
|
||||
|
||||
[package.extras]
|
||||
email = ["email-validator (>=2.0.0)"]
|
||||
timezone = ["tzdata"]
|
||||
timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""]
|
||||
|
||||
[[package]]
|
||||
name = "pydantic-core"
|
||||
@@ -461,7 +461,7 @@ colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
||||
dill = [
|
||||
{version = ">=0.2", markers = "python_version < \"3.11\""},
|
||||
{version = ">=0.3.7", markers = "python_version >= \"3.12\""},
|
||||
{version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""},
|
||||
{version = ">=0.3.6", markers = "python_version == \"3.11\""},
|
||||
]
|
||||
isort = ">=4.2.5,<5.13.0 || >5.13.0,<6"
|
||||
mccabe = ">=0.6,<0.8"
|
||||
@@ -563,22 +563,21 @@ files = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typing-inspect"
|
||||
version = "0.9.0"
|
||||
description = "Runtime inspection utilities for typing module."
|
||||
name = "typing-inspection"
|
||||
version = "0.4.0"
|
||||
description = "Runtime typing introspection tools"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"},
|
||||
{file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"},
|
||||
{file = "typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f"},
|
||||
{file = "typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
mypy-extensions = ">=0.3.0"
|
||||
typing-extensions = ">=3.7.4"
|
||||
typing-extensions = ">=4.12.0"
|
||||
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.9"
|
||||
content-hash = "1f0dcb22a1bf4d933c50fbaab2e7f694592f680adf1171c2dc13507e4259a9c0"
|
||||
content-hash = "a287b0496a874e000c887363ddbaaa37fd0b896491785c7e9eccaee92e0bf43b"
|
||||
|
||||
5
pylintrc
5
pylintrc
@@ -457,7 +457,10 @@ disable=raw-checker-failed,
|
||||
bare-except,
|
||||
broad-exception-caught,
|
||||
fixme,
|
||||
relative-beyond-top-level
|
||||
relative-beyond-top-level,
|
||||
consider-using-with,
|
||||
wildcard-import,
|
||||
unused-wildcard-import
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "plex-api-client"
|
||||
version = "0.23.0"
|
||||
version = "0.24.0"
|
||||
description = "Python Client SDK Generated by Speakeasy"
|
||||
authors = [{ name = "Speakeasy" },]
|
||||
readme = "README-PYPI.md"
|
||||
@@ -10,7 +10,7 @@ dependencies = [
|
||||
"httpx >=0.28.1",
|
||||
"pydantic >=2.10.3",
|
||||
"python-dateutil >=2.8.2",
|
||||
"typing-inspect >=0.9.0",
|
||||
"typing-inspection >=0.4.0",
|
||||
]
|
||||
|
||||
[tool.poetry]
|
||||
|
||||
@@ -4,7 +4,7 @@ import re
|
||||
import shutil
|
||||
|
||||
try:
|
||||
with open("README.md", "r") as rh:
|
||||
with open("README.md", "r", encoding="utf-8") as rh:
|
||||
readme_contents = rh.read()
|
||||
GITHUB_URL = "https://github.com/LukeHagar/plexpy.git"
|
||||
GITHUB_URL = (
|
||||
@@ -21,13 +21,13 @@ try:
|
||||
readme_contents,
|
||||
)
|
||||
|
||||
with open("README-PYPI.md", "w") as wh:
|
||||
with open("README-PYPI.md", "w", encoding="utf-8") as wh:
|
||||
wh.write(readme_contents)
|
||||
except Exception as e:
|
||||
try:
|
||||
print("Failed to rewrite README.md to README-PYPI.md, copying original instead")
|
||||
print(e)
|
||||
shutil.copyfile("README.md", "README-PYPI.md")
|
||||
except Exception as e:
|
||||
except Exception as ie:
|
||||
print("Failed to copy README.md to README-PYPI.md")
|
||||
print(e)
|
||||
print(ie)
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN}
|
||||
|
||||
poetry run python scripts/prepare-readme.py
|
||||
poetry run python scripts/prepare_readme.py
|
||||
|
||||
poetry publish --build --skip-existing
|
||||
|
||||
@@ -7,16 +7,19 @@ from typing import Any, Callable, List, Optional, Tuple, Union
|
||||
|
||||
|
||||
class HookContext:
|
||||
base_url: str
|
||||
operation_id: str
|
||||
oauth2_scopes: Optional[List[str]] = None
|
||||
security_source: Optional[Union[Any, Callable[[], Any]]] = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
base_url: str,
|
||||
operation_id: str,
|
||||
oauth2_scopes: Optional[List[str]],
|
||||
security_source: Optional[Union[Any, Callable[[], Any]]],
|
||||
):
|
||||
self.base_url = base_url
|
||||
self.operation_id = operation_id
|
||||
self.oauth2_scopes = oauth2_scopes
|
||||
self.security_source = security_source
|
||||
@@ -25,21 +28,30 @@ class HookContext:
|
||||
class BeforeRequestContext(HookContext):
|
||||
def __init__(self, hook_ctx: HookContext):
|
||||
super().__init__(
|
||||
hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
|
||||
hook_ctx.base_url,
|
||||
hook_ctx.operation_id,
|
||||
hook_ctx.oauth2_scopes,
|
||||
hook_ctx.security_source,
|
||||
)
|
||||
|
||||
|
||||
class AfterSuccessContext(HookContext):
|
||||
def __init__(self, hook_ctx: HookContext):
|
||||
super().__init__(
|
||||
hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
|
||||
hook_ctx.base_url,
|
||||
hook_ctx.operation_id,
|
||||
hook_ctx.oauth2_scopes,
|
||||
hook_ctx.security_source,
|
||||
)
|
||||
|
||||
|
||||
class AfterErrorContext(HookContext):
|
||||
def __init__(self, hook_ctx: HookContext):
|
||||
super().__init__(
|
||||
hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source
|
||||
hook_ctx.base_url,
|
||||
hook_ctx.operation_id,
|
||||
hook_ctx.oauth2_scopes,
|
||||
hook_ctx.security_source,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "plex-api-client"
|
||||
__version__: str = "0.23.0"
|
||||
__version__: str = "0.24.0"
|
||||
__openapi_doc_version__: str = "0.0.3"
|
||||
__gen_version__: str = "2.506.0"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.23.0 2.506.0 0.0.3 plex-api-client"
|
||||
__gen_version__: str = "2.545.4"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.24.0 2.545.4 0.0.3 plex-api-client"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -43,6 +43,8 @@ class Activities(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/activities",
|
||||
@@ -69,6 +71,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerActivities",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -144,6 +147,8 @@ class Activities(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/activities",
|
||||
@@ -170,6 +175,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerActivities",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -247,6 +253,8 @@ class Activities(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.CancelServerActivitiesRequest(
|
||||
activity_uuid=activity_uuid,
|
||||
@@ -278,6 +286,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="cancelServerActivities",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -352,6 +361,8 @@ class Activities(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.CancelServerActivitiesRequest(
|
||||
activity_uuid=activity_uuid,
|
||||
@@ -383,6 +394,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="cancelServerActivities",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -40,6 +40,8 @@ class Authentication(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetTransientTokenRequest(
|
||||
type=type_,
|
||||
@@ -72,6 +74,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTransientToken",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -149,6 +152,8 @@ class Authentication(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetTransientTokenRequest(
|
||||
type=type_,
|
||||
@@ -181,6 +186,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTransientToken",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -257,6 +263,8 @@ class Authentication(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSourceConnectionInformationRequest(
|
||||
source=source,
|
||||
@@ -288,6 +296,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSourceConnectionInformation",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -364,6 +373,8 @@ class Authentication(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSourceConnectionInformationRequest(
|
||||
source=source,
|
||||
@@ -395,6 +406,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSourceConnectionInformation",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -495,6 +507,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenDetails",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -598,6 +611,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenDetails",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -717,6 +731,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="post-users-sign-in-data",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
@@ -837,6 +852,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="post-users-sign-in-data",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
|
||||
@@ -232,6 +232,10 @@ class BaseSDK:
|
||||
req.headers,
|
||||
get_body_content(req),
|
||||
)
|
||||
|
||||
if client is None:
|
||||
raise ValueError("client is required")
|
||||
|
||||
http_res = client.send(req, stream=stream)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(
|
||||
@@ -304,6 +308,10 @@ class BaseSDK:
|
||||
req.headers,
|
||||
get_body_content(req),
|
||||
)
|
||||
|
||||
if client is None:
|
||||
raise ValueError("client is required")
|
||||
|
||||
http_res = await client.send(req, stream=stream)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(
|
||||
|
||||
@@ -35,6 +35,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/butler",
|
||||
@@ -61,6 +63,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getButlerTasks",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -136,6 +139,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/butler",
|
||||
@@ -162,6 +167,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getButlerTasks",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -242,6 +248,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="POST",
|
||||
path="/butler",
|
||||
@@ -268,6 +276,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="startAllTasks",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -345,6 +354,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="POST",
|
||||
path="/butler",
|
||||
@@ -371,6 +382,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="startAllTasks",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -444,6 +456,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="DELETE",
|
||||
path="/butler",
|
||||
@@ -470,6 +484,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="stopAllTasks",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -543,6 +558,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="DELETE",
|
||||
path="/butler",
|
||||
@@ -569,6 +586,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="stopAllTasks",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -648,6 +666,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.StartTaskRequest(
|
||||
task_name=task_name,
|
||||
@@ -679,6 +699,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="startTask",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -758,6 +779,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.StartTaskRequest(
|
||||
task_name=task_name,
|
||||
@@ -789,6 +812,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="startTask",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -864,6 +888,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.StopTaskRequest(
|
||||
task_name=task_name,
|
||||
@@ -895,6 +921,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTask",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -970,6 +997,8 @@ class Butler(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.StopTaskRequest(
|
||||
task_name=task_name,
|
||||
@@ -1001,6 +1030,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTask",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -94,7 +94,9 @@ class ClientOwner(Protocol):
|
||||
def close_clients(
|
||||
owner: ClientOwner,
|
||||
sync_client: Union[HttpClient, None],
|
||||
sync_client_supplied: bool,
|
||||
async_client: Union[AsyncHttpClient, None],
|
||||
async_client_supplied: bool,
|
||||
) -> None:
|
||||
"""
|
||||
A finalizer function that is meant to be used with weakref.finalize to close
|
||||
@@ -107,13 +109,13 @@ def close_clients(
|
||||
owner.client = None
|
||||
owner.async_client = None
|
||||
|
||||
if sync_client is not None:
|
||||
if sync_client is not None and not sync_client_supplied:
|
||||
try:
|
||||
sync_client.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if async_client is not None:
|
||||
if async_client is not None and not async_client_supplied:
|
||||
is_async = False
|
||||
try:
|
||||
asyncio.get_running_loop()
|
||||
|
||||
@@ -39,6 +39,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetGlobalHubsRequest(
|
||||
count=count,
|
||||
@@ -71,6 +73,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getGlobalHubs",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -150,6 +153,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetGlobalHubsRequest(
|
||||
count=count,
|
||||
@@ -182,6 +187,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getGlobalHubs",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -263,6 +269,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetRecentlyAddedRequest)
|
||||
@@ -294,6 +302,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -362,6 +371,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetRecentlyAddedRequest)
|
||||
@@ -393,6 +404,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -462,6 +474,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetLibraryHubsRequest(
|
||||
section_id=section_id,
|
||||
@@ -495,6 +509,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getLibraryHubs",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -577,6 +592,8 @@ class Hubs(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetLibraryHubsRequest(
|
||||
section_id=section_id,
|
||||
@@ -610,6 +627,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getLibraryHubs",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -39,6 +39,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetFileHashRequest(
|
||||
url=url,
|
||||
@@ -71,6 +73,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getFileHash",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -147,6 +150,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetFileHashRequest(
|
||||
url=url,
|
||||
@@ -179,6 +184,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getFileHash",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -257,6 +263,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(
|
||||
@@ -290,6 +298,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -372,6 +381,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(
|
||||
@@ -405,6 +416,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -487,6 +499,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/library/sections",
|
||||
@@ -513,6 +527,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -594,6 +609,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/library/sections",
|
||||
@@ -620,6 +637,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -740,6 +758,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetLibraryDetailsRequest(
|
||||
include_details=include_details,
|
||||
@@ -772,6 +792,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-details",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -892,6 +913,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetLibraryDetailsRequest(
|
||||
include_details=include_details,
|
||||
@@ -924,6 +947,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-details",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1001,6 +1025,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.DeleteLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -1032,6 +1058,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="deleteLibrary",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1106,6 +1133,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.DeleteLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -1137,6 +1166,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="deleteLibrary",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1235,6 +1265,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetLibraryItemsRequest)
|
||||
@@ -1266,6 +1298,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-items",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1367,6 +1400,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetLibraryItemsRequest)
|
||||
@@ -1398,6 +1433,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-items",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1479,6 +1515,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetAllMediaLibraryRequest)
|
||||
@@ -1510,6 +1548,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-media-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1591,6 +1630,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetAllMediaLibraryRequest)
|
||||
@@ -1622,6 +1663,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-media-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1702,6 +1744,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetRefreshLibraryMetadataRequest(
|
||||
force=force,
|
||||
@@ -1734,6 +1778,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-refresh-library-metadata",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1811,6 +1856,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetRefreshLibraryMetadataRequest(
|
||||
force=force,
|
||||
@@ -1843,6 +1890,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-refresh-library-metadata",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1937,6 +1985,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSearchLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -1969,6 +2019,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2066,6 +2117,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSearchLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2098,6 +2151,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2178,6 +2232,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetGenresLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2210,6 +2266,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-genres-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2290,6 +2347,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetGenresLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2322,6 +2381,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-genres-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2402,6 +2462,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetCountriesLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2434,6 +2496,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-countries-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2514,6 +2577,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetCountriesLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2546,6 +2611,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-countries-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2626,6 +2692,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetActorsLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2658,6 +2726,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-actors-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2738,6 +2807,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetActorsLibraryRequest(
|
||||
section_key=section_key,
|
||||
@@ -2770,6 +2841,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-actors-library",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2851,6 +2923,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetSearchAllLibrariesRequest)
|
||||
@@ -2882,6 +2956,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -2964,6 +3039,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetSearchAllLibrariesRequest)
|
||||
@@ -2995,6 +3072,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3077,6 +3155,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetMediaMetaDataRequest)
|
||||
@@ -3108,6 +3188,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-meta-data",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3189,6 +3270,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetMediaMetaDataRequest)
|
||||
@@ -3220,6 +3303,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-meta-data",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3300,6 +3384,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetMetadataChildrenRequest(
|
||||
rating_key=rating_key,
|
||||
@@ -3332,6 +3418,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getMetadataChildren",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3412,6 +3499,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetMetadataChildrenRequest(
|
||||
rating_key=rating_key,
|
||||
@@ -3444,6 +3533,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getMetadataChildren",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3524,6 +3614,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetTopWatchedContentRequest(
|
||||
include_guids=include_guids,
|
||||
@@ -3556,6 +3648,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTopWatchedContent",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3636,6 +3729,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetTopWatchedContentRequest(
|
||||
include_guids=include_guids,
|
||||
@@ -3668,6 +3763,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTopWatchedContent",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3744,6 +3840,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/library/onDeck",
|
||||
@@ -3770,6 +3868,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getOnDeck",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -3846,6 +3945,8 @@ class Library(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/library/onDeck",
|
||||
@@ -3872,6 +3973,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getOnDeck",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -42,6 +42,8 @@ class Log(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.LogLineRequest(
|
||||
level=level,
|
||||
@@ -75,6 +77,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="logLine",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -154,6 +157,8 @@ class Log(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.LogLineRequest(
|
||||
level=level,
|
||||
@@ -187,6 +192,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="logLine",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -282,6 +288,8 @@ class Log(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
req = self._build_request(
|
||||
method="POST",
|
||||
@@ -312,6 +320,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="logMultiLine",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -407,6 +416,8 @@ class Log(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
req = self._build_request_async(
|
||||
method="POST",
|
||||
@@ -437,6 +448,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="logMultiLine",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -510,6 +522,8 @@ class Log(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/log/networked",
|
||||
@@ -536,6 +550,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="enablePaperTrail",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -609,6 +624,8 @@ class Log(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/log/networked",
|
||||
@@ -635,6 +652,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="enablePaperTrail",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -37,6 +37,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.MarkPlayedRequest(
|
||||
key=key,
|
||||
@@ -68,6 +70,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="markPlayed",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -142,6 +145,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.MarkPlayedRequest(
|
||||
key=key,
|
||||
@@ -173,6 +178,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="markPlayed",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -247,6 +253,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.MarkUnplayedRequest(
|
||||
key=key,
|
||||
@@ -278,6 +286,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="markUnplayed",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -352,6 +361,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.MarkUnplayedRequest(
|
||||
key=key,
|
||||
@@ -383,6 +394,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="markUnplayed",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -462,6 +474,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.UpdatePlayProgressRequest(
|
||||
key=key,
|
||||
@@ -495,6 +509,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlayProgress",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -574,6 +589,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.UpdatePlayProgressRequest(
|
||||
key=key,
|
||||
@@ -607,6 +624,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlayProgress",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -683,6 +701,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetBannerImageRequest)
|
||||
@@ -714,6 +734,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-banner-image",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -795,6 +816,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetBannerImageRequest)
|
||||
@@ -826,6 +849,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-banner-image",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -907,6 +931,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetThumbImageRequest)
|
||||
@@ -938,6 +964,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-thumb-image",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1019,6 +1046,8 @@ class Media(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetThumbImageRequest)
|
||||
@@ -1050,6 +1079,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-thumb-image",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
4
src/plex_api_client/models/__init__.py
Normal file
4
src/plex_api_client/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
# package
|
||||
|
||||
@@ -11,6 +11,7 @@ from pydantic import model_serializer
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_SERVER_RESOURCES_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ from pydantic import model_serializer
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_USERS_SERVERS = [
|
||||
"https://plex.tv/api",
|
||||
]
|
||||
|
||||
@@ -15,6 +15,7 @@ import pydantic
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_WATCH_LIST_SERVERS = [
|
||||
# The plex metadata provider server
|
||||
"https://metadata.provider.plex.tv",
|
||||
|
||||
@@ -7,6 +7,7 @@ import pydantic
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_COMPANIONS_DATA_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
|
||||
@@ -6,6 +6,7 @@ from plex_api_client.types import BaseModel
|
||||
from typing import Optional
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_GEO_DATA_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ from pydantic import model_serializer
|
||||
from typing import Any, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_PIN_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ from pydantic import model_serializer
|
||||
from typing import Any, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_TOKEN_BY_PIN_ID_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
|
||||
@@ -15,6 +15,7 @@ from pydantic import model_serializer
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_TOKEN_DETAILS_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
@@ -415,7 +416,6 @@ class GetTokenDetailsUserPlexAccountTypedDict(TypedDict):
|
||||
r"""If the account’s Plex Pass subscription is active"""
|
||||
subscription_description: Nullable[str]
|
||||
r"""Description of the Plex Pass subscription"""
|
||||
subscriptions: List[GetTokenDetailsSubscriptionTypedDict]
|
||||
thumb: str
|
||||
r"""URL of the account thumbnail"""
|
||||
title: str
|
||||
@@ -453,6 +453,7 @@ class GetTokenDetailsUserPlexAccountTypedDict(TypedDict):
|
||||
r"""If the account is a Plex Home managed user"""
|
||||
roles: NotRequired[List[str]]
|
||||
r"""[Might be removed] List of account roles. Plexpass membership listed here"""
|
||||
subscriptions: NotRequired[List[GetTokenDetailsSubscriptionTypedDict]]
|
||||
two_factor_enabled: NotRequired[bool]
|
||||
r"""If two-factor authentication is enabled"""
|
||||
|
||||
@@ -524,8 +525,6 @@ class GetTokenDetailsUserPlexAccount(BaseModel):
|
||||
]
|
||||
r"""Description of the Plex Pass subscription"""
|
||||
|
||||
subscriptions: List[GetTokenDetailsSubscription]
|
||||
|
||||
thumb: str
|
||||
r"""URL of the account thumbnail"""
|
||||
|
||||
@@ -597,6 +596,8 @@ class GetTokenDetailsUserPlexAccount(BaseModel):
|
||||
roles: Optional[List[str]] = None
|
||||
r"""[Might be removed] List of account roles. Plexpass membership listed here"""
|
||||
|
||||
subscriptions: Optional[List[GetTokenDetailsSubscription]] = None
|
||||
|
||||
two_factor_enabled: Annotated[
|
||||
Optional[bool], pydantic.Field(alias="twoFactorEnabled")
|
||||
] = False
|
||||
@@ -619,6 +620,7 @@ class GetTokenDetailsUserPlexAccount(BaseModel):
|
||||
"protected",
|
||||
"restricted",
|
||||
"roles",
|
||||
"subscriptions",
|
||||
"twoFactorEnabled",
|
||||
]
|
||||
nullable_fields = [
|
||||
|
||||
@@ -9,6 +9,7 @@ from pydantic import model_serializer
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
GET_USER_FRIENDS_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
|
||||
@@ -16,6 +16,7 @@ from pydantic import model_serializer
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
POST_USERS_SIGN_IN_DATA_SERVERS = [
|
||||
"https://plex.tv/api/v2",
|
||||
]
|
||||
@@ -664,7 +665,6 @@ class PostUsersSignInDataUserPlexAccountTypedDict(TypedDict):
|
||||
r"""If the account’s Plex Pass subscription is active"""
|
||||
subscription_description: Nullable[str]
|
||||
r"""Description of the Plex Pass subscription"""
|
||||
subscriptions: List[PostUsersSignInDataAuthenticationSubscriptionTypedDict]
|
||||
thumb: str
|
||||
r"""URL of the account thumbnail"""
|
||||
title: str
|
||||
@@ -704,6 +704,9 @@ class PostUsersSignInDataUserPlexAccountTypedDict(TypedDict):
|
||||
r"""If the account is a Plex Home managed user"""
|
||||
roles: NotRequired[List[str]]
|
||||
r"""[Might be removed] List of account roles. Plexpass membership listed here"""
|
||||
subscriptions: NotRequired[
|
||||
List[PostUsersSignInDataAuthenticationSubscriptionTypedDict]
|
||||
]
|
||||
two_factor_enabled: NotRequired[bool]
|
||||
r"""If two-factor authentication is enabled"""
|
||||
|
||||
@@ -775,8 +778,6 @@ class PostUsersSignInDataUserPlexAccount(BaseModel):
|
||||
]
|
||||
r"""Description of the Plex Pass subscription"""
|
||||
|
||||
subscriptions: List[PostUsersSignInDataAuthenticationSubscription]
|
||||
|
||||
thumb: str
|
||||
r"""URL of the account thumbnail"""
|
||||
|
||||
@@ -854,6 +855,8 @@ class PostUsersSignInDataUserPlexAccount(BaseModel):
|
||||
roles: Optional[List[str]] = None
|
||||
r"""[Might be removed] List of account roles. Plexpass membership listed here"""
|
||||
|
||||
subscriptions: Optional[List[PostUsersSignInDataAuthenticationSubscription]] = None
|
||||
|
||||
two_factor_enabled: Annotated[
|
||||
Optional[bool], pydantic.Field(alias="twoFactorEnabled")
|
||||
] = False
|
||||
@@ -876,6 +879,7 @@ class PostUsersSignInDataUserPlexAccount(BaseModel):
|
||||
"protected",
|
||||
"restricted",
|
||||
"roles",
|
||||
"subscriptions",
|
||||
"twoFactorEnabled",
|
||||
]
|
||||
nullable_fields = [
|
||||
|
||||
@@ -47,6 +47,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.CreatePlaylistRequest)
|
||||
@@ -78,6 +80,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="createPlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -160,6 +163,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.CreatePlaylistRequest)
|
||||
@@ -191,6 +196,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="createPlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -270,6 +276,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetPlaylistsRequest(
|
||||
playlist_type=playlist_type,
|
||||
@@ -302,6 +310,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylists",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -381,6 +390,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetPlaylistsRequest(
|
||||
playlist_type=playlist_type,
|
||||
@@ -413,6 +424,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylists",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -492,6 +504,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetPlaylistRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -523,6 +537,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -602,6 +617,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetPlaylistRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -633,6 +650,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -711,6 +729,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.DeletePlaylistRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -742,6 +762,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="deletePlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -817,6 +838,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.DeletePlaylistRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -848,6 +871,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="deletePlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -927,6 +951,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.UpdatePlaylistRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -960,6 +986,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1039,6 +1066,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.UpdatePlaylistRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1072,6 +1101,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1152,6 +1182,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetPlaylistContentsRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1184,6 +1216,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1267,6 +1300,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetPlaylistContentsRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1299,6 +1334,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1377,6 +1413,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ClearPlaylistContentsRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1408,6 +1446,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="clearPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1483,6 +1522,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ClearPlaylistContentsRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1514,6 +1555,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="clearPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1594,6 +1636,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.AddPlaylistContentsRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1627,6 +1671,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="addPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1710,6 +1755,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.AddPlaylistContentsRequest(
|
||||
playlist_id=playlist_id,
|
||||
@@ -1743,6 +1790,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="addPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1825,6 +1873,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.UploadPlaylistRequest(
|
||||
path=path,
|
||||
@@ -1858,6 +1908,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="uploadPlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1937,6 +1988,8 @@ class Playlists(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.UploadPlaylistRequest(
|
||||
path=path,
|
||||
@@ -1970,6 +2023,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="uploadPlaylist",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -63,6 +63,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getCompanionsData",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -166,6 +167,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getCompanionsData",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -269,6 +271,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getUserFriends",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -372,6 +375,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getUserFriends",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -474,7 +478,10 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="getGeoData", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="getGeoData",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "401", "4XX", "5XX"],
|
||||
@@ -574,7 +581,10 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="getGeoData", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="getGeoData",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "401", "4XX", "5XX"],
|
||||
@@ -647,6 +657,8 @@ class Plex(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/home",
|
||||
@@ -673,6 +685,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getHomeData",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -748,6 +761,8 @@ class Plex(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/home",
|
||||
@@ -774,6 +789,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getHomeData",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -899,6 +915,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-resources",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1024,6 +1041,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-resources",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1133,7 +1151,10 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="getPin", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="getPin",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "4XX", "5XX"],
|
||||
@@ -1234,7 +1255,10 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="getPin", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="getPin",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "4XX", "5XX"],
|
||||
@@ -1338,7 +1362,10 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="getTokenByPinId", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenByPinId",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "404", "4XX", "5XX"],
|
||||
@@ -1448,7 +1475,10 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="getTokenByPinId", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenByPinId",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "404", "4XX", "5XX"],
|
||||
|
||||
@@ -168,15 +168,19 @@ class PlexAPI(BaseSDK):
|
||||
:param retry_config: The retry configuration to use for all supported methods
|
||||
:param timeout_ms: Optional request timeout applied to each operation in milliseconds
|
||||
"""
|
||||
client_supplied = True
|
||||
if client is None:
|
||||
client = httpx.Client()
|
||||
client_supplied = False
|
||||
|
||||
assert issubclass(
|
||||
type(client), HttpClient
|
||||
), "The provided client must implement the HttpClient protocol."
|
||||
|
||||
async_client_supplied = True
|
||||
if async_client is None:
|
||||
async_client = httpx.AsyncClient()
|
||||
async_client_supplied = False
|
||||
|
||||
if debug_logger is None:
|
||||
debug_logger = get_default_logger()
|
||||
@@ -207,7 +211,9 @@ class PlexAPI(BaseSDK):
|
||||
self,
|
||||
SDKConfiguration(
|
||||
client=client,
|
||||
client_supplied=client_supplied,
|
||||
async_client=async_client,
|
||||
async_client_supplied=async_client_supplied,
|
||||
security=security,
|
||||
server_url=server_url,
|
||||
server_idx=server_idx,
|
||||
@@ -222,7 +228,7 @@ class PlexAPI(BaseSDK):
|
||||
|
||||
current_server_url, *_ = self.sdk_configuration.get_server_details()
|
||||
server_url, self.sdk_configuration.client = hooks.sdk_init(
|
||||
current_server_url, self.sdk_configuration.client
|
||||
current_server_url, client
|
||||
)
|
||||
if current_server_url != server_url:
|
||||
self.sdk_configuration.server_url = server_url
|
||||
@@ -235,7 +241,9 @@ class PlexAPI(BaseSDK):
|
||||
close_clients,
|
||||
cast(ClientOwner, self.sdk_configuration),
|
||||
self.sdk_configuration.client,
|
||||
self.sdk_configuration.client_supplied,
|
||||
self.sdk_configuration.async_client,
|
||||
self.sdk_configuration.async_client_supplied,
|
||||
)
|
||||
|
||||
self._init_sdks()
|
||||
@@ -266,9 +274,17 @@ class PlexAPI(BaseSDK):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
if self.sdk_configuration.client is not None:
|
||||
if (
|
||||
self.sdk_configuration.client is not None
|
||||
and not self.sdk_configuration.client_supplied
|
||||
):
|
||||
self.sdk_configuration.client.close()
|
||||
self.sdk_configuration.client = None
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
if self.sdk_configuration.async_client is not None:
|
||||
if (
|
||||
self.sdk_configuration.async_client is not None
|
||||
and not self.sdk_configuration.async_client_supplied
|
||||
):
|
||||
await self.sdk_configuration.async_client.aclose()
|
||||
self.sdk_configuration.async_client = None
|
||||
|
||||
@@ -33,8 +33,10 @@ class ServerProtocol(str, Enum):
|
||||
|
||||
@dataclass
|
||||
class SDKConfiguration:
|
||||
client: HttpClient
|
||||
async_client: AsyncHttpClient
|
||||
client: Union[HttpClient, None]
|
||||
client_supplied: bool
|
||||
async_client: Union[AsyncHttpClient, None]
|
||||
async_client_supplied: bool
|
||||
debug_logger: Logger
|
||||
security: Optional[
|
||||
Union[components.Security, Callable[[], components.Security]]
|
||||
|
||||
@@ -53,6 +53,8 @@ class Search(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.PerformSearchRequest(
|
||||
query=query,
|
||||
@@ -86,6 +88,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="performSearch",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -176,6 +179,8 @@ class Search(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.PerformSearchRequest(
|
||||
query=query,
|
||||
@@ -209,6 +214,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="performSearch",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -291,6 +297,8 @@ class Search(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.PerformVoiceSearchRequest(
|
||||
query=query,
|
||||
@@ -324,6 +332,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="performVoiceSearch",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -406,6 +415,8 @@ class Search(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.PerformVoiceSearchRequest(
|
||||
query=query,
|
||||
@@ -439,6 +450,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="performVoiceSearch",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -513,6 +525,8 @@ class Search(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSearchResultsRequest(
|
||||
query=query,
|
||||
@@ -544,6 +558,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSearchResults",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -621,6 +636,8 @@ class Search(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSearchResultsRequest(
|
||||
query=query,
|
||||
@@ -652,6 +669,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSearchResults",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -35,6 +35,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/",
|
||||
@@ -61,6 +63,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerCapabilities",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -137,6 +140,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/",
|
||||
@@ -163,6 +168,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerCapabilities",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -239,6 +245,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/:/prefs",
|
||||
@@ -265,6 +273,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerPreferences",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -340,6 +349,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/:/prefs",
|
||||
@@ -366,6 +377,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerPreferences",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -441,6 +453,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/clients",
|
||||
@@ -467,6 +481,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getAvailableClients",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -542,6 +557,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/clients",
|
||||
@@ -568,6 +585,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getAvailableClients",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -643,6 +661,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/devices",
|
||||
@@ -669,6 +689,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getDevices",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -744,6 +765,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/devices",
|
||||
@@ -770,6 +793,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getDevices",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -845,6 +869,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/identity",
|
||||
@@ -870,6 +896,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-identity",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
@@ -939,6 +966,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/identity",
|
||||
@@ -964,6 +993,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-identity",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
@@ -1033,6 +1063,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/myplex/account",
|
||||
@@ -1059,6 +1091,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getMyPlexAccount",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1134,6 +1167,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/myplex/account",
|
||||
@@ -1160,6 +1195,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getMyPlexAccount",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1241,6 +1277,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetResizedPhotoRequest)
|
||||
@@ -1272,6 +1310,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getResizedPhoto",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1350,6 +1389,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetResizedPhotoRequest)
|
||||
@@ -1381,6 +1422,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getResizedPhoto",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1455,6 +1497,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetMediaProvidersRequest(
|
||||
x_plex_token=x_plex_token,
|
||||
@@ -1486,6 +1530,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-providers",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1563,6 +1608,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetMediaProvidersRequest(
|
||||
x_plex_token=x_plex_token,
|
||||
@@ -1594,6 +1641,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-providers",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1669,6 +1717,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/servers",
|
||||
@@ -1695,6 +1745,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerList",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -1770,6 +1821,8 @@ class Server(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/servers",
|
||||
@@ -1796,6 +1849,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerList",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -35,6 +35,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/status/sessions",
|
||||
@@ -61,6 +63,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessions",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -136,6 +139,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/status/sessions",
|
||||
@@ -162,6 +167,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessions",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -247,6 +253,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSessionHistoryRequest(
|
||||
sort=sort,
|
||||
@@ -283,6 +291,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessionHistory",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -368,6 +377,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetSessionHistoryRequest(
|
||||
sort=sort,
|
||||
@@ -404,6 +415,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessionHistory",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -479,6 +491,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/transcode/sessions",
|
||||
@@ -505,6 +519,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTranscodeSessions",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -580,6 +595,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/transcode/sessions",
|
||||
@@ -606,6 +623,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTranscodeSessions",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -683,6 +701,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.StopTranscodeSessionRequest(
|
||||
session_key=session_key,
|
||||
@@ -714,6 +734,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTranscodeSession",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -788,6 +809,8 @@ class Sessions(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.StopTranscodeSessionRequest(
|
||||
session_key=session_key,
|
||||
@@ -819,6 +842,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTranscodeSession",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -37,6 +37,8 @@ class Statistics(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetStatisticsRequest(
|
||||
timespan=timespan,
|
||||
@@ -68,6 +70,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getStatistics",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -145,6 +148,8 @@ class Statistics(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetStatisticsRequest(
|
||||
timespan=timespan,
|
||||
@@ -176,6 +181,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getStatistics",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -253,6 +259,8 @@ class Statistics(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetResourcesStatisticsRequest(
|
||||
timespan=timespan,
|
||||
@@ -284,6 +292,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getResourcesStatistics",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -362,6 +371,8 @@ class Statistics(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetResourcesStatisticsRequest(
|
||||
timespan=timespan,
|
||||
@@ -393,6 +404,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getResourcesStatistics",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -471,6 +483,8 @@ class Statistics(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetBandwidthStatisticsRequest(
|
||||
timespan=timespan,
|
||||
@@ -502,6 +516,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getBandwidthStatistics",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -580,6 +595,8 @@ class Statistics(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.GetBandwidthStatisticsRequest(
|
||||
timespan=timespan,
|
||||
@@ -611,6 +628,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getBandwidthStatistics",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -38,6 +38,8 @@ class Updater(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request(
|
||||
method="GET",
|
||||
path="/updater/status",
|
||||
@@ -64,6 +66,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getUpdateStatus",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -139,6 +142,8 @@ class Updater(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
req = self._build_request_async(
|
||||
method="GET",
|
||||
path="/updater/status",
|
||||
@@ -165,6 +170,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getUpdateStatus",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -242,6 +248,8 @@ class Updater(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.CheckForUpdatesRequest(
|
||||
download=download,
|
||||
@@ -273,6 +281,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="checkForUpdates",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -347,6 +356,8 @@ class Updater(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.CheckForUpdatesRequest(
|
||||
download=download,
|
||||
@@ -378,6 +389,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="checkForUpdates",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -455,6 +467,8 @@ class Updater(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ApplyUpdatesRequest(
|
||||
tonight=tonight,
|
||||
@@ -487,6 +501,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="applyUpdates",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -564,6 +579,8 @@ class Updater(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
request = operations.ApplyUpdatesRequest(
|
||||
tonight=tonight,
|
||||
@@ -596,6 +613,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="applyUpdates",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -67,7 +67,10 @@ class Users(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="get-users", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="get-users",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "401", "4XX", "5XX"],
|
||||
@@ -173,7 +176,10 @@ class Users(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
operation_id="get-users", oauth2_scopes=[], security_source=None
|
||||
base_url=base_url or "",
|
||||
operation_id="get-users",
|
||||
oauth2_scopes=[],
|
||||
security_source=None,
|
||||
),
|
||||
request=req,
|
||||
error_status_codes=["400", "401", "4XX", "5XX"],
|
||||
|
||||
@@ -42,6 +42,7 @@ from .values import (
|
||||
match_content_type,
|
||||
match_status_codes,
|
||||
match_response,
|
||||
cast_partial,
|
||||
)
|
||||
from .logger import Logger, get_body_content, get_default_logger
|
||||
|
||||
@@ -94,4 +95,5 @@ __all__ = [
|
||||
"validate_float",
|
||||
"validate_int",
|
||||
"validate_open_enum",
|
||||
"cast_partial",
|
||||
]
|
||||
|
||||
@@ -7,14 +7,15 @@ import httpx
|
||||
from typing_extensions import get_origin
|
||||
from pydantic import ConfigDict, create_model
|
||||
from pydantic_core import from_json
|
||||
from typing_inspect import is_optional_type
|
||||
from typing_inspection.typing_objects import is_union
|
||||
|
||||
from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset
|
||||
|
||||
|
||||
def serialize_decimal(as_str: bool):
|
||||
def serialize(d):
|
||||
if is_optional_type(type(d)) and d is None:
|
||||
# Optional[T] is a Union[T, None]
|
||||
if is_union(type(d)) and type(None) in get_args(type(d)) and d is None:
|
||||
return None
|
||||
if isinstance(d, Unset):
|
||||
return d
|
||||
@@ -42,7 +43,8 @@ def validate_decimal(d):
|
||||
|
||||
def serialize_float(as_str: bool):
|
||||
def serialize(f):
|
||||
if is_optional_type(type(f)) and f is None:
|
||||
# Optional[T] is a Union[T, None]
|
||||
if is_union(type(f)) and type(None) in get_args(type(f)) and f is None:
|
||||
return None
|
||||
if isinstance(f, Unset):
|
||||
return f
|
||||
@@ -70,7 +72,8 @@ def validate_float(f):
|
||||
|
||||
def serialize_int(as_str: bool):
|
||||
def serialize(i):
|
||||
if is_optional_type(type(i)) and i is None:
|
||||
# Optional[T] is a Union[T, None]
|
||||
if is_union(type(i)) and type(None) in get_args(type(i)) and i is None:
|
||||
return None
|
||||
if isinstance(i, Unset):
|
||||
return i
|
||||
@@ -118,7 +121,8 @@ def validate_open_enum(is_int: bool):
|
||||
|
||||
def validate_const(v):
|
||||
def validate(c):
|
||||
if is_optional_type(type(c)) and c is None:
|
||||
# Optional[T] is a Union[T, None]
|
||||
if is_union(type(c)) and type(None) in get_args(type(c)) and c is None:
|
||||
return None
|
||||
|
||||
if v != c:
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from email.message import Message
|
||||
from functools import partial
|
||||
import os
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union, cast
|
||||
|
||||
from httpx import Response
|
||||
from pydantic import BaseModel
|
||||
@@ -51,6 +52,8 @@ def match_status_codes(status_codes: List[str], status_code: int) -> bool:
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
def cast_partial(typ):
|
||||
return partial(cast, typ)
|
||||
|
||||
def get_global_from_env(
|
||||
value: Optional[T], env_key: str, type_cast: Callable[[str], T]
|
||||
|
||||
@@ -39,6 +39,8 @@ class Video(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetTimelineRequest)
|
||||
@@ -70,6 +72,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTimeline",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -146,6 +149,8 @@ class Video(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(request, operations.GetTimelineRequest)
|
||||
@@ -177,6 +182,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="getTimeline",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -254,6 +260,8 @@ class Video(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(
|
||||
@@ -287,6 +295,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="startUniversalTranscode",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -364,6 +373,8 @@ class Video(BaseSDK):
|
||||
|
||||
if server_url is not None:
|
||||
base_url = server_url
|
||||
else:
|
||||
base_url = self._get_url(base_url, url_variables)
|
||||
|
||||
if not isinstance(request, BaseModel):
|
||||
request = utils.unmarshal(
|
||||
@@ -397,6 +408,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="startUniversalTranscode",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
@@ -72,6 +72,7 @@ class Watchlist(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-watch-list",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
@@ -184,6 +185,7 @@ class Watchlist(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
base_url=base_url or "",
|
||||
operation_id="get-watch-list",
|
||||
oauth2_scopes=[],
|
||||
security_source=self.sdk_configuration.security,
|
||||
|
||||
Reference in New Issue
Block a user