getVoiceList

Requires:
@ray-js/ray≥1.5.36Base library≥2.21.0

Method signature
getVoiceList(params: )

Description

Get the robot vacuum's voice package list

Parameters

ParameterTypeRequiredDescription
YesQuery parameters including Device ID and pagination info

Return Value

Type: Promise<GetVoiceListResponse>
Promise that resolves with the voice package list, current page number, and total count

Referenced Types

interfaceGetVoiceListResponseReturn value for getting the robot vacuum voice pack list
PropertyTypeDescription
[]Voice pack data array
pageNonumberCurrent page number
totalCountnumberTotal number of data entries

Examples

import React from 'react';
import { Button, getVoiceList } from '@ray-js/ray';

export default function Demo() {
  const handleFetch = async () => {
    const result = await getVoiceList({
      devId: 'your-device-id',
      offset: 0,
      limit: 100,
    });
    console.log(result.datas, result.totalCount);
  };
  return <Button onClick={handleFetch}>Get voice package list</Button>;
}