Files
plexcsharp/docs/sdks/hubs

Hubs

(Hubs)

Overview

Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.

Available Operations

GetGlobalHubs

Get Global Hubs filtered by the parameters provided.

Example Usage

using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Models.Components;

var sdk = new PlexAPI(
    accessToken: "<YOUR_API_KEY_HERE>",
    clientID: "gcgzw5rz2xovp84b4vha3a40",
    clientName: "Plex Web",
    clientVersion: "4.133.0",
    clientPlatform: "Chrome",
    deviceName: "Linux"
);

var res = await sdk.Hubs.GetGlobalHubsAsync(
    count: 1262.49D,
    onlyTransient: LukeHagar.PlexAPI.SDK.Models.Requests.OnlyTransient.One
);

// handle response

Parameters

Parameter Type Required Description
Count double The number of items to return with each hub.
OnlyTransient OnlyTransient 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).

Response

GetGlobalHubsResponse

Errors

Error Object Status Code Content Type
LukeHagar.PlexAPI.SDK.Models.Errors.GetGlobalHubsBadRequest 400 application/json
LukeHagar.PlexAPI.SDK.Models.Errors.GetGlobalHubsUnauthorized 401 application/json
LukeHagar.PlexAPI.SDK.Models.Errors.SDKException 4xx-5xx /

GetLibraryHubs

This endpoint will return a list of library specific hubs

Example Usage

using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Models.Components;

var sdk = new PlexAPI(
    accessToken: "<YOUR_API_KEY_HERE>",
    clientID: "gcgzw5rz2xovp84b4vha3a40",
    clientName: "Plex Web",
    clientVersion: "4.133.0",
    clientPlatform: "Chrome",
    deviceName: "Linux"
);

var res = await sdk.Hubs.GetLibraryHubsAsync(
    sectionId: 6728.76D,
    count: 9010.22D,
    onlyTransient: LukeHagar.PlexAPI.SDK.Models.Requests.QueryParamOnlyTransient.Zero
);

// handle response

Parameters

Parameter Type Required Description
SectionId double ✔️ the Id of the library to query
Count double The number of items to return with each hub.
OnlyTransient QueryParamOnlyTransient 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).

Response

GetLibraryHubsResponse

Errors

Error Object Status Code Content Type
LukeHagar.PlexAPI.SDK.Models.Errors.GetLibraryHubsBadRequest 400 application/json
LukeHagar.PlexAPI.SDK.Models.Errors.GetLibraryHubsUnauthorized 401 application/json
LukeHagar.PlexAPI.SDK.Models.Errors.SDKException 4xx-5xx /