exportStatisticsMonth(data: IGetStatisticsExportMonth)

Requires:
@tuya-miniapp/cloud-api≥1.0.5

Description

Export the device’s statistics for the past month, with month as the interval.

Parameters

ParameterTypeRequiredDescription
YesRequest body

Return Value

Type: Promise<boolean>
true indicates the export request succeeded (the sample response in the docs is true)

Valid Values

ICommonGetStatisticsExport.type
ValueDescriptionSince
sum--
avg--
minux--
max--
min--
count--
recent--

Examples

Request example

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

exportStatisticsMonth({
  devId: 'vdevo161733425146241',
  email: 'xxxdemo@*.com',
  dpExcelQuery: [{ dpId: 18, name: 'Excel data column title' }],
  startMonth: '202304',
  endMonth: '202305',
  type: 'avg',
  lang: 'cn',
  title: 'This is a title',
})
  .then((response) => {
    console.log(response);
  })
  .catch();

Response example

true