0.0.1 • Published 4 years ago

eggjs-dingtalk-robot v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

egg-dingtalk-robot

NPM version David deps NPM download

Install

npm install egg-dingtalk-bot --save

Getting Started

// {app_root}/config/plugin.js
exports.dingtalkRobot = {
  enable: true,
  package: 'egg-dingtalk-bot',
};

// {app_root}/config/config.default.js

// {app_root}/app/router.js
app.get('/sendText', function* () {
  this.body = yield this.app.dingtalkRobot.sendText('测试测试!');
});

API

app.dingtalkRobot.sendText(text, opts) - send text
app.dingtalkRobot.sendTextAt(text, atMobiles, opts) - send text at mobiles
app.dingtalkRobot.sendTextAtAll(text, opts) - send text at all
app.dingtalkRobot.sendLink(link, opts) - send link
app.dingtalkRobot.sendMarkdown(markdown, opts) - send markdown
app.dingtalkRobot.send(opts) - send raw

More Information

自定义机器人

How to Contribute

Please let us know what we can help, check issues for bug reporting and suggestion.