Skip to content

Interface: MenuApi

Provides methods to interact with the Menu API, including menu structure retrieval, item lookup, and setting updates.

Methods

getCurrentSetting()

getCurrentSetting(nodeId): Promise<MenuSettingValue[]>

Retrieves the current setting values for a given node ID.

Parameters

ParameterTypeDescription
nodeIdnumberThe ID of the node to query.

Returns

Promise<MenuSettingValue[]>

The list of current setting values for the node.

Throws

If the request fails.


getMenuStructure()

getMenuStructure(opts?): Promise<any>

Retrieves the full menu structure from the device.

Parameters

ParameterTypeDescription
opts{ flat: boolean; }Options object. If flat is true, returns a flattened array of nodes instead of the raw tree.
opts.flatboolean-

Returns

Promise<any>

Throws

If the request fails.


getMenuStructureItem()

getMenuStructureItem(context?, nodeId?): Promise<MenuItemNode>

Finds a single menu item node by context string or node ID.

Parameters

ParameterTypeDescription
context?stringThe context string to match against. Takes priority over nodeId if provided.
nodeId?numberThe node ID to match against, used when context is not provided.

Returns

Promise<MenuItemNode>

The matching MenuItemNode.

Throws

If no matching item is found or the structure request fails.


setMenuItemSetting()

setMenuItemSetting(item, value): Promise<void>

Updates the setting value of a given menu item node.

Parameters

ParameterTypeDescription
itemMenuItemNode | undefinedThe menu item node to update. Throws if undefined.
valueunknownThe new value to apply. Automatically formatted based on the node type (SLIDER_NODE, TOGGLE_NODE, LIST_NODE).

Returns

Promise<void>

Throws

If the item is undefined or the request fails.

Version v2.2.0 - Built on 2026-03-28