plex-api-client 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plex-api-client-0.5.0/LICENSE.md +21 -0
- plex-api-client-0.5.0/PKG-INFO +380 -0
- plex-api-client-0.5.0/README.md +368 -0
- plex-api-client-0.5.0/setup.cfg +4 -0
- plex-api-client-0.5.0/setup.py +43 -0
- plex-api-client-0.5.0/src/plex_api/__init__.py +4 -0
- plex-api-client-0.5.0/src/plex_api/_hooks/__init__.py +5 -0
- plex-api-client-0.5.0/src/plex_api/_hooks/registration.py +13 -0
- plex-api-client-0.5.0/src/plex_api/_hooks/sdkhooks.py +55 -0
- plex-api-client-0.5.0/src/plex_api/_hooks/types.py +70 -0
- plex-api-client-0.5.0/src/plex_api/activities.py +153 -0
- plex-api-client-0.5.0/src/plex_api/authentication.py +148 -0
- plex-api-client-0.5.0/src/plex_api/butler.py +338 -0
- plex-api-client-0.5.0/src/plex_api/hubs.py +160 -0
- plex-api-client-0.5.0/src/plex_api/library.py +819 -0
- plex-api-client-0.5.0/src/plex_api/log.py +228 -0
- plex-api-client-0.5.0/src/plex_api/media.py +213 -0
- plex-api-client-0.5.0/src/plex_api/models/__init__.py +4 -0
- plex-api-client-0.5.0/src/plex_api/models/components/__init__.py +5 -0
- plex-api-client-0.5.0/src/plex_api/models/components/security.py +11 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/__init__.py +63 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/addplaylistcontents.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/applyupdates.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/cancelserveractivities.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/checkforupdates.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/clearplaylistcontents.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/createplaylist.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/deletelibrary.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/deleteplaylist.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/enablepapertrail.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getavailableclients.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getbutlertasks.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getdevices.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getfilehash.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getglobalhubs.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getlibraries.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getlibrary.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getlibraryhubs.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getmetadata.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getmetadatachildren.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getmyplexaccount.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getondeck.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getpin.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getplaylist.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getplaylistcontents.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getplaylists.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getrecentlyadded.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getresizedphoto.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getsearchresults.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getserveractivities.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getservercapabilities.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getserveridentity.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getserverlist.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getserverpreferences.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getsessionhistory.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getsessions.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getsourceconnectioninformation.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getstatistics.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/gettimeline.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/gettoken.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/gettranscodesessions.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/gettransienttoken.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/getupdatestatus.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/logline.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/logmultiline.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/markplayed.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/markunplayed.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/performsearch.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/performvoicesearch.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/refreshlibrary.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/sdkerror.py +24 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/startalltasks.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/starttask.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/startuniversaltranscode.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/stopalltasks.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/stoptask.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/stoptranscodesession.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/updateplaylist.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/updateplayprogress.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/errors/uploadplaylist.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/__init__.py +64 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/addplaylistcontents.py +74 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/applyupdates.py +39 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/cancelserveractivities.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/checkforupdates.py +32 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/clearplaylistcontents.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/createplaylist.py +91 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/deletelibrary.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/deleteplaylist.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/enablepapertrail.py +17 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getavailableclients.py +58 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getbutlertasks.py +52 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getdevices.py +53 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getfilehash.py +28 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getglobalhubs.py +100 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getlibraries.py +79 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getlibrary.py +153 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getlibraryhubs.py +205 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getlibraryitems.py +227 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getmetadata.py +264 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getmetadatachildren.py +115 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getmyplexaccount.py +50 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getondeck.py +166 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getpin.py +86 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getplaylist.py +70 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getplaylistcontents.py +178 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getplaylists.py +85 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getrecentlyadded.py +166 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getresizedphoto.py +48 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getsearchresults.py +182 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getserveractivities.py +63 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getservercapabilities.py +99 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getserveridentity.py +42 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getserverlist.py +53 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getserverpreferences.py +57 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getsessionhistory.py +67 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getsessions.py +185 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getsourceconnectioninformation.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getstatistics.py +93 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/gettimeline.py +50 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/gettoken.py +35 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/gettranscodesessions.py +71 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/gettransienttoken.py +36 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/getupdatestatus.py +57 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/logline.py +50 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/logmultiline.py +17 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/markplayed.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/markunplayed.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/performsearch.py +30 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/performvoicesearch.py +30 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/refreshlibrary.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/searchlibrary.py +96 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/startalltasks.py +17 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/starttask.py +43 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/startuniversaltranscode.py +56 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/stopalltasks.py +17 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/stoptask.py +43 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/stoptranscodesession.py +25 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/updateplaylist.py +30 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/updateplayprogress.py +29 -0
- plex-api-client-0.5.0/src/plex_api/models/operations/uploadplaylist.py +47 -0
- plex-api-client-0.5.0/src/plex_api/playlists.py +638 -0
- plex-api-client-0.5.0/src/plex_api/plex.py +156 -0
- plex-api-client-0.5.0/src/plex_api/sdk.py +179 -0
- plex-api-client-0.5.0/src/plex_api/sdkconfiguration.py +52 -0
- plex-api-client-0.5.0/src/plex_api/search.py +235 -0
- plex-api-client-0.5.0/src/plex_api/server.py +533 -0
- plex-api-client-0.5.0/src/plex_api/sessions.py +276 -0
- plex-api-client-0.5.0/src/plex_api/statistics.py +87 -0
- plex-api-client-0.5.0/src/plex_api/updater.py +215 -0
- plex-api-client-0.5.0/src/plex_api/utils/__init__.py +4 -0
- plex-api-client-0.5.0/src/plex_api/utils/retries.py +120 -0
- plex-api-client-0.5.0/src/plex_api/utils/utils.py +898 -0
- plex-api-client-0.5.0/src/plex_api/video.py +138 -0
- plex-api-client-0.5.0/src/plex_api_client.egg-info/PKG-INFO +380 -0
- plex-api-client-0.5.0/src/plex_api_client.egg-info/SOURCES.txt +157 -0
- plex-api-client-0.5.0/src/plex_api_client.egg-info/dependency_links.txt +1 -0
- plex-api-client-0.5.0/src/plex_api_client.egg-info/requires.txt +17 -0
- plex-api-client-0.5.0/src/plex_api_client.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 LukeHagar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: plex-api-client
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: Python Client SDK Generated by Speakeasy
|
|
5
|
+
Home-page: UNKNOWN
|
|
6
|
+
Author: LukeHagar
|
|
7
|
+
License: UNKNOWN
|
|
8
|
+
Description: # plexpy
|
|
9
|
+
|
|
10
|
+
<div align="left">
|
|
11
|
+
<a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
|
12
|
+
<a href="https://opensource.org/licenses/MIT">
|
|
13
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
|
|
14
|
+
</a>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- Start SDK Installation [installation] -->
|
|
18
|
+
## SDK Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install plex-api-client
|
|
22
|
+
```
|
|
23
|
+
<!-- End SDK Installation [installation] -->
|
|
24
|
+
|
|
25
|
+
<!-- Start SDK Example Usage [usage] -->
|
|
26
|
+
## SDK Example Usage
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import plex_api
|
|
32
|
+
|
|
33
|
+
s = plex_api.PlexAPI(
|
|
34
|
+
access_token="<YOUR_API_KEY_HERE>",
|
|
35
|
+
x_plex_client_identifier='<value>',
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
res = s.server.get_server_capabilities()
|
|
40
|
+
|
|
41
|
+
if res.object is not None:
|
|
42
|
+
# handle response
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
<!-- End SDK Example Usage [usage] -->
|
|
47
|
+
|
|
48
|
+
<!-- Start Available Resources and Operations [operations] -->
|
|
49
|
+
## Available Resources and Operations
|
|
50
|
+
|
|
51
|
+
### [server](docs/sdks/server/README.md)
|
|
52
|
+
|
|
53
|
+
* [get_server_capabilities](docs/sdks/server/README.md#get_server_capabilities) - Server Capabilities
|
|
54
|
+
* [get_server_preferences](docs/sdks/server/README.md#get_server_preferences) - Get Server Preferences
|
|
55
|
+
* [get_available_clients](docs/sdks/server/README.md#get_available_clients) - Get Available Clients
|
|
56
|
+
* [get_devices](docs/sdks/server/README.md#get_devices) - Get Devices
|
|
57
|
+
* [get_server_identity](docs/sdks/server/README.md#get_server_identity) - Get Server Identity
|
|
58
|
+
* [get_my_plex_account](docs/sdks/server/README.md#get_my_plex_account) - Get MyPlex Account
|
|
59
|
+
* [get_resized_photo](docs/sdks/server/README.md#get_resized_photo) - Get a Resized Photo
|
|
60
|
+
* [get_server_list](docs/sdks/server/README.md#get_server_list) - Get Server List
|
|
61
|
+
|
|
62
|
+
### [media](docs/sdks/media/README.md)
|
|
63
|
+
|
|
64
|
+
* [mark_played](docs/sdks/media/README.md#mark_played) - Mark Media Played
|
|
65
|
+
* [mark_unplayed](docs/sdks/media/README.md#mark_unplayed) - Mark Media Unplayed
|
|
66
|
+
* [update_play_progress](docs/sdks/media/README.md#update_play_progress) - Update Media Play Progress
|
|
67
|
+
|
|
68
|
+
### [video](docs/sdks/video/README.md)
|
|
69
|
+
|
|
70
|
+
* [get_timeline](docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item
|
|
71
|
+
* [start_universal_transcode](docs/sdks/video/README.md#start_universal_transcode) - Start Universal Transcode
|
|
72
|
+
|
|
73
|
+
### [activities](docs/sdks/activities/README.md)
|
|
74
|
+
|
|
75
|
+
* [get_server_activities](docs/sdks/activities/README.md#get_server_activities) - Get Server Activities
|
|
76
|
+
* [cancel_server_activities](docs/sdks/activities/README.md#cancel_server_activities) - Cancel Server Activities
|
|
77
|
+
|
|
78
|
+
### [butler](docs/sdks/butler/README.md)
|
|
79
|
+
|
|
80
|
+
* [get_butler_tasks](docs/sdks/butler/README.md#get_butler_tasks) - Get Butler tasks
|
|
81
|
+
* [start_all_tasks](docs/sdks/butler/README.md#start_all_tasks) - Start all Butler tasks
|
|
82
|
+
* [stop_all_tasks](docs/sdks/butler/README.md#stop_all_tasks) - Stop all Butler tasks
|
|
83
|
+
* [start_task](docs/sdks/butler/README.md#start_task) - Start a single Butler task
|
|
84
|
+
* [stop_task](docs/sdks/butler/README.md#stop_task) - Stop a single Butler task
|
|
85
|
+
|
|
86
|
+
### [hubs](docs/sdks/hubs/README.md)
|
|
87
|
+
|
|
88
|
+
* [get_global_hubs](docs/sdks/hubs/README.md#get_global_hubs) - Get Global Hubs
|
|
89
|
+
* [get_library_hubs](docs/sdks/hubs/README.md#get_library_hubs) - Get library specific hubs
|
|
90
|
+
|
|
91
|
+
### [search](docs/sdks/search/README.md)
|
|
92
|
+
|
|
93
|
+
* [perform_search](docs/sdks/search/README.md#perform_search) - Perform a search
|
|
94
|
+
* [perform_voice_search](docs/sdks/search/README.md#perform_voice_search) - Perform a voice search
|
|
95
|
+
* [get_search_results](docs/sdks/search/README.md#get_search_results) - Get Search Results
|
|
96
|
+
|
|
97
|
+
### [library](docs/sdks/library/README.md)
|
|
98
|
+
|
|
99
|
+
* [get_file_hash](docs/sdks/library/README.md#get_file_hash) - Get Hash Value
|
|
100
|
+
* [get_recently_added](docs/sdks/library/README.md#get_recently_added) - Get Recently Added
|
|
101
|
+
* [get_libraries](docs/sdks/library/README.md#get_libraries) - Get All Libraries
|
|
102
|
+
* [get_library](docs/sdks/library/README.md#get_library) - Get Library Details
|
|
103
|
+
* [delete_library](docs/sdks/library/README.md#delete_library) - Delete Library Section
|
|
104
|
+
* [get_library_items](docs/sdks/library/README.md#get_library_items) - Get Library Items
|
|
105
|
+
* [refresh_library](docs/sdks/library/README.md#refresh_library) - Refresh Library
|
|
106
|
+
* [search_library](docs/sdks/library/README.md#search_library) - Search Library
|
|
107
|
+
* [get_metadata](docs/sdks/library/README.md#get_metadata) - Get Items Metadata
|
|
108
|
+
* [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children
|
|
109
|
+
* [get_on_deck](docs/sdks/library/README.md#get_on_deck) - Get On Deck
|
|
110
|
+
|
|
111
|
+
### [log](docs/sdks/log/README.md)
|
|
112
|
+
|
|
113
|
+
* [log_line](docs/sdks/log/README.md#log_line) - Logging a single line message.
|
|
114
|
+
* [log_multi_line](docs/sdks/log/README.md#log_multi_line) - Logging a multi-line message
|
|
115
|
+
* [enable_paper_trail](docs/sdks/log/README.md#enable_paper_trail) - Enabling Papertrail
|
|
116
|
+
|
|
117
|
+
### [plex](docs/sdks/plex/README.md)
|
|
118
|
+
|
|
119
|
+
* [get_pin](docs/sdks/plex/README.md#get_pin) - Get a Pin
|
|
120
|
+
* [get_token](docs/sdks/plex/README.md#get_token) - Get Access Token
|
|
121
|
+
|
|
122
|
+
### [playlists](docs/sdks/playlists/README.md)
|
|
123
|
+
|
|
124
|
+
* [create_playlist](docs/sdks/playlists/README.md#create_playlist) - Create a Playlist
|
|
125
|
+
* [get_playlists](docs/sdks/playlists/README.md#get_playlists) - Get All Playlists
|
|
126
|
+
* [get_playlist](docs/sdks/playlists/README.md#get_playlist) - Retrieve Playlist
|
|
127
|
+
* [delete_playlist](docs/sdks/playlists/README.md#delete_playlist) - Deletes a Playlist
|
|
128
|
+
* [update_playlist](docs/sdks/playlists/README.md#update_playlist) - Update a Playlist
|
|
129
|
+
* [get_playlist_contents](docs/sdks/playlists/README.md#get_playlist_contents) - Retrieve Playlist Contents
|
|
130
|
+
* [clear_playlist_contents](docs/sdks/playlists/README.md#clear_playlist_contents) - Delete Playlist Contents
|
|
131
|
+
* [add_playlist_contents](docs/sdks/playlists/README.md#add_playlist_contents) - Adding to a Playlist
|
|
132
|
+
* [upload_playlist](docs/sdks/playlists/README.md#upload_playlist) - Upload Playlist
|
|
133
|
+
|
|
134
|
+
### [authentication](docs/sdks/authentication/README.md)
|
|
135
|
+
|
|
136
|
+
* [get_transient_token](docs/sdks/authentication/README.md#get_transient_token) - Get a Transient Token.
|
|
137
|
+
* [get_source_connection_information](docs/sdks/authentication/README.md#get_source_connection_information) - Get Source Connection Information
|
|
138
|
+
|
|
139
|
+
### [statistics](docs/sdks/statistics/README.md)
|
|
140
|
+
|
|
141
|
+
* [get_statistics](docs/sdks/statistics/README.md#get_statistics) - Get Media Statistics
|
|
142
|
+
|
|
143
|
+
### [sessions](docs/sdks/sessions/README.md)
|
|
144
|
+
|
|
145
|
+
* [get_sessions](docs/sdks/sessions/README.md#get_sessions) - Get Active Sessions
|
|
146
|
+
* [get_session_history](docs/sdks/sessions/README.md#get_session_history) - Get Session History
|
|
147
|
+
* [get_transcode_sessions](docs/sdks/sessions/README.md#get_transcode_sessions) - Get Transcode Sessions
|
|
148
|
+
* [stop_transcode_session](docs/sdks/sessions/README.md#stop_transcode_session) - Stop a Transcode Session
|
|
149
|
+
|
|
150
|
+
### [updater](docs/sdks/updater/README.md)
|
|
151
|
+
|
|
152
|
+
* [get_update_status](docs/sdks/updater/README.md#get_update_status) - Querying status of updates
|
|
153
|
+
* [check_for_updates](docs/sdks/updater/README.md#check_for_updates) - Checking for updates
|
|
154
|
+
* [apply_updates](docs/sdks/updater/README.md#apply_updates) - Apply Updates
|
|
155
|
+
<!-- End Available Resources and Operations [operations] -->
|
|
156
|
+
|
|
157
|
+
<!-- Start Error Handling [errors] -->
|
|
158
|
+
## Error Handling
|
|
159
|
+
|
|
160
|
+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
|
|
161
|
+
|
|
162
|
+
| Error Object | Status Code | Content Type |
|
|
163
|
+
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
|
164
|
+
| errors.GetServerCapabilitiesResponseBody | 401 | application/json |
|
|
165
|
+
| errors.SDKError | 4x-5xx | */* |
|
|
166
|
+
|
|
167
|
+
### Example
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
import plex_api
|
|
171
|
+
from plex_api.models import errors
|
|
172
|
+
|
|
173
|
+
s = plex_api.PlexAPI(
|
|
174
|
+
access_token="<YOUR_API_KEY_HERE>",
|
|
175
|
+
x_plex_client_identifier='<value>',
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
res = None
|
|
180
|
+
try:
|
|
181
|
+
res = s.server.get_server_capabilities()
|
|
182
|
+
except errors.GetServerCapabilitiesResponseBody as e:
|
|
183
|
+
# handle exception
|
|
184
|
+
raise(e)
|
|
185
|
+
except errors.SDKError as e:
|
|
186
|
+
# handle exception
|
|
187
|
+
raise(e)
|
|
188
|
+
|
|
189
|
+
if res.object is not None:
|
|
190
|
+
# handle response
|
|
191
|
+
pass
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
<!-- End Error Handling [errors] -->
|
|
195
|
+
|
|
196
|
+
<!-- Start Server Selection [server] -->
|
|
197
|
+
## Server Selection
|
|
198
|
+
|
|
199
|
+
### Select Server by Index
|
|
200
|
+
|
|
201
|
+
You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
|
|
202
|
+
|
|
203
|
+
| # | Server | Variables |
|
|
204
|
+
| - | ------ | --------- |
|
|
205
|
+
| 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
|
|
206
|
+
|
|
207
|
+
#### Example
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
import plex_api
|
|
211
|
+
|
|
212
|
+
s = plex_api.PlexAPI(
|
|
213
|
+
server_idx=0,
|
|
214
|
+
access_token="<YOUR_API_KEY_HERE>",
|
|
215
|
+
x_plex_client_identifier='<value>',
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
res = s.server.get_server_capabilities()
|
|
220
|
+
|
|
221
|
+
if res.object is not None:
|
|
222
|
+
# handle response
|
|
223
|
+
pass
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
#### Variables
|
|
228
|
+
|
|
229
|
+
Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
|
|
230
|
+
* `protocol: models.ServerProtocol`
|
|
231
|
+
* `ip: str`
|
|
232
|
+
* `port: str`
|
|
233
|
+
|
|
234
|
+
### Override Server URL Per-Client
|
|
235
|
+
|
|
236
|
+
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:
|
|
237
|
+
```python
|
|
238
|
+
import plex_api
|
|
239
|
+
|
|
240
|
+
s = plex_api.PlexAPI(
|
|
241
|
+
server_url="{protocol}://{ip}:{port}",
|
|
242
|
+
access_token="<YOUR_API_KEY_HERE>",
|
|
243
|
+
x_plex_client_identifier='<value>',
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
res = s.server.get_server_capabilities()
|
|
248
|
+
|
|
249
|
+
if res.object is not None:
|
|
250
|
+
# handle response
|
|
251
|
+
pass
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Override Server URL Per-Operation
|
|
256
|
+
|
|
257
|
+
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
|
|
258
|
+
```python
|
|
259
|
+
import plex_api
|
|
260
|
+
|
|
261
|
+
s = plex_api.PlexAPI(
|
|
262
|
+
x_plex_client_identifier='<value>',
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
res = s.plex.get_pin(server_url="https://plex.tv/api/v2", strong=False, x_plex_client_identifier='<value>')
|
|
267
|
+
|
|
268
|
+
if res.object is not None:
|
|
269
|
+
# handle response
|
|
270
|
+
pass
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
<!-- End Server Selection [server] -->
|
|
274
|
+
|
|
275
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
|
276
|
+
## Custom HTTP Client
|
|
277
|
+
|
|
278
|
+
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
|
|
279
|
+
|
|
280
|
+
For example, you could specify a header for every request that this sdk makes as follows:
|
|
281
|
+
```python
|
|
282
|
+
import plex_api
|
|
283
|
+
import requests
|
|
284
|
+
|
|
285
|
+
http_client = requests.Session()
|
|
286
|
+
http_client.headers.update({'x-custom-header': 'someValue'})
|
|
287
|
+
s = plex_api.PlexAPI(client: http_client)
|
|
288
|
+
```
|
|
289
|
+
<!-- End Custom HTTP Client [http-client] -->
|
|
290
|
+
|
|
291
|
+
<!-- Start Authentication [security] -->
|
|
292
|
+
## Authentication
|
|
293
|
+
|
|
294
|
+
### Per-Client Security Schemes
|
|
295
|
+
|
|
296
|
+
This SDK supports the following security scheme globally:
|
|
297
|
+
|
|
298
|
+
| Name | Type | Scheme |
|
|
299
|
+
| -------------- | -------------- | -------------- |
|
|
300
|
+
| `access_token` | apiKey | API key |
|
|
301
|
+
|
|
302
|
+
To authenticate with the API the `access_token` parameter must be set when initializing the SDK client instance. For example:
|
|
303
|
+
```python
|
|
304
|
+
import plex_api
|
|
305
|
+
|
|
306
|
+
s = plex_api.PlexAPI(
|
|
307
|
+
access_token="<YOUR_API_KEY_HERE>",
|
|
308
|
+
x_plex_client_identifier='<value>',
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
res = s.server.get_server_capabilities()
|
|
313
|
+
|
|
314
|
+
if res.object is not None:
|
|
315
|
+
# handle response
|
|
316
|
+
pass
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
<!-- End Authentication [security] -->
|
|
320
|
+
|
|
321
|
+
<!-- Start Global Parameters [global-parameters] -->
|
|
322
|
+
## Global Parameters
|
|
323
|
+
|
|
324
|
+
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
|
325
|
+
|
|
326
|
+
For example, you can set `X-Plex-Client-Identifier` to `'<value>'` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_pin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
### Available Globals
|
|
330
|
+
|
|
331
|
+
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
|
332
|
+
|
|
333
|
+
| Name | Type | Required | Description |
|
|
334
|
+
| ---- | ---- |:--------:| ----------- |
|
|
335
|
+
| x_plex_client_identifier | str | ✔️ | The unique identifier for the client application
|
|
336
|
+
This is used to track the client application and its usage
|
|
337
|
+
(UUID, serial number, or other number unique per device)
|
|
338
|
+
|
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
### Example
|
|
342
|
+
|
|
343
|
+
```python
|
|
344
|
+
import plex_api
|
|
345
|
+
|
|
346
|
+
s = plex_api.PlexAPI(
|
|
347
|
+
x_plex_client_identifier='<value>',
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
res = s.plex.get_pin(strong=False, x_plex_client_identifier='<value>')
|
|
352
|
+
|
|
353
|
+
if res.object is not None:
|
|
354
|
+
# handle response
|
|
355
|
+
pass
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
<!-- End Global Parameters [global-parameters] -->
|
|
359
|
+
|
|
360
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
361
|
+
|
|
362
|
+
# Development
|
|
363
|
+
|
|
364
|
+
## Maturity
|
|
365
|
+
|
|
366
|
+
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
|
|
367
|
+
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
|
|
368
|
+
looking for the latest version.
|
|
369
|
+
|
|
370
|
+
## Contributions
|
|
371
|
+
|
|
372
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
373
|
+
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!
|
|
374
|
+
|
|
375
|
+
### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
|
|
376
|
+
|
|
377
|
+
Platform: UNKNOWN
|
|
378
|
+
Requires-Python: >=3.8
|
|
379
|
+
Description-Content-Type: text/markdown
|
|
380
|
+
Provides-Extra: dev
|