getVoiceList(params: GetVoiceListParams)

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

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

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>;
}