mirror of
https://github.com/LukeHagar/plexpy.git
synced 2025-12-10 04:21:03 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2
This commit is contained in:
@@ -34,25 +34,21 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.create_playlist(request={
|
||||
"title": "<value>",
|
||||
"type": operations.CreatePlaylistQueryParamType.PHOTO,
|
||||
"smart": operations.Smart.ONE,
|
||||
"uri": "https://inborn-brochure.biz",
|
||||
})
|
||||
res = plex_api.playlists.create_playlist(request={
|
||||
"title": "<value>",
|
||||
"type": operations.CreatePlaylistQueryParamType.PHOTO,
|
||||
"smart": operations.Smart.ONE,
|
||||
"uri": "https://inborn-brochure.biz",
|
||||
})
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res.object is not None
|
||||
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
```
|
||||
|
||||
@@ -84,20 +80,16 @@ Get All Playlists given the specified filters.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.get_playlists()
|
||||
res = plex_api.playlists.get_playlists()
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res.object is not None
|
||||
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
```
|
||||
|
||||
@@ -132,20 +124,16 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.get_playlist(playlist_id=4109.48)
|
||||
res = plex_api.playlists.get_playlist(playlist_id=4109.48)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res.object is not None
|
||||
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
```
|
||||
|
||||
@@ -178,20 +166,16 @@ This endpoint will delete a playlist
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.delete_playlist(playlist_id=216.22)
|
||||
res = plex_api.playlists.delete_playlist(playlist_id=216.22)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res is not None
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
@@ -224,20 +208,16 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.update_playlist(playlist_id=3915)
|
||||
res = plex_api.playlists.update_playlist(playlist_id=3915)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res is not None
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
@@ -276,20 +256,16 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.get_playlist_contents(playlist_id=5004.46, type_=operations.GetPlaylistContentsQueryParamType.TV_SHOW)
|
||||
res = plex_api.playlists.get_playlist_contents(playlist_id=5004.46, type_=operations.GetPlaylistContentsQueryParamType.TV_SHOW)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res.object is not None
|
||||
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
```
|
||||
|
||||
@@ -323,20 +299,16 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.playlists.clear_playlist_contents(playlist_id=1893.18)
|
||||
res = plex_api.playlists.clear_playlist_contents(playlist_id=1893.18)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res is not None
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
@@ -370,20 +342,16 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
||||
```python
|
||||
from plex_api_client import PlexAPI
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.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=8502.01, uri="server://12345/com.plexapp.plugins.library/library/metadata/1", play_queue_id=123)
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res.object is not None
|
||||
|
||||
# Handle response
|
||||
print(res.object)
|
||||
|
||||
```
|
||||
|
||||
@@ -419,20 +387,16 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
||||
from plex_api_client import PlexAPI
|
||||
from plex_api_client.models import operations
|
||||
|
||||
s = PlexAPI(
|
||||
with PlexAPI(
|
||||
access_token="<YOUR_API_KEY_HERE>",
|
||||
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
|
||||
client_name="Plex for Roku",
|
||||
client_version="2.4.1",
|
||||
platform="Roku",
|
||||
device_nickname="Roku 3",
|
||||
)
|
||||
) as plex_api:
|
||||
|
||||
res = s.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.ZERO, section_id=1)
|
||||
|
||||
if res is not None:
|
||||
# handle response
|
||||
pass
|
||||
assert res is not None
|
||||
|
||||
# Handle response
|
||||
print(res)
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user