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
}
]
}
]
}
}
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
}
]
}
]
}
}
Plex Authentication Token
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
returns global hubs
The response is of type object
.