Server
Media
Butler
Plex
Library
- GETGet Hash Value
- GETGet Recently Added
- GETGet All Libraries
- GETGet library details
- DELDelete library section
- GETGet library items
- GETGet all media of library
- GETRefresh Metadata Of The Library
- GETSearch library
- GETGet Genres of library media
- GETGet Countries of library media
- GETGet Actors of library media
- GETSearch All Libraries
- GETGet Media Metadata
- GETGet Items Children
- GETGet Top Watched Content
- GETGet On Deck
Watchlist
Playlists
Authentication
Sessions
Get Global Hubs
Get Global Hubs filtered by the parameters provided.
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.Hubs.GetGlobalHubsAsync(
count: 1262.49D,
onlyTransient: OnlyTransient.One
);
// handle response
{
"MediaContainer": {
"size": 8,
"allowSync": true,
"identifier": "com.plexapp.plugins.library",
"Hub": [
{
"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070",
"key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
"title": "Recent Playlists",
"type": "playlist",
"hubIdentifier": "home.playlists",
"context": "hub.home.playlists",
"size": 6,
"more": true,
"style": "shelf",
"promoted": true,
"Metadata": [
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"titleSort": "Tracks",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"icon": "playlist://image.smart",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
]
}
]
}
}
Authorizations
Plex Authentication Token
Query Parameters
The number of items to return with each hub.
Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
0
, 1
Response
8
true
"com.plexapp.plugins.library"
"/library/metadata/50768,65523,58188,57341,57302,57070"
"/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio"
"Recent Playlists"
"playlist"
"home.playlists"
"hub.home.playlists"
6
true
"shelf"
true
"57070"
"/playlists/57070/items"
"com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c"
"playlist"
"November Movie Day"
"Tracks"
""
false
"video"
"/playlists/57070/composite/1668787730"
"playlist://image.smart"
2
1668787732
16873000
3
1668779618
1668787730
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.Hubs.GetGlobalHubsAsync(
count: 1262.49D,
onlyTransient: OnlyTransient.One
);
// handle response
{
"MediaContainer": {
"size": 8,
"allowSync": true,
"identifier": "com.plexapp.plugins.library",
"Hub": [
{
"hubKey": "/library/metadata/50768,65523,58188,57341,57302,57070",
"key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
"title": "Recent Playlists",
"type": "playlist",
"hubIdentifier": "home.playlists",
"context": "hub.home.playlists",
"size": 6,
"more": true,
"style": "shelf",
"promoted": true,
"Metadata": [
{
"ratingKey": "57070",
"key": "/playlists/57070/items",
"guid": "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c",
"type": "playlist",
"title": "November Movie Day",
"titleSort": "Tracks",
"summary": "",
"smart": false,
"playlistType": "video",
"composite": "/playlists/57070/composite/1668787730",
"icon": "playlist://image.smart",
"viewCount": 2,
"lastViewedAt": 1668787732,
"duration": 16873000,
"leafCount": 3,
"addedAt": 1668779618,
"updatedAt": 1668787730
}
]
}
]
}
}