getLightLibrariesData(data: GetLightLibrariesDataParams)
Requires:
@tuya-miniapp/cloud-api≥1.0.5Mini Program Base Library≥2.18.1
Description
Retrieve the lighting libraries (scene/music, etc.) bound to a device or group, and output the data in the libraries. For example, scene parameter information from the scene library.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Yes | Request parameters: bizId (business ID), bizType (business type: 0 = device, 1 = group), libType (library type: SCENE_LIB = scene library, MUSIC_LIB = music library, SCENE_IMAGE_LIB = scene image library), libDataType (library data type: 0 = all; if 0, the library is considered updatable if any data type has updates; 1 = basic data, provided by Tuya and bound at the panel uiId level; 2 = advanced data, maintained by users in the micro app backend). |
Return Value
Type: Promise<GetLightLibrariesDataResult>
Plate[] (each element includes plateId, plateName, plateIcon, plateIconDisplayType, data, etc.; data contains group data and items, where items are entries from the Scene Library or Image Library; see the Plate, Data, and SceneLibraryItem tables in the documentation for field definitions)
Referenced Types
type
GetLightLibrariesDataResultValid Values
GetLightLibrariesDataParams.bizType
| Value | Description | Mini Program Base Library Since |
|---|---|---|
0 | - | - |
1 | - | - |
GetLightLibrariesDataParams.libType
| Value | Description | Mini Program Base Library Since |
|---|---|---|
SCENE_LIB | - | - |
MUSIC_LIB | - | - |
SCENE_IMAGE_LIB | - | - |
GetLightLibrariesDataParams.libDataType
| Value | Description | Mini Program Base Library Since |
|---|---|---|
0 | - | - |
1 | - | - |
2 | - | - |