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.554.1
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
**/__pycache__/
|
||||
**/.speakeasy/temp/
|
||||
**/.speakeasy/logs/
|
||||
.speakeasy/reports
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@ generation:
|
||||
maintainOpenAPIOrder: true
|
||||
usageSnippets:
|
||||
optionalPropertyRendering: withExample
|
||||
sdkInitStyle: constructor
|
||||
useClassNamesForArrayFields: true
|
||||
fixes:
|
||||
nameResolutionDec2023: true
|
||||
@@ -16,7 +17,7 @@ generation:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
python:
|
||||
version: 0.27.1
|
||||
version: 0.28.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
@@ -48,6 +49,7 @@ python:
|
||||
outputModelSuffix: output
|
||||
packageName: plex-api-client
|
||||
projectUrls: {}
|
||||
pytestFilterWarnings: []
|
||||
pytestTimeout: 0
|
||||
responseFormat: envelope
|
||||
templateVersion: v2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.542.3
|
||||
speakeasyVersion: 1.554.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -12,7 +12,7 @@ sources:
|
||||
sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1746489712
|
||||
- speakeasy-sdk-regen-1748563292
|
||||
targets:
|
||||
plexpy:
|
||||
source: plexapi
|
||||
@@ -20,7 +20,7 @@ targets:
|
||||
sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a
|
||||
sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c
|
||||
codeSamplesNamespace: code-samples-python-plexpy
|
||||
codeSamplesRevisionDigest: sha256:d44dccf82c6d957716f9fa25e845ee03044aed2df7e25e9921038315f99853f5
|
||||
codeSamplesRevisionDigest: sha256:e1e388378c142d431c28329b4d0508c172ad2258f66e0cc12dc6edeb4124194f
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
@@ -472,8 +472,8 @@ from plex_api_client import PlexAPI
|
||||
|
||||
with PlexAPI(
|
||||
protocol="https"
|
||||
ip="e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9"
|
||||
port="40311"
|
||||
ip="4982:bc2a:b4f8:efb5:2394:5bc3:ab4f:0e6d"
|
||||
port="44765"
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -1038,4 +1038,14 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.27.1] .
|
||||
### Releases
|
||||
- [PyPI v0.27.1] https://pypi.org/project/plex-api-client/0.27.1 - .
|
||||
- [PyPI v0.27.1] https://pypi.org/project/plex-api-client/0.27.1 - .
|
||||
|
||||
## 2025-05-30 00:01:15
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.554.1 (2.616.1) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [python v0.28.0] .
|
||||
### Releases
|
||||
- [PyPI v0.28.0] https://pypi.org/project/plex-api-client/0.28.0 - .
|
||||
@@ -238,7 +238,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.butler.stop_task(task_name=operations.PathParamTaskName.BACKUP_DATABASE)
|
||||
res = plex_api.butler.stop_task(task_name=operations.PathParamTaskName.CLEAN_OLD_CACHE_FILES)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -258,7 +258,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.butler.start_task(task_name=operations.TaskName.CLEAN_OLD_BUNDLES)
|
||||
res = plex_api.butler.start_task(task_name=operations.TaskName.REFRESH_PERIODIC_METADATA)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -410,7 +410,7 @@ actions:
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.hubs.get_recently_added(request={
|
||||
"content_directory_id": 470161,
|
||||
"content_directory_id": 39486,
|
||||
"section_id": 2,
|
||||
"type": operations.Type.TV_SHOW,
|
||||
})
|
||||
@@ -432,7 +432,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.search.perform_search(query="dylan")
|
||||
res = plex_api.search.perform_search(query="arnold")
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -470,7 +470,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.hubs.get_library_hubs(section_id=6728.76)
|
||||
res = plex_api.hubs.get_library_hubs(section_id=492.74)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -643,7 +643,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_metadata_children(rating_key=1539.14, include_elements="Stream")
|
||||
res = plex_api.library.get_metadata_children(rating_key=2403.67, include_elements="Stream")
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -811,7 +811,7 @@ actions:
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.watchlist.get_watch_list(request={
|
||||
"filter_": operations.Filter.AVAILABLE,
|
||||
"filter_": operations.Filter.RELEASED,
|
||||
"x_plex_token": "CV5xoxjTpFKUzBTShsaf",
|
||||
})
|
||||
|
||||
@@ -954,7 +954,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ONE)
|
||||
res = plex_api.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ZERO)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -995,7 +995,7 @@ actions:
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_library_items(request={
|
||||
"tag": operations.Tag.EDITION,
|
||||
"tag": operations.Tag.NEWEST,
|
||||
"type": operations.GetLibraryItemsQueryParamType.TV_SHOW,
|
||||
"section_key": 9518,
|
||||
})
|
||||
@@ -1121,8 +1121,8 @@ actions:
|
||||
"height": 165,
|
||||
"opacity": 100,
|
||||
"blur": 0,
|
||||
"min_size": operations.MinSize.ONE,
|
||||
"upscale": operations.Upscale.ONE,
|
||||
"min_size": operations.MinSize.ZERO,
|
||||
"upscale": operations.Upscale.ZERO,
|
||||
"url": "/library/metadata/49564/thumb/1654258204",
|
||||
})
|
||||
|
||||
@@ -1165,7 +1165,7 @@ actions:
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_token_by_pin_id(request={
|
||||
"pin_id": 408895,
|
||||
"pin_id": 232248,
|
||||
"client_id": "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
"client_name": "Plex for Roku",
|
||||
"device_nickname": "Roku 3",
|
||||
@@ -1212,9 +1212,9 @@ actions:
|
||||
|
||||
res = plex_api.playlists.create_playlist(request={
|
||||
"title": "<value>",
|
||||
"type": operations.CreatePlaylistQueryParamType.PHOTO,
|
||||
"type": operations.CreatePlaylistQueryParamType.AUDIO,
|
||||
"smart": operations.Smart.ONE,
|
||||
"uri": "https://hoarse-testing.info/",
|
||||
"uri": "https://short-term-disconnection.name/",
|
||||
})
|
||||
|
||||
assert res.object is not None
|
||||
@@ -1235,7 +1235,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=operations.QueryParamForce.ZERO, section_id=1)
|
||||
res = plex_api.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=operations.QueryParamForce.ONE, section_id=1)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -1254,7 +1254,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.delete_playlist(playlist_id=216.22)
|
||||
res = plex_api.playlists.delete_playlist(playlist_id=3432.93)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -1273,7 +1273,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.get_playlist(playlist_id=4109.48)
|
||||
res = plex_api.playlists.get_playlist(playlist_id=8419.53)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -1292,7 +1292,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.update_playlist(playlist_id=3915)
|
||||
res = plex_api.playlists.update_playlist(playlist_id=1579.66)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -1311,7 +1311,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.clear_playlist_contents(playlist_id=1893.18)
|
||||
res = plex_api.playlists.clear_playlist_contents(playlist_id=4137.37)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -1331,7 +1331,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.get_playlist_contents(playlist_id=5004.46, type_=operations.GetPlaylistContentsQueryParamType.TV_SHOW)
|
||||
res = plex_api.playlists.get_playlist_contents(playlist_id=5535.42, type_=operations.GetPlaylistContentsQueryParamType.TV_SHOW)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -1350,7 +1350,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.add_playlist_contents(playlist_id=8502.01, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123)
|
||||
res = plex_api.playlists.add_playlist_contents(playlist_id=7013.44, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -1407,7 +1407,7 @@ actions:
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.authentication.get_source_connection_information(source="provider://provider-identifier")
|
||||
res = plex_api.authentication.get_source_connection_information(source="server://client-identifier")
|
||||
|
||||
assert res is not None
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.authentication.get_source_connection_information(source="provider://provider-identifier")
|
||||
res = plex_api.authentication.get_source_connection_information(source="server://client-identifier")
|
||||
|
||||
assert res is not None
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.butler.start_task(task_name=operations.TaskName.CLEAN_OLD_BUNDLES)
|
||||
res = plex_api.butler.start_task(task_name=operations.TaskName.REFRESH_PERIODIC_METADATA)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -207,7 +207,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.butler.stop_task(task_name=operations.PathParamTaskName.BACKUP_DATABASE)
|
||||
res = plex_api.butler.stop_task(task_name=operations.PathParamTaskName.CLEAN_OLD_CACHE_FILES)
|
||||
|
||||
assert res is not None
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ with PlexAPI(
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.hubs.get_recently_added(request={
|
||||
"content_directory_id": 470161,
|
||||
"content_directory_id": 39486,
|
||||
"section_id": 2,
|
||||
"type": operations.Type.TV_SHOW,
|
||||
})
|
||||
@@ -116,7 +116,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.hubs.get_library_hubs(section_id=6728.76)
|
||||
res = plex_api.hubs.get_library_hubs(section_id=492.74)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ with PlexAPI(
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_library_items(request={
|
||||
"tag": operations.Tag.EDITION,
|
||||
"tag": operations.Tag.NEWEST,
|
||||
"type": operations.GetLibraryItemsQueryParamType.TV_SHOW,
|
||||
"section_key": 9518,
|
||||
})
|
||||
@@ -436,7 +436,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ONE)
|
||||
res = plex_api.library.get_refresh_library_metadata(section_key=9518, force=operations.Force.ZERO)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -949,7 +949,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.library.get_metadata_children(rating_key=1539.14, include_elements="Stream")
|
||||
res = plex_api.library.get_metadata_children(rating_key=2403.67, include_elements="Stream")
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ with PlexAPI(
|
||||
|
||||
res = plex_api.playlists.create_playlist(request={
|
||||
"title": "<value>",
|
||||
"type": operations.CreatePlaylistQueryParamType.PHOTO,
|
||||
"type": operations.CreatePlaylistQueryParamType.AUDIO,
|
||||
"smart": operations.Smart.ONE,
|
||||
"uri": "https://hoarse-testing.info/",
|
||||
"uri": "https://short-term-disconnection.name/",
|
||||
})
|
||||
|
||||
assert res.object is not None
|
||||
@@ -131,7 +131,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.get_playlist(playlist_id=4109.48)
|
||||
res = plex_api.playlists.get_playlist(playlist_id=8419.53)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -174,7 +174,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.delete_playlist(playlist_id=216.22)
|
||||
res = plex_api.playlists.delete_playlist(playlist_id=3432.93)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -217,7 +217,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.update_playlist(playlist_id=3915)
|
||||
res = plex_api.playlists.update_playlist(playlist_id=1579.66)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -266,7 +266,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.get_playlist_contents(playlist_id=5004.46, type_=operations.GetPlaylistContentsQueryParamType.TV_SHOW)
|
||||
res = plex_api.playlists.get_playlist_contents(playlist_id=5535.42, type_=operations.GetPlaylistContentsQueryParamType.TV_SHOW)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -310,7 +310,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.clear_playlist_contents(playlist_id=1893.18)
|
||||
res = plex_api.playlists.clear_playlist_contents(playlist_id=4137.37)
|
||||
|
||||
assert res is not None
|
||||
|
||||
@@ -354,7 +354,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.add_playlist_contents(playlist_id=8502.01, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123)
|
||||
res = plex_api.playlists.add_playlist_contents(playlist_id=7013.44, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123)
|
||||
|
||||
assert res.object is not None
|
||||
|
||||
@@ -400,7 +400,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=operations.QueryParamForce.ZERO, section_id=1)
|
||||
res = plex_api.playlists.upload_playlist(path="/home/barkley/playlist.m3u", force=operations.QueryParamForce.ONE, section_id=1)
|
||||
|
||||
assert res is not None
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ from plex_api_client import PlexAPI
|
||||
with PlexAPI() as plex_api:
|
||||
|
||||
res = plex_api.plex.get_token_by_pin_id(request={
|
||||
"pin_id": 408895,
|
||||
"pin_id": 232248,
|
||||
"client_id": "3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
"client_name": "Plex for Roku",
|
||||
"device_nickname": "Roku 3",
|
||||
|
||||
@@ -38,7 +38,7 @@ with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.search.perform_search(query="dylan")
|
||||
res = plex_api.search.perform_search(query="arnold")
|
||||
|
||||
assert res is not None
|
||||
|
||||
|
||||
@@ -282,8 +282,8 @@ with PlexAPI(
|
||||
"height": 165,
|
||||
"opacity": 100,
|
||||
"blur": 0,
|
||||
"min_size": operations.MinSize.ONE,
|
||||
"upscale": operations.Upscale.ONE,
|
||||
"min_size": operations.MinSize.ZERO,
|
||||
"upscale": operations.Upscale.ZERO,
|
||||
"url": "/library/metadata/49564/thumb/1654258204",
|
||||
})
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ with PlexAPI(
|
||||
) as plex_api:
|
||||
|
||||
res = plex_api.watchlist.get_watch_list(request={
|
||||
"filter_": operations.Filter.AVAILABLE,
|
||||
"filter_": operations.Filter.RELEASED,
|
||||
"x_plex_token": "CV5xoxjTpFKUzBTShsaf",
|
||||
})
|
||||
|
||||
|
||||
24
poetry.lock
generated
24
poetry.lock
generated
@@ -1,4 +1,4 @@
|
||||
# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "annotated-types"
|
||||
@@ -109,37 +109,37 @@ test = ["pytest (>=6)"]
|
||||
|
||||
[[package]]
|
||||
name = "h11"
|
||||
version = "0.14.0"
|
||||
version = "0.16.0"
|
||||
description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
python-versions = ">=3.8"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
|
||||
{file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
|
||||
{file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"},
|
||||
{file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "httpcore"
|
||||
version = "1.0.5"
|
||||
version = "1.0.9"
|
||||
description = "A minimal low-level HTTP client."
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"},
|
||||
{file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"},
|
||||
{file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"},
|
||||
{file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
certifi = "*"
|
||||
h11 = ">=0.13,<0.15"
|
||||
h11 = ">=0.16"
|
||||
|
||||
[package.extras]
|
||||
asyncio = ["anyio (>=4.0,<5.0)"]
|
||||
http2 = ["h2 (>=3,<5)"]
|
||||
socks = ["socksio (==1.*)"]
|
||||
trio = ["trio (>=0.22.0,<0.26.0)"]
|
||||
trio = ["trio (>=0.22.0,<1.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "httpx"
|
||||
@@ -519,5 +519,5 @@ typing-extensions = ">=4.12.0"
|
||||
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.9"
|
||||
content-hash = "6354f0f1856076ab30608ac13a9b2c92427e32d83253a3a3801e1919bb853282"
|
||||
python-versions = ">=3.9.2"
|
||||
content-hash = "fd5d2a9148a00cbc5258586b48c24f763e191bdc12367f4e92abdbfc15e30679"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
[project]
|
||||
name = "plex-api-client"
|
||||
version = "0.27.1"
|
||||
version = "0.28.0"
|
||||
description = "Python Client SDK Generated by Speakeasy"
|
||||
authors = [{ name = "Speakeasy" },]
|
||||
readme = "README-PYPI.md"
|
||||
requires-python = ">=3.9"
|
||||
requires-python = ">=3.9.2"
|
||||
dependencies = [
|
||||
"httpcore >=1.0.9",
|
||||
"httpx >=0.28.1",
|
||||
"pydantic >=2.11.2",
|
||||
]
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
from abc import ABC, abstractmethod
|
||||
import httpx
|
||||
from plex_api_client.httpclient import HttpClient
|
||||
from plex_api_client.sdkconfiguration import SDKConfiguration
|
||||
from typing import Any, Callable, List, Optional, Tuple, Union
|
||||
|
||||
|
||||
class HookContext:
|
||||
config: SDKConfiguration
|
||||
base_url: str
|
||||
operation_id: str
|
||||
oauth2_scopes: Optional[List[str]] = None
|
||||
@@ -14,11 +16,13 @@ class HookContext:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
config: SDKConfiguration,
|
||||
base_url: str,
|
||||
operation_id: str,
|
||||
oauth2_scopes: Optional[List[str]],
|
||||
security_source: Optional[Union[Any, Callable[[], Any]]],
|
||||
):
|
||||
self.config = config
|
||||
self.base_url = base_url
|
||||
self.operation_id = operation_id
|
||||
self.oauth2_scopes = oauth2_scopes
|
||||
@@ -28,6 +32,7 @@ class HookContext:
|
||||
class BeforeRequestContext(HookContext):
|
||||
def __init__(self, hook_ctx: HookContext):
|
||||
super().__init__(
|
||||
hook_ctx.config,
|
||||
hook_ctx.base_url,
|
||||
hook_ctx.operation_id,
|
||||
hook_ctx.oauth2_scopes,
|
||||
@@ -38,6 +43,7 @@ class BeforeRequestContext(HookContext):
|
||||
class AfterSuccessContext(HookContext):
|
||||
def __init__(self, hook_ctx: HookContext):
|
||||
super().__init__(
|
||||
hook_ctx.config,
|
||||
hook_ctx.base_url,
|
||||
hook_ctx.operation_id,
|
||||
hook_ctx.oauth2_scopes,
|
||||
@@ -48,6 +54,7 @@ class AfterSuccessContext(HookContext):
|
||||
class AfterErrorContext(HookContext):
|
||||
def __init__(self, hook_ctx: HookContext):
|
||||
super().__init__(
|
||||
hook_ctx.config,
|
||||
hook_ctx.base_url,
|
||||
hook_ctx.operation_id,
|
||||
hook_ctx.oauth2_scopes,
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "plex-api-client"
|
||||
__version__: str = "0.27.1"
|
||||
__version__: str = "0.28.0"
|
||||
__openapi_doc_version__: str = "0.0.3"
|
||||
__gen_version__: str = "2.597.9"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.27.1 2.597.9 0.0.3 plex-api-client"
|
||||
__gen_version__: str = "2.616.1"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.28.0 2.616.1 0.0.3 plex-api-client"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -71,6 +71,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerActivities",
|
||||
oauth2_scopes=[],
|
||||
@@ -175,6 +176,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerActivities",
|
||||
oauth2_scopes=[],
|
||||
@@ -286,6 +288,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="cancelServerActivities",
|
||||
oauth2_scopes=[],
|
||||
@@ -394,6 +397,7 @@ class Activities(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="cancelServerActivities",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -74,6 +74,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTransientToken",
|
||||
oauth2_scopes=[],
|
||||
@@ -186,6 +187,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTransientToken",
|
||||
oauth2_scopes=[],
|
||||
@@ -296,6 +298,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSourceConnectionInformation",
|
||||
oauth2_scopes=[],
|
||||
@@ -406,6 +409,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSourceConnectionInformation",
|
||||
oauth2_scopes=[],
|
||||
@@ -507,6 +511,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenDetails",
|
||||
oauth2_scopes=[],
|
||||
@@ -611,6 +616,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenDetails",
|
||||
oauth2_scopes=[],
|
||||
@@ -731,6 +737,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="post-users-sign-in-data",
|
||||
oauth2_scopes=[],
|
||||
@@ -852,6 +859,7 @@ class Authentication(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="post-users-sign-in-data",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -219,12 +219,12 @@ class BaseSDK:
|
||||
client = self.sdk_configuration.client
|
||||
logger = self.sdk_configuration.debug_logger
|
||||
|
||||
hooks = self.sdk_configuration.__dict__["_hooks"]
|
||||
|
||||
def do():
|
||||
http_res = None
|
||||
try:
|
||||
req = self.sdk_configuration.get_hooks().before_request(
|
||||
BeforeRequestContext(hook_ctx), request
|
||||
)
|
||||
req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
|
||||
logger.debug(
|
||||
"Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
||||
req.method,
|
||||
@@ -238,9 +238,7 @@ class BaseSDK:
|
||||
|
||||
http_res = client.send(req, stream=stream)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(
|
||||
AfterErrorContext(hook_ctx), None, e
|
||||
)
|
||||
_, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
|
||||
if e is not None:
|
||||
logger.debug("Request Exception", exc_info=True)
|
||||
raise e
|
||||
@@ -258,7 +256,7 @@ class BaseSDK:
|
||||
)
|
||||
|
||||
if utils.match_status_codes(error_status_codes, http_res.status_code):
|
||||
result, err = self.sdk_configuration.get_hooks().after_error(
|
||||
result, err = hooks.after_error(
|
||||
AfterErrorContext(hook_ctx), http_res, None
|
||||
)
|
||||
if err is not None:
|
||||
@@ -278,9 +276,7 @@ class BaseSDK:
|
||||
http_res = do()
|
||||
|
||||
if not utils.match_status_codes(error_status_codes, http_res.status_code):
|
||||
http_res = self.sdk_configuration.get_hooks().after_success(
|
||||
AfterSuccessContext(hook_ctx), http_res
|
||||
)
|
||||
http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
|
||||
|
||||
return http_res
|
||||
|
||||
@@ -295,12 +291,12 @@ class BaseSDK:
|
||||
client = self.sdk_configuration.async_client
|
||||
logger = self.sdk_configuration.debug_logger
|
||||
|
||||
hooks = self.sdk_configuration.__dict__["_hooks"]
|
||||
|
||||
async def do():
|
||||
http_res = None
|
||||
try:
|
||||
req = self.sdk_configuration.get_hooks().before_request(
|
||||
BeforeRequestContext(hook_ctx), request
|
||||
)
|
||||
req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
|
||||
logger.debug(
|
||||
"Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
|
||||
req.method,
|
||||
@@ -314,9 +310,7 @@ class BaseSDK:
|
||||
|
||||
http_res = await client.send(req, stream=stream)
|
||||
except Exception as e:
|
||||
_, e = self.sdk_configuration.get_hooks().after_error(
|
||||
AfterErrorContext(hook_ctx), None, e
|
||||
)
|
||||
_, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
|
||||
if e is not None:
|
||||
logger.debug("Request Exception", exc_info=True)
|
||||
raise e
|
||||
@@ -334,7 +328,7 @@ class BaseSDK:
|
||||
)
|
||||
|
||||
if utils.match_status_codes(error_status_codes, http_res.status_code):
|
||||
result, err = self.sdk_configuration.get_hooks().after_error(
|
||||
result, err = hooks.after_error(
|
||||
AfterErrorContext(hook_ctx), http_res, None
|
||||
)
|
||||
if err is not None:
|
||||
@@ -356,8 +350,6 @@ class BaseSDK:
|
||||
http_res = await do()
|
||||
|
||||
if not utils.match_status_codes(error_status_codes, http_res.status_code):
|
||||
http_res = self.sdk_configuration.get_hooks().after_success(
|
||||
AfterSuccessContext(hook_ctx), http_res
|
||||
)
|
||||
http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
|
||||
|
||||
return http_res
|
||||
|
||||
@@ -63,6 +63,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getButlerTasks",
|
||||
oauth2_scopes=[],
|
||||
@@ -167,6 +168,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getButlerTasks",
|
||||
oauth2_scopes=[],
|
||||
@@ -276,6 +278,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="startAllTasks",
|
||||
oauth2_scopes=[],
|
||||
@@ -382,6 +385,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="startAllTasks",
|
||||
oauth2_scopes=[],
|
||||
@@ -484,6 +488,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="stopAllTasks",
|
||||
oauth2_scopes=[],
|
||||
@@ -586,6 +591,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="stopAllTasks",
|
||||
oauth2_scopes=[],
|
||||
@@ -699,6 +705,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="startTask",
|
||||
oauth2_scopes=[],
|
||||
@@ -812,6 +819,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="startTask",
|
||||
oauth2_scopes=[],
|
||||
@@ -921,6 +929,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTask",
|
||||
oauth2_scopes=[],
|
||||
@@ -1030,6 +1039,7 @@ class Butler(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTask",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
# pyright: reportReturnType = false
|
||||
import asyncio
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from typing_extensions import Protocol, runtime_checkable
|
||||
import httpx
|
||||
from typing import Any, Optional, Union
|
||||
@@ -116,21 +115,12 @@ def close_clients(
|
||||
pass
|
||||
|
||||
if async_client is not None and not async_client_supplied:
|
||||
is_async = False
|
||||
try:
|
||||
asyncio.get_running_loop()
|
||||
is_async = True
|
||||
loop = asyncio.get_running_loop()
|
||||
asyncio.run_coroutine_threadsafe(async_client.aclose(), loop)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
# If this function is called in an async loop then start another
|
||||
# loop in a separate thread to close the async http client.
|
||||
if is_async:
|
||||
with ThreadPoolExecutor(max_workers=1) as executor:
|
||||
future = executor.submit(asyncio.run, async_client.aclose())
|
||||
future.result()
|
||||
else:
|
||||
try:
|
||||
asyncio.run(async_client.aclose())
|
||||
except Exception:
|
||||
pass
|
||||
except RuntimeError:
|
||||
# best effort
|
||||
pass
|
||||
|
||||
@@ -73,6 +73,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getGlobalHubs",
|
||||
oauth2_scopes=[],
|
||||
@@ -187,6 +188,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getGlobalHubs",
|
||||
oauth2_scopes=[],
|
||||
@@ -302,6 +304,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added",
|
||||
oauth2_scopes=[],
|
||||
@@ -404,6 +407,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added",
|
||||
oauth2_scopes=[],
|
||||
@@ -509,6 +513,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getLibraryHubs",
|
||||
oauth2_scopes=[],
|
||||
@@ -627,6 +632,7 @@ class Hubs(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getLibraryHubs",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -74,6 +74,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getFileHash",
|
||||
oauth2_scopes=[],
|
||||
@@ -185,6 +186,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getFileHash",
|
||||
oauth2_scopes=[],
|
||||
@@ -299,6 +301,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -417,6 +420,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-recently-added-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -528,6 +532,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
@@ -638,6 +643,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
@@ -793,6 +799,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-details",
|
||||
oauth2_scopes=[],
|
||||
@@ -948,6 +955,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-details",
|
||||
oauth2_scopes=[],
|
||||
@@ -1059,6 +1067,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="deleteLibrary",
|
||||
oauth2_scopes=[],
|
||||
@@ -1167,6 +1176,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="deleteLibrary",
|
||||
oauth2_scopes=[],
|
||||
@@ -1299,6 +1309,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-items",
|
||||
oauth2_scopes=[],
|
||||
@@ -1434,6 +1445,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-library-items",
|
||||
oauth2_scopes=[],
|
||||
@@ -1549,6 +1561,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-media-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -1664,6 +1677,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-all-media-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -1779,6 +1793,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-refresh-library-metadata",
|
||||
oauth2_scopes=[],
|
||||
@@ -1891,6 +1906,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-refresh-library-metadata",
|
||||
oauth2_scopes=[],
|
||||
@@ -2020,6 +2036,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2152,6 +2169,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2267,6 +2285,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-genres-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2382,6 +2401,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-genres-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2497,6 +2517,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-countries-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2612,6 +2633,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-countries-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2727,6 +2749,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-actors-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2842,6 +2865,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-actors-library",
|
||||
oauth2_scopes=[],
|
||||
@@ -2957,6 +2981,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
@@ -3073,6 +3098,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-search-all-libraries",
|
||||
oauth2_scopes=[],
|
||||
@@ -3189,6 +3215,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-meta-data",
|
||||
oauth2_scopes=[],
|
||||
@@ -3304,6 +3331,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-meta-data",
|
||||
oauth2_scopes=[],
|
||||
@@ -3415,6 +3443,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-arts",
|
||||
oauth2_scopes=[],
|
||||
@@ -3513,6 +3542,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-arts",
|
||||
oauth2_scopes=[],
|
||||
@@ -3624,6 +3654,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="post-media-arts",
|
||||
oauth2_scopes=[],
|
||||
@@ -3732,6 +3763,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="post-media-arts",
|
||||
oauth2_scopes=[],
|
||||
@@ -3827,6 +3859,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-posters",
|
||||
oauth2_scopes=[],
|
||||
@@ -3925,6 +3958,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-posters",
|
||||
oauth2_scopes=[],
|
||||
@@ -4036,6 +4070,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="post-media-poster",
|
||||
oauth2_scopes=[],
|
||||
@@ -4144,6 +4179,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="post-media-poster",
|
||||
oauth2_scopes=[],
|
||||
@@ -4243,6 +4279,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getMetadataChildren",
|
||||
oauth2_scopes=[],
|
||||
@@ -4358,6 +4395,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getMetadataChildren",
|
||||
oauth2_scopes=[],
|
||||
@@ -4473,6 +4511,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTopWatchedContent",
|
||||
oauth2_scopes=[],
|
||||
@@ -4588,6 +4627,7 @@ class Library(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTopWatchedContent",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -77,6 +77,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="logLine",
|
||||
oauth2_scopes=[],
|
||||
@@ -192,6 +193,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="logLine",
|
||||
oauth2_scopes=[],
|
||||
@@ -320,6 +322,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="logMultiLine",
|
||||
oauth2_scopes=[],
|
||||
@@ -448,6 +451,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="logMultiLine",
|
||||
oauth2_scopes=[],
|
||||
@@ -550,6 +554,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="enablePaperTrail",
|
||||
oauth2_scopes=[],
|
||||
@@ -652,6 +657,7 @@ class Log(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="enablePaperTrail",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -70,6 +70,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="markPlayed",
|
||||
oauth2_scopes=[],
|
||||
@@ -178,6 +179,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="markPlayed",
|
||||
oauth2_scopes=[],
|
||||
@@ -286,6 +288,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="markUnplayed",
|
||||
oauth2_scopes=[],
|
||||
@@ -394,6 +397,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="markUnplayed",
|
||||
oauth2_scopes=[],
|
||||
@@ -509,6 +513,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlayProgress",
|
||||
oauth2_scopes=[],
|
||||
@@ -624,6 +629,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlayProgress",
|
||||
oauth2_scopes=[],
|
||||
@@ -734,6 +740,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-banner-image",
|
||||
oauth2_scopes=[],
|
||||
@@ -849,6 +856,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-banner-image",
|
||||
oauth2_scopes=[],
|
||||
@@ -964,6 +972,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-thumb-image",
|
||||
oauth2_scopes=[],
|
||||
@@ -1079,6 +1088,7 @@ class Media(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-thumb-image",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
# package
|
||||
|
||||
|
||||
@@ -1,6 +1,40 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from .security import Security, SecurityTypedDict
|
||||
from typing import TYPE_CHECKING
|
||||
from importlib import import_module
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .security import Security, SecurityTypedDict
|
||||
|
||||
__all__ = ["Security", "SecurityTypedDict"]
|
||||
|
||||
_dynamic_imports: dict[str, str] = {
|
||||
"Security": ".security",
|
||||
"SecurityTypedDict": ".security",
|
||||
}
|
||||
|
||||
|
||||
def __getattr__(attr_name: str) -> object:
|
||||
module_name = _dynamic_imports.get(attr_name)
|
||||
if module_name is None:
|
||||
raise AttributeError(
|
||||
f"No {attr_name} found in _dynamic_imports for module name -> {__name__} "
|
||||
)
|
||||
|
||||
try:
|
||||
module = import_module(module_name, __package__)
|
||||
result = getattr(module, attr_name)
|
||||
return result
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
f"Failed to import {attr_name} from {module_name}: {e}"
|
||||
) from e
|
||||
except AttributeError as e:
|
||||
raise AttributeError(
|
||||
f"Failed to get {attr_name} from {module_name}: {e}"
|
||||
) from e
|
||||
|
||||
|
||||
def __dir__():
|
||||
lazy_attrs = list(_dynamic_imports.keys())
|
||||
return sorted(lazy_attrs)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -80,6 +80,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="createPlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -196,6 +197,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="createPlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -310,6 +312,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylists",
|
||||
oauth2_scopes=[],
|
||||
@@ -424,6 +427,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylists",
|
||||
oauth2_scopes=[],
|
||||
@@ -537,6 +541,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -650,6 +655,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -762,6 +768,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="deletePlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -871,6 +878,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="deletePlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -986,6 +994,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -1101,6 +1110,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="updatePlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -1216,6 +1226,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
@@ -1334,6 +1345,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
@@ -1446,6 +1458,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="clearPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
@@ -1555,6 +1568,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="clearPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
@@ -1671,6 +1685,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="addPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
@@ -1790,6 +1805,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="addPlaylistContents",
|
||||
oauth2_scopes=[],
|
||||
@@ -1908,6 +1924,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="uploadPlaylist",
|
||||
oauth2_scopes=[],
|
||||
@@ -2023,6 +2040,7 @@ class Playlists(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="uploadPlaylist",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -63,6 +63,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getCompanionsData",
|
||||
oauth2_scopes=[],
|
||||
@@ -167,6 +168,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getCompanionsData",
|
||||
oauth2_scopes=[],
|
||||
@@ -271,6 +273,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getUserFriends",
|
||||
oauth2_scopes=[],
|
||||
@@ -375,6 +378,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getUserFriends",
|
||||
oauth2_scopes=[],
|
||||
@@ -478,6 +482,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getGeoData",
|
||||
oauth2_scopes=[],
|
||||
@@ -581,6 +586,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getGeoData",
|
||||
oauth2_scopes=[],
|
||||
@@ -685,6 +691,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getHomeData",
|
||||
oauth2_scopes=[],
|
||||
@@ -789,6 +796,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getHomeData",
|
||||
oauth2_scopes=[],
|
||||
@@ -915,6 +923,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-resources",
|
||||
oauth2_scopes=[],
|
||||
@@ -1041,6 +1050,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-resources",
|
||||
oauth2_scopes=[],
|
||||
@@ -1151,6 +1161,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPin",
|
||||
oauth2_scopes=[],
|
||||
@@ -1255,6 +1266,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getPin",
|
||||
oauth2_scopes=[],
|
||||
@@ -1362,6 +1374,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenByPinId",
|
||||
oauth2_scopes=[],
|
||||
@@ -1475,6 +1488,7 @@ class Plex(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTokenByPinId",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -6,30 +6,33 @@ from .sdkconfiguration import SDKConfiguration, ServerProtocol
|
||||
from .utils.logger import Logger, get_default_logger
|
||||
from .utils.retries import RetryConfig
|
||||
import httpx
|
||||
import importlib
|
||||
from plex_api_client import utils
|
||||
from plex_api_client._hooks import SDKHooks
|
||||
from plex_api_client.activities import Activities
|
||||
from plex_api_client.authentication import Authentication
|
||||
from plex_api_client.butler import Butler
|
||||
from plex_api_client.hubs import Hubs
|
||||
from plex_api_client.library import Library
|
||||
from plex_api_client.log import Log
|
||||
from plex_api_client.media import Media
|
||||
from plex_api_client.models import components
|
||||
from plex_api_client.playlists import Playlists
|
||||
from plex_api_client.plex import Plex
|
||||
from plex_api_client.search import Search
|
||||
from plex_api_client.server import Server
|
||||
from plex_api_client.sessions import Sessions
|
||||
from plex_api_client.statistics import Statistics
|
||||
from plex_api_client.types import OptionalNullable, UNSET
|
||||
from plex_api_client.updater import Updater
|
||||
from plex_api_client.users import Users
|
||||
from plex_api_client.video import Video
|
||||
from plex_api_client.watchlist import Watchlist
|
||||
from typing import Any, Callable, Dict, List, Optional, Union, cast
|
||||
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union, cast
|
||||
import weakref
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from plex_api_client.activities import Activities
|
||||
from plex_api_client.authentication import Authentication
|
||||
from plex_api_client.butler import Butler
|
||||
from plex_api_client.hubs import Hubs
|
||||
from plex_api_client.library import Library
|
||||
from plex_api_client.log import Log
|
||||
from plex_api_client.media import Media
|
||||
from plex_api_client.playlists import Playlists
|
||||
from plex_api_client.plex import Plex
|
||||
from plex_api_client.search import Search
|
||||
from plex_api_client.server import Server
|
||||
from plex_api_client.sessions import Sessions
|
||||
from plex_api_client.statistics import Statistics
|
||||
from plex_api_client.updater import Updater
|
||||
from plex_api_client.users import Users
|
||||
from plex_api_client.video import Video
|
||||
from plex_api_client.watchlist import Watchlist
|
||||
|
||||
|
||||
class PlexAPI(BaseSDK):
|
||||
r"""Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
||||
@@ -61,19 +64,19 @@ class PlexAPI(BaseSDK):
|
||||
|
||||
"""
|
||||
|
||||
server: Server
|
||||
server: "Server"
|
||||
r"""Operations against the Plex Media Server System.
|
||||
|
||||
"""
|
||||
media: Media
|
||||
media: "Media"
|
||||
r"""API Calls interacting with Plex Media Server Media
|
||||
|
||||
"""
|
||||
video: Video
|
||||
video: "Video"
|
||||
r"""API Calls that perform operations with Plex Media Server Videos
|
||||
|
||||
"""
|
||||
activities: Activities
|
||||
activities: "Activities"
|
||||
r"""Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||
Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
||||
Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details:
|
||||
@@ -83,59 +86,78 @@ class PlexAPI(BaseSDK):
|
||||
- The may contain a `Response` object which attributes which represent the result of the asynchronous operation.
|
||||
|
||||
"""
|
||||
butler: Butler
|
||||
butler: "Butler"
|
||||
r"""Butler is the task manager of the Plex Media Server Ecosystem.
|
||||
|
||||
"""
|
||||
plex: Plex
|
||||
plex: "Plex"
|
||||
r"""API Calls that perform operations directly against https://Plex.tv
|
||||
|
||||
"""
|
||||
hubs: Hubs
|
||||
hubs: "Hubs"
|
||||
r"""Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
||||
|
||||
"""
|
||||
search: Search
|
||||
search: "Search"
|
||||
r"""API Calls that perform search operations with Plex Media Server
|
||||
|
||||
"""
|
||||
library: Library
|
||||
library: "Library"
|
||||
r"""API Calls interacting with Plex Media Server Libraries
|
||||
|
||||
"""
|
||||
watchlist: Watchlist
|
||||
watchlist: "Watchlist"
|
||||
r"""API Calls that perform operations with Plex Media Server Watchlists
|
||||
|
||||
"""
|
||||
log: Log
|
||||
log: "Log"
|
||||
r"""Submit logs to the Log Handler for Plex Media Server
|
||||
|
||||
"""
|
||||
playlists: Playlists
|
||||
playlists: "Playlists"
|
||||
r"""Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as \"all albums from 2017\").
|
||||
They can be organized in (optionally nesting) folders.
|
||||
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||
This may cause the duration and number of items to change.
|
||||
|
||||
"""
|
||||
authentication: Authentication
|
||||
authentication: "Authentication"
|
||||
r"""API Calls regarding authentication for Plex Media Server
|
||||
|
||||
"""
|
||||
statistics: Statistics
|
||||
statistics: "Statistics"
|
||||
r"""API Calls that perform operations with Plex Media Server Statistics
|
||||
|
||||
"""
|
||||
sessions: Sessions
|
||||
sessions: "Sessions"
|
||||
r"""API Calls that perform search operations with Plex Media Server Sessions
|
||||
|
||||
"""
|
||||
updater: Updater
|
||||
updater: "Updater"
|
||||
r"""This describes the API for searching and applying updates to the Plex Media Server.
|
||||
Updates to the status can be observed via the Event API.
|
||||
|
||||
"""
|
||||
users: Users
|
||||
users: "Users"
|
||||
_sub_sdk_map = {
|
||||
"server": ("plex_api_client.server", "Server"),
|
||||
"media": ("plex_api_client.media", "Media"),
|
||||
"video": ("plex_api_client.video", "Video"),
|
||||
"activities": ("plex_api_client.activities", "Activities"),
|
||||
"butler": ("plex_api_client.butler", "Butler"),
|
||||
"plex": ("plex_api_client.plex", "Plex"),
|
||||
"hubs": ("plex_api_client.hubs", "Hubs"),
|
||||
"search": ("plex_api_client.search", "Search"),
|
||||
"library": ("plex_api_client.library", "Library"),
|
||||
"watchlist": ("plex_api_client.watchlist", "Watchlist"),
|
||||
"log": ("plex_api_client.log", "Log"),
|
||||
"playlists": ("plex_api_client.playlists", "Playlists"),
|
||||
"authentication": ("plex_api_client.authentication", "Authentication"),
|
||||
"statistics": ("plex_api_client.statistics", "Statistics"),
|
||||
"sessions": ("plex_api_client.sessions", "Sessions"),
|
||||
"updater": ("plex_api_client.updater", "Updater"),
|
||||
"users": ("plex_api_client.users", "Users"),
|
||||
}
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -226,6 +248,9 @@ class PlexAPI(BaseSDK):
|
||||
|
||||
hooks = SDKHooks()
|
||||
|
||||
# pylint: disable=protected-access
|
||||
self.sdk_configuration.__dict__["_hooks"] = hooks
|
||||
|
||||
current_server_url, *_ = self.sdk_configuration.get_server_details()
|
||||
server_url, self.sdk_configuration.client = hooks.sdk_init(
|
||||
current_server_url, client
|
||||
@@ -233,9 +258,6 @@ class PlexAPI(BaseSDK):
|
||||
if current_server_url != server_url:
|
||||
self.sdk_configuration.server_url = server_url
|
||||
|
||||
# pylint: disable=protected-access
|
||||
self.sdk_configuration.__dict__["_hooks"] = hooks
|
||||
|
||||
weakref.finalize(
|
||||
self,
|
||||
close_clients,
|
||||
@@ -246,26 +268,32 @@ class PlexAPI(BaseSDK):
|
||||
self.sdk_configuration.async_client_supplied,
|
||||
)
|
||||
|
||||
self._init_sdks()
|
||||
def __getattr__(self, name: str):
|
||||
if name in self._sub_sdk_map:
|
||||
module_path, class_name = self._sub_sdk_map[name]
|
||||
try:
|
||||
module = importlib.import_module(module_path)
|
||||
klass = getattr(module, class_name)
|
||||
instance = klass(self.sdk_configuration)
|
||||
setattr(self, name, instance)
|
||||
return instance
|
||||
except ImportError as e:
|
||||
raise AttributeError(
|
||||
f"Failed to import module {module_path} for attribute {name}: {e}"
|
||||
) from e
|
||||
except AttributeError as e:
|
||||
raise AttributeError(
|
||||
f"Failed to find class {class_name} in module {module_path} for attribute {name}: {e}"
|
||||
) from e
|
||||
|
||||
def _init_sdks(self):
|
||||
self.server = Server(self.sdk_configuration)
|
||||
self.media = Media(self.sdk_configuration)
|
||||
self.video = Video(self.sdk_configuration)
|
||||
self.activities = Activities(self.sdk_configuration)
|
||||
self.butler = Butler(self.sdk_configuration)
|
||||
self.plex = Plex(self.sdk_configuration)
|
||||
self.hubs = Hubs(self.sdk_configuration)
|
||||
self.search = Search(self.sdk_configuration)
|
||||
self.library = Library(self.sdk_configuration)
|
||||
self.watchlist = Watchlist(self.sdk_configuration)
|
||||
self.log = Log(self.sdk_configuration)
|
||||
self.playlists = Playlists(self.sdk_configuration)
|
||||
self.authentication = Authentication(self.sdk_configuration)
|
||||
self.statistics = Statistics(self.sdk_configuration)
|
||||
self.sessions = Sessions(self.sdk_configuration)
|
||||
self.updater = Updater(self.sdk_configuration)
|
||||
self.users = Users(self.sdk_configuration)
|
||||
raise AttributeError(
|
||||
f"'{type(self).__name__}' object has no attribute '{name}'"
|
||||
)
|
||||
|
||||
def __dir__(self):
|
||||
default_attrs = list(super().__dir__())
|
||||
lazy_attrs = list(self._sub_sdk_map.keys())
|
||||
return sorted(list(set(default_attrs + lazy_attrs)))
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from ._hooks import SDKHooks
|
||||
from ._version import (
|
||||
__gen_version__,
|
||||
__openapi_doc_version__,
|
||||
@@ -52,9 +51,6 @@ class SDKConfiguration:
|
||||
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
|
||||
timeout_ms: Optional[int] = None
|
||||
|
||||
def __post_init__(self):
|
||||
self._hooks = SDKHooks()
|
||||
|
||||
def get_server_details(self) -> Tuple[str, Dict[str, str]]:
|
||||
if self.server_url is not None and self.server_url:
|
||||
return remove_suffix(self.server_url, "/"), {}
|
||||
@@ -62,6 +58,3 @@ class SDKConfiguration:
|
||||
self.server_idx = 0
|
||||
|
||||
return SERVERS[self.server_idx], self.server_defaults[self.server_idx]
|
||||
|
||||
def get_hooks(self) -> SDKHooks:
|
||||
return self._hooks
|
||||
|
||||
@@ -88,6 +88,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="performSearch",
|
||||
oauth2_scopes=[],
|
||||
@@ -214,6 +215,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="performSearch",
|
||||
oauth2_scopes=[],
|
||||
@@ -332,6 +334,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="performVoiceSearch",
|
||||
oauth2_scopes=[],
|
||||
@@ -450,6 +453,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="performVoiceSearch",
|
||||
oauth2_scopes=[],
|
||||
@@ -558,6 +562,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSearchResults",
|
||||
oauth2_scopes=[],
|
||||
@@ -669,6 +674,7 @@ class Search(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSearchResults",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -63,6 +63,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerCapabilities",
|
||||
oauth2_scopes=[],
|
||||
@@ -168,6 +169,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerCapabilities",
|
||||
oauth2_scopes=[],
|
||||
@@ -273,6 +275,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerPreferences",
|
||||
oauth2_scopes=[],
|
||||
@@ -377,6 +380,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerPreferences",
|
||||
oauth2_scopes=[],
|
||||
@@ -481,6 +485,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getAvailableClients",
|
||||
oauth2_scopes=[],
|
||||
@@ -585,6 +590,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getAvailableClients",
|
||||
oauth2_scopes=[],
|
||||
@@ -689,6 +695,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getDevices",
|
||||
oauth2_scopes=[],
|
||||
@@ -793,6 +800,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getDevices",
|
||||
oauth2_scopes=[],
|
||||
@@ -896,6 +904,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-identity",
|
||||
oauth2_scopes=[],
|
||||
@@ -993,6 +1002,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-server-identity",
|
||||
oauth2_scopes=[],
|
||||
@@ -1091,6 +1101,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getMyPlexAccount",
|
||||
oauth2_scopes=[],
|
||||
@@ -1195,6 +1206,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getMyPlexAccount",
|
||||
oauth2_scopes=[],
|
||||
@@ -1310,6 +1322,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getResizedPhoto",
|
||||
oauth2_scopes=[],
|
||||
@@ -1422,6 +1435,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getResizedPhoto",
|
||||
oauth2_scopes=[],
|
||||
@@ -1530,6 +1544,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-providers",
|
||||
oauth2_scopes=[],
|
||||
@@ -1641,6 +1656,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-media-providers",
|
||||
oauth2_scopes=[],
|
||||
@@ -1745,6 +1761,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerList",
|
||||
oauth2_scopes=[],
|
||||
@@ -1849,6 +1866,7 @@ class Server(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getServerList",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -63,6 +63,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessions",
|
||||
oauth2_scopes=[],
|
||||
@@ -167,6 +168,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessions",
|
||||
oauth2_scopes=[],
|
||||
@@ -291,6 +293,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessionHistory",
|
||||
oauth2_scopes=[],
|
||||
@@ -415,6 +418,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getSessionHistory",
|
||||
oauth2_scopes=[],
|
||||
@@ -519,6 +523,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTranscodeSessions",
|
||||
oauth2_scopes=[],
|
||||
@@ -623,6 +628,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTranscodeSessions",
|
||||
oauth2_scopes=[],
|
||||
@@ -734,6 +740,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTranscodeSession",
|
||||
oauth2_scopes=[],
|
||||
@@ -842,6 +849,7 @@ class Sessions(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="stopTranscodeSession",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -70,6 +70,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getStatistics",
|
||||
oauth2_scopes=[],
|
||||
@@ -181,6 +182,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getStatistics",
|
||||
oauth2_scopes=[],
|
||||
@@ -292,6 +294,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getResourcesStatistics",
|
||||
oauth2_scopes=[],
|
||||
@@ -404,6 +407,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getResourcesStatistics",
|
||||
oauth2_scopes=[],
|
||||
@@ -516,6 +520,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getBandwidthStatistics",
|
||||
oauth2_scopes=[],
|
||||
@@ -628,6 +633,7 @@ class Statistics(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getBandwidthStatistics",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -66,6 +66,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getUpdateStatus",
|
||||
oauth2_scopes=[],
|
||||
@@ -170,6 +171,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getUpdateStatus",
|
||||
oauth2_scopes=[],
|
||||
@@ -281,6 +283,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="checkForUpdates",
|
||||
oauth2_scopes=[],
|
||||
@@ -389,6 +392,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="checkForUpdates",
|
||||
oauth2_scopes=[],
|
||||
@@ -501,6 +505,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="applyUpdates",
|
||||
oauth2_scopes=[],
|
||||
@@ -613,6 +618,7 @@ class Updater(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="applyUpdates",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -67,6 +67,7 @@ class Users(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-users",
|
||||
oauth2_scopes=[],
|
||||
@@ -176,6 +177,7 @@ class Users(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-users",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -1,51 +1,55 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from .annotations import get_discriminator
|
||||
from .datetimes import parse_datetime
|
||||
from .enums import OpenEnumMeta
|
||||
from .headers import get_headers, get_response_headers
|
||||
from .metadata import (
|
||||
FieldMetadata,
|
||||
find_metadata,
|
||||
FormMetadata,
|
||||
HeaderMetadata,
|
||||
MultipartFormMetadata,
|
||||
PathParamMetadata,
|
||||
QueryParamMetadata,
|
||||
RequestMetadata,
|
||||
SecurityMetadata,
|
||||
)
|
||||
from .queryparams import get_query_params
|
||||
from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig
|
||||
from .requestbodies import serialize_request_body, SerializedRequestBody
|
||||
from .security import get_security
|
||||
from .serializers import (
|
||||
get_pydantic_model,
|
||||
marshal_json,
|
||||
unmarshal,
|
||||
unmarshal_json,
|
||||
serialize_decimal,
|
||||
serialize_float,
|
||||
serialize_int,
|
||||
stream_to_text,
|
||||
stream_to_text_async,
|
||||
stream_to_bytes,
|
||||
stream_to_bytes_async,
|
||||
validate_const,
|
||||
validate_decimal,
|
||||
validate_float,
|
||||
validate_int,
|
||||
validate_open_enum,
|
||||
)
|
||||
from .url import generate_url, template_url, remove_suffix
|
||||
from .values import (
|
||||
get_global_from_env,
|
||||
match_content_type,
|
||||
match_status_codes,
|
||||
match_response,
|
||||
cast_partial,
|
||||
)
|
||||
from .logger import Logger, get_body_content, get_default_logger
|
||||
from typing import TYPE_CHECKING
|
||||
from importlib import import_module
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .annotations import get_discriminator
|
||||
from .datetimes import parse_datetime
|
||||
from .enums import OpenEnumMeta
|
||||
from .headers import get_headers, get_response_headers
|
||||
from .metadata import (
|
||||
FieldMetadata,
|
||||
find_metadata,
|
||||
FormMetadata,
|
||||
HeaderMetadata,
|
||||
MultipartFormMetadata,
|
||||
PathParamMetadata,
|
||||
QueryParamMetadata,
|
||||
RequestMetadata,
|
||||
SecurityMetadata,
|
||||
)
|
||||
from .queryparams import get_query_params
|
||||
from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig
|
||||
from .requestbodies import serialize_request_body, SerializedRequestBody
|
||||
from .security import get_security
|
||||
from .serializers import (
|
||||
get_pydantic_model,
|
||||
marshal_json,
|
||||
unmarshal,
|
||||
unmarshal_json,
|
||||
serialize_decimal,
|
||||
serialize_float,
|
||||
serialize_int,
|
||||
stream_to_text,
|
||||
stream_to_text_async,
|
||||
stream_to_bytes,
|
||||
stream_to_bytes_async,
|
||||
validate_const,
|
||||
validate_decimal,
|
||||
validate_float,
|
||||
validate_int,
|
||||
validate_open_enum,
|
||||
)
|
||||
from .url import generate_url, template_url, remove_suffix
|
||||
from .values import (
|
||||
get_global_from_env,
|
||||
match_content_type,
|
||||
match_status_codes,
|
||||
match_response,
|
||||
cast_partial,
|
||||
)
|
||||
from .logger import Logger, get_body_content, get_default_logger
|
||||
|
||||
__all__ = [
|
||||
"BackoffStrategy",
|
||||
@@ -56,6 +60,7 @@ __all__ = [
|
||||
"get_body_content",
|
||||
"get_default_logger",
|
||||
"get_discriminator",
|
||||
"parse_datetime",
|
||||
"get_global_from_env",
|
||||
"get_headers",
|
||||
"get_pydantic_model",
|
||||
@@ -98,3 +103,82 @@ __all__ = [
|
||||
"validate_open_enum",
|
||||
"cast_partial",
|
||||
]
|
||||
|
||||
_dynamic_imports: dict[str, str] = {
|
||||
"BackoffStrategy": ".retries",
|
||||
"FieldMetadata": ".metadata",
|
||||
"find_metadata": ".metadata",
|
||||
"FormMetadata": ".metadata",
|
||||
"generate_url": ".url",
|
||||
"get_body_content": ".logger",
|
||||
"get_default_logger": ".logger",
|
||||
"get_discriminator": ".annotations",
|
||||
"parse_datetime": ".datetimes",
|
||||
"get_global_from_env": ".values",
|
||||
"get_headers": ".headers",
|
||||
"get_pydantic_model": ".serializers",
|
||||
"get_query_params": ".queryparams",
|
||||
"get_response_headers": ".headers",
|
||||
"get_security": ".security",
|
||||
"HeaderMetadata": ".metadata",
|
||||
"Logger": ".logger",
|
||||
"marshal_json": ".serializers",
|
||||
"match_content_type": ".values",
|
||||
"match_status_codes": ".values",
|
||||
"match_response": ".values",
|
||||
"MultipartFormMetadata": ".metadata",
|
||||
"OpenEnumMeta": ".enums",
|
||||
"PathParamMetadata": ".metadata",
|
||||
"QueryParamMetadata": ".metadata",
|
||||
"remove_suffix": ".url",
|
||||
"Retries": ".retries",
|
||||
"retry": ".retries",
|
||||
"retry_async": ".retries",
|
||||
"RetryConfig": ".retries",
|
||||
"RequestMetadata": ".metadata",
|
||||
"SecurityMetadata": ".metadata",
|
||||
"serialize_decimal": ".serializers",
|
||||
"serialize_float": ".serializers",
|
||||
"serialize_int": ".serializers",
|
||||
"serialize_request_body": ".requestbodies",
|
||||
"SerializedRequestBody": ".requestbodies",
|
||||
"stream_to_text": ".serializers",
|
||||
"stream_to_text_async": ".serializers",
|
||||
"stream_to_bytes": ".serializers",
|
||||
"stream_to_bytes_async": ".serializers",
|
||||
"template_url": ".url",
|
||||
"unmarshal": ".serializers",
|
||||
"unmarshal_json": ".serializers",
|
||||
"validate_decimal": ".serializers",
|
||||
"validate_const": ".serializers",
|
||||
"validate_float": ".serializers",
|
||||
"validate_int": ".serializers",
|
||||
"validate_open_enum": ".serializers",
|
||||
"cast_partial": ".values",
|
||||
}
|
||||
|
||||
|
||||
def __getattr__(attr_name: str) -> object:
|
||||
module_name = _dynamic_imports.get(attr_name)
|
||||
if module_name is None:
|
||||
raise AttributeError(
|
||||
f"no {attr_name} found in _dynamic_imports, module name -> {__name__} "
|
||||
)
|
||||
|
||||
try:
|
||||
module = import_module(module_name, __package__)
|
||||
result = getattr(module, attr_name)
|
||||
return result
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
f"Failed to import {attr_name} from {module_name}: {e}"
|
||||
) from e
|
||||
except AttributeError as e:
|
||||
raise AttributeError(
|
||||
f"Failed to get {attr_name} from {module_name}: {e}"
|
||||
) from e
|
||||
|
||||
|
||||
def __dir__():
|
||||
lazy_attrs = list(_dynamic_imports.keys())
|
||||
return sorted(lazy_attrs)
|
||||
|
||||
@@ -72,6 +72,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTimeline",
|
||||
oauth2_scopes=[],
|
||||
@@ -182,6 +183,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="getTimeline",
|
||||
oauth2_scopes=[],
|
||||
@@ -295,6 +297,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="startUniversalTranscode",
|
||||
oauth2_scopes=[],
|
||||
@@ -408,6 +411,7 @@ class Video(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="startUniversalTranscode",
|
||||
oauth2_scopes=[],
|
||||
|
||||
@@ -72,6 +72,7 @@ class Watchlist(BaseSDK):
|
||||
|
||||
http_res = self.do_request(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-watch-list",
|
||||
oauth2_scopes=[],
|
||||
@@ -185,6 +186,7 @@ class Watchlist(BaseSDK):
|
||||
|
||||
http_res = await self.do_request_async(
|
||||
hook_ctx=HookContext(
|
||||
config=self.sdk_configuration,
|
||||
base_url=base_url or "",
|
||||
operation_id="get-watch-list",
|
||||
oauth2_scopes=[],
|
||||
|
||||
Reference in New Issue
Block a user