addAstronomical(params: IAstronomical)

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

描述

添加天文定时

参数

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

返回值

类型:Promise<number>
新添加天文定时的 ID

示例代码

基础用法

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

addAstronomical({
  astronomicalType: 1,
  bizId: 'vdevo160456552237748',
  bizType: 0,
  dps: { 1: true },
  lat: 30.300694,
  lon: 120.068634,
  loops: '1111111',
  offsetType: -1,
  time: '00:04',
  timezone: '+08:00',
}).then((response) => {
  console.log('新增天文定时 ID:', response);
}).catch((err) => {
  console.error(err);
});