exportStatisticsDay(data: IGetStatisticsExportDay)

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

Description

Export device statistics for a date range with a daily 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 { exportStatisticsDay } from '@tuya-miniapp/cloud-api';

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

Response example

true