---
name: "getGyroCleanRecords"
mode: "api"
versionRequirements:
  - { name: "@ray-js/ray", version: "1.7.14" }
  - { name: "Base library", version: "2.29.0" }
title: "Cleaning Record List"
---

## getGyroCleanRecords

> [VERSION] @ray-js/ray >= 1.7.14 | Base library >= 2.29.0

### Description

Get the cleaning record list for a gyroscope-based robot vacuum

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `GetGyroCleanRecordsParams` | Yes | Query parameters including Device ID, a set of DPs, and pagination info |

### Return Value

Type: `Promise<GetGyroCleanRecordsResponse>`

Promise that resolves with the gyroscope-based vacuum's cleaning record list and total count

##### GetGyroCleanRecordsResponse

| Property | Type | Description |
| --- | --- | --- |
| `datas` | `GyroCleanRecord[]` | Cleaning record list |
| `totalCount` | `number` | Total count |

### Referenced Types

##### `interface` GetGyroCleanRecordsParams

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |
| `dpIds` | `number[]` | Set of DP IDs |
| `offset` | `number` | Pagination offset |
| `limit` | `number` | Page size |
| `userId` | `string` | User ID, default '0' |

##### `interface` GyroCleanRecord

| Property | Type | Description |
| --- | --- | --- |
| `dpId` | `number` | DP ID |
| `gid` | `number` | Map ID |
| `gmtCreate` | `number` | Record creation timestamp |
| `recordId` | `string` | Record ID |
| `uuid` | `string` | Device UUID |
| `value` | `string` | Record value |


### Examples

```tsx
import React from 'react';
import { Button, getGyroCleanRecords } from '@ray-js/ray';

export default function Demo() {
  const handleFetch = async () => {
    const result = await getGyroCleanRecords({
      devId: 'your-device-id',
      dpIds: [101, 102],
      offset: 0,
      limit: 10,
    });
    console.log(result.datas, result.totalCount);
  };
  return <Button onClick={handleFetch}>Get gyroscope records</Button>;
}
```
