getCameraList(params: QueryCameraListDto)

版本要求:
@tuya-miniapp/cloud-api≥1.0.5

描述

获取家庭摄像头设备列表

参数

参数类型必填说明
是请求体

返回值

类型:Promise<ResBindDeviceDto>
totalDevices、bindDeviceNum、list(见 ResBindDeviceDto)

引用对象

typeResBindDeviceDto
属性类型描述
totalDevicesnumber设备总数
bindDeviceNumnumber已绑定设备数量
listBindDeviceInfo[]设备数据列表

合法值

QueryCameraListDto.ownerType
值说明最低版本
1--
0--

示例代码

请求示例

import { getCameraList } from '@tuya-miniapp/cloud-api';

getCameraList({ homeId: '194137', categoryCode: 'ipc' })
  .then((res) => console.log(res))
  .catch(console.error);

返回示例

{
  "totalDevices": 1,
  "bindDeviceNum": 1,
  "list": [
    {
      "uuid": "vdevo176127325226099",
      "name": "摄像头 1",
      "online": true,
      "iconUrl": "https://images.example.com/icon.png",
      "isBindCurrentService": true
    }
  ]
}