getGyroLatestCleanMap(params: GetGyroLatestCleanMapParams)

Requires:
@ray-js/ray≥1.7.14Base library≥2.29.0

Description

Get the latest cleaning map data for a gyroscope-based robot vacuum

Parameters

ParameterTypeRequiredDescription
YesQuery parameters including Device ID and pagination info

Return Value

Type: Promise<GetGyroLatestCleanMapResponse>
Promise that resolves with the latest cleaning's map data and pagination info

Examples

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

export default function Demo() {
  const handleFetch = async () => {
    const map = await getGyroLatestCleanMap({
      devId: 'your-device-id',
      start: 0,
      size: 100,
    });
    console.log(map.dataList, map.hasNext);
  };
  return <Button onClick={handleFetch}>Get latest map</Button>;
}