1.1.3 • Published 11 months ago

gyhdsb-robot v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

gyhdsb-robot

Version API reference License

Installation

npm install --save gyhdsb-robot

Summary

微信推送天气机器人 (https://github.com/ctxzzz/gyhdsb).

Details

Files were exported from https://github.com/ctxzzz/gyhdsb.

example.js

Usage

const GYHDSB = require('gyhdsb-robot');


const  weatherTemplate = `
📍{name}:
· 今日气温{tempMin} ~ {tempMax}℃ {textDay} 
. 日出 {sunrise} 日落 {sunset}
· 今日风况 {windDirDay} {windScaleDay}级
    [点击查看详情](https://www.qweather.com/weather/{name}-{location}.html) 
`

const lunarTemplate =  `
{today}  农历{lunarMonthName} {lunarDayName}
`

const gyhdsb_robot = new GYHDSB({
  webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5f8e0ef1-c861-47b4-9e2e-60ae7fe7bc89',
  locations: [{
    location: '101220101',
    name: '合肥',
  }, {
    location: '101190401',
    name: '苏州',
  }],
  hour: 14,
  minute: 57,
  templates: [
  {
    template: `Dear all😘`,
  },
  {
    template: weatherTemplate,
    type: 'weather'
  },
  {
    template: lunarTemplate,
    type: 'lunar'
  },
  {
    template: `      @所有人`,
  }],
 
});


// gyhdsb_robot.test() // 测试立即执行使用
1.1.3

11 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago