Files
plexjs/docs/sdks/hubs/README.md
speakeasybot 3994020ebb ## Typescript SDK Changes:
* `plex-api.libraryPlaylists.addPlaylistItems()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getMetadataHubs()`: 
  *  `request.onlyTransient` **Changed**
  *  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryCollections.moveCollectionItem()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryCollections.deleteCollectionItem()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryCollections.addCollectionItems()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.content.getSonicallySimilar()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.butler.stopTask()`:  `request` **Changed** **Breaking** ⚠️
* `plex-api.butler.startTask()`:  `request` **Changed** **Breaking** ⚠️
* `plex-api.content.getSonicPath()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.downloadQueue.getItemDecision()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getAllHubs()`: 
  *  `request.onlyTransient` **Changed**
  *  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getContinueWatching()`:  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getPromotedHubs()`:  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.content.getAllLeaves()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getPostplayHubs()`: 
  *  `request.onlyTransient` **Changed**
  *  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getRelatedHubs()`: 
  *  `request.onlyTransient` **Changed**
  *  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.hubs.getSectionHubs()`: 
  *  `request.onlyTransient` **Changed**
  *  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.content.listContent()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.content.getAlbums()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.search.searchHubs()`:  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.search.voiceSearchHubs()`: 
  *  `request.type` **Changed** **Breaking** ⚠️
  *  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getLibraryItems()`: 
  *  `request.mediaQuery` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.ingestTransientItem()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getLibraryMatches()`: 
  *  `request` **Changed** **Breaking** ⚠️
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.content.getMetadataItem()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getSections()`:  `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.addSection()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getTags()`: 
  *  `request.type` **Changed** **Breaking** ⚠️
* `plex-api.content.getCollectionItems()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getAllItemLeaves()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.status.listSessions()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.movePlayQueueItem()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getExtras()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.deletePlayQueueItem()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.unshuffle()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.listMatches()`: 
  *  `request.manual` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.listSonicallySimilar()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.resetPlayQueue()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getRelatedItems()`:  `response.mediacontainer.hub.[].metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.listSimilar()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.clearPlayQueue()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getItemTree()`:  `response.mediacontainer.metadataItem.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.addToPlayQueue()`: 
  *  `request.next` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.getPlayQueue()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryPlaylists.movePlaylistItem()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getPerson()`:  `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.listPersonMedia()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryPlaylists.getPlaylistGeneratorItems()`:  `response.mediacontainer.metadata` **Changed** **Breaking** ⚠️
* `plex-api.library.getLibraryDetails()`: 
  *  `request.includeDetails` **Changed**
  *  `response.mediacontainer.directory.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryPlaylists.modifyPlaylistGenerator()`: 
  *  `request.item` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.autocomplete()`: 
  *  `request.mediaQuery` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getCollections()`: 
  *  `request.mediaQuery` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.getCommon()`: 
  *  `request.mediaQuery` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryPlaylists.deletePlaylistItem()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryPlaylists.clearPlaylistItems()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playQueue.shuffle()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.libraryPlaylists.createPlaylist()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playlist.getPlaylistItems()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playlist.getPlaylist()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.collections.createCollection()`: 
  *  `request.type` **Changed** **Breaking** ⚠️
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.dvRs.tuneChannel()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.liveTv.getSessions()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.liveTv.getLiveTvSession()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.playlist.listPlaylists()`:  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.getAllSubscriptions()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.createSubscription()`:  `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.getScheduledRecordings()`:  `response.mediacontainer.mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.getTemplate()`:  `response.mediacontainer.subscriptionTemplate.[].mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.getSubscription()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.editSubscriptionPreferences()`:  `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.subscriptions.reorderSubscription()`:  `response.mediacontainer.mediaSubscription.[].mediaGrabOperation.[].metadata` **Changed** **Breaking** ⚠️
* `plex-api.transcoder.makeDecision()`: 
  *  `request` **Changed**
  *  `response.mediacontainer.metadata.[]` **Changed** **Breaking** ⚠️
* `plex-api.library.refreshItemsMetadata()`: 
  *  `request.markUpdated` **Changed**
* `plex-api.authentication.postUsersSignInData()`: **Added**
* `plex-api.transcoder.startTranscodeSession()`:  `request` **Changed**
* `plex-api.devices.modifyDevice()`: 
  *  `request.enabled` **Changed**
* `plex-api.library.getMediaPart()`: 
  *  `request.download` **Changed**
* `plex-api.library.detectIntros()`: 
  *  `request.force` **Changed**
* `plex-api.library.refreshSection()`: 
  *  `request.force` **Changed**
* `plex-api.libraryPlaylists.uploadPlaylist()`: 
  *  `request.force` **Changed**
* `plex-api.library.deleteMediaItem()`: 
  *  `request.proxy` **Changed**
* `plex-api.authentication.getTokenDetails()`: **Added**
* `plex-api.library.getFirstCharacters()`: 
  *  `request.mediaQuery` **Changed**
* `plex-api.library.updateItems()`: 
  *  `request.field.locked` **Changed**
* `plex-api.library.deleteLibrarySection()`: 
  *  `request.async` **Changed**
* `plex-api.library.setStreamSelection()`: 
  *  `request.allParts` **Changed**
* `plex-api.playQueue.createPlayQueue()`:  `request` **Changed**
* `plex-api.library.getAugmentationStatus()`: 
  *  `request.wait` **Changed**
* `plex-api.library.detectVoiceActivity()`:  `request` **Changed**
* `plex-api.transcoder.transcodeImage()`:  `request` **Changed**
* `plex-api.transcoder.transcodeSubtitles()`:  `request` **Changed**
* `plex-api.library.addSubtitles()`:  `request` **Changed**
* `plex-api.library.getStream()`: 
  *  `request.autoAdjustSubtitle` **Changed**
* `plex-api.library.startBifGeneration()`: 
  *  `request.force` **Changed**
* `plex-api.library.detectCredits()`:  `request` **Changed**
* `plex-api.ultraBlur.getImage()`: 
  *  `request.noise` **Changed**
* `plex-api.library.generateThumbs()`: 
  *  `request.force` **Changed**
* `plex-api.updater.applyUpdates()`:  `request` **Changed**
* `plex-api.updater.checkUpdates()`: 
  *  `request.download` **Changed**
* `plex-api.library.deleteMetadataItem()`: 
  *  `request.proxy` **Changed**
* `plex-api.library.optimizeDatabase()`: 
  *  `request.async` **Changed**
* `plex-api.hubs.updateHubVisibility()`:  `request` **Changed**
* `plex-api.hubs.createCustomHub()`:  `request` **Changed**
* `plex-api.library.getSectionImage()`: 
  *  `request.mediaQuery` **Changed**
* `plex-api.downloadQueue.addDownloadQueueItems()`:  `request` **Changed**
* `plex-api.timeline.report()`:  `request` **Changed**
* `plex-api.general.getSourceConnectionInformation()`: 
  *  `request.refresh` **Changed**
* `plex-api.plex.getServerResources()`: **Added**
* `plex-api.users.getUsers()`: **Added**
2025-12-01 00:15:57 +00:00

90 KiB
Raw Blame History

Hubs

(hubs)

Overview

The hubs within a media provider

Available Operations

getAllHubs

Get the global hubs in this PMS

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getAllHubs({
    onlyTransient: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetAllHubs } from "@lukehagar/plexjs/funcs/hubsGetAllHubs.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetAllHubs(plexAPI, {
    onlyTransient: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetAllHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetAllHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetAllHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getContinueWatching

Get the global continue watching hub

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getContinueWatching({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetContinueWatching } from "@lukehagar/plexjs/funcs/hubsGetContinueWatching.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetContinueWatching(plexAPI, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetContinueWatching failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetContinueWatchingRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetContinueWatchingResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getHubItems

Get the items within a single hub specified by identifier

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getHubItems({
    identifier: [
      "<value 1>",
      "<value 2>",
      "<value 3>",
    ],
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetHubItems } from "@lukehagar/plexjs/funcs/hubsGetHubItems.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetHubItems(plexAPI, {
    identifier: [
      "<value 1>",
      "<value 2>",
      "<value 3>",
    ],
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetHubItems failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetHubItemsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetHubItemsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getPromotedHubs

Get the global hubs which are promoted (should be displayed on the home screen)

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getPromotedHubs({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetPromotedHubs } from "@lukehagar/plexjs/funcs/hubsGetPromotedHubs.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetPromotedHubs(plexAPI, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetPromotedHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetPromotedHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetPromotedHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getMetadataHubs

Get the hubs for a section by metadata item. Currently only for music sections

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getMetadataHubs({
    metadataId: 605482,
    onlyTransient: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetMetadataHubs } from "@lukehagar/plexjs/funcs/hubsGetMetadataHubs.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetMetadataHubs(plexAPI, {
    metadataId: 605482,
    onlyTransient: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetMetadataHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetMetadataHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetMetadataHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getPostplayHubs

Get the hubs for a metadata to be displayed in post play

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getPostplayHubs({
    metadataId: 441419,
    onlyTransient: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetPostplayHubs } from "@lukehagar/plexjs/funcs/hubsGetPostplayHubs.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetPostplayHubs(plexAPI, {
    metadataId: 441419,
    onlyTransient: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetPostplayHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetPostplayHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetPostplayHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getRelatedHubs

Get the hubs for a metadata related to the provided metadata item

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getRelatedHubs({
    metadataId: 8858,
    onlyTransient: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetRelatedHubs } from "@lukehagar/plexjs/funcs/hubsGetRelatedHubs.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetRelatedHubs(plexAPI, {
    metadataId: 8858,
    onlyTransient: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetRelatedHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetRelatedHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetRelatedHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

getSectionHubs

Get the hubs for a single section

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.getSectionHubs({
    sectionId: 336924,
    onlyTransient: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsGetSectionHubs } from "@lukehagar/plexjs/funcs/hubsGetSectionHubs.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsGetSectionHubs(plexAPI, {
    sectionId: 336924,
    onlyTransient: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsGetSectionHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetSectionHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetSectionHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

resetSectionDefaults

Reset hubs for this section to defaults and delete custom hubs

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.resetSectionDefaults({
    sectionId: 383022,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsResetSectionDefaults } from "@lukehagar/plexjs/funcs/hubsResetSectionDefaults.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsResetSectionDefaults(plexAPI, {
    sectionId: 383022,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsResetSectionDefaults failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ResetSectionDefaultsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ResetSectionDefaultsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

listHubs

Get the list of hubs including both built-in and custom

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.listHubs({
    sectionId: 442546,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsListHubs } from "@lukehagar/plexjs/funcs/hubsListHubs.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsListHubs(plexAPI, {
    sectionId: 442546,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsListHubs failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListHubsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListHubsResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

createCustomHub

Create a custom hub based on a metadata item

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.createCustomHub({
    sectionId: 869922,
    metadataItemId: 703843,
    promotedToRecommended: BoolInt.True,
    promotedToOwnHome: BoolInt.True,
    promotedToSharedHome: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsCreateCustomHub } from "@lukehagar/plexjs/funcs/hubsCreateCustomHub.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsCreateCustomHub(plexAPI, {
    sectionId: 869922,
    metadataItemId: 703843,
    promotedToRecommended: BoolInt.True,
    promotedToOwnHome: BoolInt.True,
    promotedToSharedHome: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsCreateCustomHub failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.CreateCustomHubRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.CreateCustomHubResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

moveHub

Changed the ordering of a hub among others hubs

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.moveHub({
    sectionId: 755710,
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsMoveHub } from "@lukehagar/plexjs/funcs/hubsMoveHub.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsMoveHub(plexAPI, {
    sectionId: 755710,
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsMoveHub failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.MoveHubRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.MoveHubResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

deleteCustomHub

Delete a custom hub from the server

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.deleteCustomHub({
    sectionId: 625677,
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsDeleteCustomHub } from "@lukehagar/plexjs/funcs/hubsDeleteCustomHub.js";
import { Accepts } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsDeleteCustomHub(plexAPI, {
    sectionId: 625677,
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsDeleteCustomHub failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.DeleteCustomHubRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.DeleteCustomHubResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

updateHubVisibility

Changed the visibility of a hub for both the admin and shared users

Example Usage

import { PlexAPI } from "@lukehagar/plexjs";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

const plexAPI = new PlexAPI({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await plexAPI.hubs.updateHubVisibility({
    sectionId: 341650,
    identifier: "<value>",
    promotedToRecommended: BoolInt.True,
    promotedToOwnHome: BoolInt.True,
    promotedToSharedHome: BoolInt.True,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { PlexAPICore } from "@lukehagar/plexjs/core.js";
import { hubsUpdateHubVisibility } from "@lukehagar/plexjs/funcs/hubsUpdateHubVisibility.js";
import { Accepts, BoolInt } from "@lukehagar/plexjs/sdk/models/shared";

// Use `PlexAPICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const plexAPI = new PlexAPICore({
  accepts: Accepts.ApplicationXml,
  clientIdentifier: "abc123",
  product: "Plex for Roku",
  version: "2.4.1",
  platform: "Roku",
  platformVersion: "4.3 build 1057",
  device: "Roku 3",
  model: "4200X",
  deviceVendor: "Roku",
  deviceName: "Living Room TV",
  marketplace: "googlePlay",
  token: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const res = await hubsUpdateHubVisibility(plexAPI, {
    sectionId: 341650,
    identifier: "<value>",
    promotedToRecommended: BoolInt.True,
    promotedToOwnHome: BoolInt.True,
    promotedToSharedHome: BoolInt.True,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("hubsUpdateHubVisibility failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.UpdateHubVisibilityRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.UpdateHubVisibilityResponse>

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*