getAstronomicalList

版本要求:
@ray-js/ray≥1.5.2

方法签名
getAstronomicalList(params: )

描述

获取天文定时列表

参数

参数类型必填说明
是请求参数

返回值

类型:Promise<IGetAstronomicalListResponse>
天文定时列表数组

引用对象

interfaceIGetAstronomicalListResponse
属性类型描述
astronomicalTypenumber日出日落类型
bizIdstring设备或群组 ID
bizTypenumber资源类型。0:单设备。1:群组设备。
dpsstringDP 值
idnumber定时任务 ID
latnumber经度
lonnumber纬度
loopsstring周循环
nextSunSetstring下一个日出时间
offsetTypenumber定时偏移执行类型
statusnumber定时任务状态,0 关闭,1 开启,2 无效/已删除
timestring定时时间
timezonestring时区

示例代码

基础用法

import { getAstronomicalList } from '@ray-js/ray';

getAstronomicalList({
  bizId: 'vdevo160456552237748',
}).then((response) => {
  console.log('天文定时列表:', response);
}).catch((err) => {
  console.error(err);
});