Skip to content

philtv-js / PhilTVApi

Class: PhilTVApi

Extends

  • PhilTVApiBase

Constructors

new PhilTVApi()

new PhilTVApi(params): PhilTVApi

Parameters

params: PhilTVApiParams

Returns

PhilTVApi

Inherited from

PhilTVApiBase.constructor

Methods

changeAmbilightBrightness()

changeAmbilightBrightness(move): Promise<readonly [undefined | Error, undefined | object]>

Parameters

move: "increase" | "decrease"

Returns

Promise<readonly [undefined | Error, undefined | object]>


getAmbiHue()

getAmbiHue(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getAmbilightBrightness()

getAmbilightBrightness(): Promise<readonly [undefined | Error, unknown]>

Returns

Promise<readonly [undefined | Error, unknown]>


getAmbilightCached()

getAmbilightCached(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getAmbilightConfiguration()

getAmbilightConfiguration(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getAmbilightMode()

getAmbilightMode(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getApplications()

getApplications(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getChannels()

getChannels(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getCurrentActivity()

getCurrentActivity(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getCurrentSetting()

getCurrentSetting(nodeId): Promise<readonly [Error, undefined] | readonly [undefined, any[]]>

Parameters

nodeId: number

Returns

Promise<readonly [Error, undefined] | readonly [undefined, any[]]>


getDigestClient()

getDigestClient(): KyInstance

Gets the digest client instance.

Returns

KyInstance

The digest client instance used for API requests.

Inherited from

PhilTVApiBase.getDigestClient


getMenuStructure()

getMenuStructure(opts): Promise<any[]>

Retrieves the menu structure from the Philips TV API.

Parameters

opts = ...

Options for the request.

opts.flat?: boolean

Whether to return the flattened structure. Default is false.

Returns

Promise<any[]>

A promise that resolves to a tuple of error (if any) and the menu structure.

Inherited from

PhilTVApiBase.getMenuStructure


getMenuStructureItems()

getMenuStructureItems(context): Promise<[Error, undefined] | [undefined, FlatNode]>

Parameters

context: string

Returns

Promise<[Error, undefined] | [undefined, FlatNode]>

Inherited from

PhilTVApiBase.getMenuStructureItems


getSource()

getSource(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


getSystem()

getSystem(): Promise<[Error, undefined] | [undefined, unknown]>

Returns

Promise<[Error, undefined] | [undefined, unknown]>


sendKey()

sendKey(key): ResponsePromise<unknown>

Parameters

key: "Adjust" | "AmbilightOnOff" | "Back" | "BlueColour" | "ChannelStepDown" | "ChannelStepUp" | "Confirm" | "CursorDown" | "CursorLeft" | "CursorRight" | "CursorUp" | "Digit0" | "Digit1" | "Digit2" | "Digit3" | "Digit4" | "Digit5" | "Digit6" | "Digit7" | "Digit8" | "Digit9" | "Dot" | "FastForward" | "Find" | "GreenColour" | "Home" | "Info" | "Mute" | "Next" | "Online" | "Options" | "Pause" | "PlayPause" | "Previous" | "Record" | "RedColour" | "Rewind" | "Source" | "Standby" | "Stop" | "Subtitle" | "Teletext" | "Viewmode" | "VolumeDown" | "VolumeUp" | "WatchTV" | "YellowColour"

Returns

ResponsePromise<unknown>


setAmbilightBrightness()

setAmbilightBrightness(brightness): Promise<readonly [undefined | Error, undefined | object]>

Parameters

brightness: number

Returns

Promise<readonly [undefined | Error, undefined | object]>


setAmbilightFollowAudioMode()

setAmbilightFollowAudioMode(mode): Promise<readonly [undefined | Error, unknown]>

Parameters

mode: "VU_METER" | "ENERGY_ADAPTIVE_BRIGHTNESS" | "ENERGY_ADAPTIVE_COLORS" | "SPECTRUM_ANALYSER" | "KNIGHT_RIDER_ALTERNATING" | "RANDOM_PIXEL_FLASH" | "MODE_RANDOM"

Returns

Promise<readonly [undefined | Error, unknown]>


setAmbilightFollowVideoMode()

setAmbilightFollowVideoMode(mode): Promise<readonly [undefined | Error, unknown]>

Parameters

mode: string

Returns

Promise<readonly [undefined | Error, unknown]>


setAmbilightMode()

setAmbilightMode(mode): ResponsePromise<unknown>

Parameters

mode: "manual" | "internal" | "expert"

Returns

ResponsePromise<unknown>


setMenuItemSetting()

setMenuItemSetting(item, value): readonly [Error, undefined] | Promise<[Error, undefined] | [undefined, object]>

Parameters

item: undefined | FlatNode

value: any

Returns

readonly [Error, undefined] | Promise<[Error, undefined] | [undefined, object]>

Inherited from

PhilTVApiBase.setMenuItemSetting