1.0.0 • Published 1 year ago

pushmasage v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

hello push-masage

一款消息推送的 javascript 库

使用

yarn add pushmasage

npm install pushmasage
import pushMasage from 'pushmasage';

// 飞书
const pushInfo = debugTool('accessToken', 'secret','feishu')
pushInfo.sendRickText(`项目通知`, [
    [
      { tag: 'text', text: `信息:` },
      {
        tag: 'a',
        text: `错误地址`,
        href: `xx`,
      },
    ],
  ]);



// 钉钉
const pushInfo = debugTool('accessToken', 'secret',)
const Link = pushInfo.Link;
const link = new Link(`错误类型:${data.errortype},${data.message}`);
link.setTitle(`${project.projectname} 项目`).setImage('imgUrl').setUrl(`URL`);
pushInfo.send(link);