Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huangang/fastify-dingtalk-robot
Fastify plugin for dingtalk robot.
https://github.com/huangang/fastify-dingtalk-robot
dingtalk fastify fastify-plugin
Last synced: about 2 months ago
JSON representation
Fastify plugin for dingtalk robot.
- Host: GitHub
- URL: https://github.com/huangang/fastify-dingtalk-robot
- Owner: huangang
- Created: 2019-10-24T10:15:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-05T01:25:38.000Z (about 5 years ago)
- Last Synced: 2024-11-15T22:32:38.232Z (3 months ago)
- Topics: dingtalk, fastify, fastify-plugin
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastify-dingtalk-robot
Fastify plugin for dingtalk robot.
[![NPM version](https://img.shields.io/npm/v/fastify-dingtalk-robot.svg?style=flat)](https://www.npmjs.com/package/fastify-dingtalk-robot)
## Install
```
npm i fastify-dingtalk-robot --save
```## Usage
```js
'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](https://github.com/x-cold/dingtalk-robot#1-%E7%94%A8%E6%B3%95)