fastify-dingtalk-robot

0.3.1 • Public • Published

fastify-dingtalk-robot

Fastify plugin for dingtalk robot.

NPM version

Install

npm i fastify-dingtalk-robot --save

Usage

'use strict'
 
const fastify = require('fastify')()
fastify.register(require('fastify-dingtalk-robot'), {
  accessToken: 'xxxxxxxxx',
  secret: 'SECxxxxxx'
})
const { dingtalkRobot } = fastify
const textContent = {
  msgtype: 'text',
  text: {
    content: '我就是我, 是不一样的烟火'
  },
  at: {
    atMobiles: [
      '156xxxx8827',
      '189xxxx8325'
    ],
    isAtAll: false
  }
}
dingtalkRobot.send(textContent)
  .then((res) => {
  // TODO
  })

More Usage

Package Sidebar

Install

npm i fastify-dingtalk-robot

Weekly Downloads

6

Version

0.3.1

License

MIT

Unpacked Size

2.74 kB

Total Files

5

Last publish

Collaborators

  • huangang