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, unknown]>

Parameters

move: 0 | "0" | "1" | 7 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | "increase" | "decrease" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10"

Returns

Promise<readonly [undefined | Error, unknown]>


decreaseAmbilightBrightness()

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

Returns

Promise<readonly [undefined | Error, unknown]>


getAmbiHue()

getAmbiHue(): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Returns

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


getAmbilightBrightnessInformation()

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

Returns

Promise<readonly [undefined | Error, unknown]>


getAmbilightBrightnessValue()

getAmbilightBrightnessValue(): Promise<readonly [undefined | Error, number]>

Returns

Promise<readonly [undefined | Error, number]>


getAmbilightCached()

getAmbilightCached(): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Returns

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


getAmbilightConfiguration()

getAmbilightConfiguration(): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Returns

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


getAmbilightFullInformation()

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

Returns

Promise<readonly [undefined | Error, object]>


getAmbilightMode()

getAmbilightMode(): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Returns

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


getApplications()

getApplications(): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Returns

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


getCurrentActivity()

getCurrentActivity(): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Returns

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


getCurrentSetting()

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

Parameters

nodeId: number

Returns

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


getDigestClient()

getDigestClient(): object

Gets the digest client instance.

Returns

object

The digest client instance used for API requests.

client

client: HttpClient

request()

request: (url, reqOptions) => Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Parameters

url: string

reqOptions: RequestOptions = {}

Returns

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

Inherited from

PhilTVApiBase.getDigestClient


getMenuStructure()

getMenuStructure(opts): Promise<readonly [undefined, any, object] | readonly [Error, undefined]>

Parameters

opts = ...

opts.flat?: boolean

Returns

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

Inherited from

PhilTVApiBase.getMenuStructure


getMenuStructureItem()

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

Parameters

context: undefined | string

nodeId: undefined | number

Returns

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

Inherited from

PhilTVApiBase.getMenuStructureItem


getMenuStructureItemByContext()

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

Parameters

context: string

Returns

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

Inherited from

PhilTVApiBase.getMenuStructureItemByContext


getMenuStructureItemByNodeId()

getMenuStructureItemByNodeId(nodeId): Promise<[Error, undefined] | [undefined, FlatNode]>

Parameters

nodeId: number

Returns

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

Inherited from

PhilTVApiBase.getMenuStructureItemByNodeId


getSystem()

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

Returns

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


increaseAmbilightBrightness()

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

Returns

Promise<readonly [undefined | Error, unknown]>


sendKey()

sendKey(key): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

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

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


setAmbilightBrightness()

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

Parameters

brightness: 0 | "0" | "1" | 7 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10"

Returns

Promise<readonly [undefined | Error, unknown]>


setAmbilightFollowAudioMode()

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

Parameters

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

Returns

Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object] | readonly [undefined | Error, unknown]>


setAmbilightFollowVideoMode()

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

Parameters

mode: string

Returns

Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object] | readonly [undefined | Error, unknown]>


setAmbilightMode()

setAmbilightMode(mode): Promise<readonly [Error, undefined, HttpClientResponse<any>] | readonly [Error, undefined, undefined] | readonly [undefined, any, object]>

Parameters

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

Returns

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


setMenuItemSetting()

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

Parameters

item: undefined | FlatNode

value: any

Returns

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

Inherited from

PhilTVApiBase.setMenuItemSetting