using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Playlists.GetPlaylistsAsync(
playlistType: PlaylistType.Audio,
smart: QueryParamSmart.Zero
);
// handle response
{
"MediaContainer": {
"size": 4,
"Metadata": [
{
"ratingKey": "92",
"key": "/playlists/92/items",
"guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903",
"type": "playlist",
"title": "Static Playlist",
"summary": "A Great Playlist",
"smart": false,
"playlistType": "video",
"composite": "/playlists/92/composite/1705716440",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705716298,
"duration": 7328000,
"leafCount": 32,
"addedAt": 1705716298,
"updatedAt": 1705716440
}
]
}
}
Get All Playlists given the specified filters.
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Playlists.GetPlaylistsAsync(
playlistType: PlaylistType.Audio,
smart: QueryParamSmart.Zero
);
// handle response
{
"MediaContainer": {
"size": 4,
"Metadata": [
{
"ratingKey": "92",
"key": "/playlists/92/items",
"guid": "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903",
"type": "playlist",
"title": "Static Playlist",
"summary": "A Great Playlist",
"smart": false,
"playlistType": "video",
"composite": "/playlists/92/composite/1705716440",
"icon": "playlist://image.smart",
"viewCount": 1,
"lastViewedAt": 1705716298,
"duration": 7328000,
"leafCount": 32,
"addedAt": 1705716298,
"updatedAt": 1705716440
}
]
}
}
Plex Authentication Token
limit to a type of playlist.
audio
, video
, photo
type of playlists to return (default is all).
0
, 1
returns all playlists
The response is of type object
.