统一化推送服务Nodejs API. 已支持钉钉, Discord, 邮件, 飞书, PushDeer, PushPlus, QQ, QQ 频道机器人, Server 酱, Showdoc Push, Telegram Bot, 企业微信群机器人, 息知, WxPusher, iGot, Chanify, Bark, Push, Slack, Pushback, Zulip, RocketChat等平台.
!!!!!仅推送!!!!!不交互!!!!!!
- QQ(go-cqhttp) -- GoCqhttp
QQ(Qmsg) -- QmsgQQ 频道机器人 -- QqChannel- QQ 官方机器人 -- QQBot(主动推送能力差)
- 钉钉群机器人 -- DingTalk
- Discord -- Discord
- 邮件 -- Mail
- 飞书群机器人 -- FeiShu
- 企业微信 -- WorkWeixin
- 企业微信群机器人 -- WorkWeixinBot
- Telegram Bot -- TelegramBot
- PushDeer -- PushDeer
- PushPlus -- PushPlus
- Server 酱 -- ServerChanTurbo
- Showdoc Push -- Showdoc
- 息知 -- Xizhi
- WxPusher -- WxPusher
NowPush -- NowPush- iGot -- IGot
- Chanify -- Chanify
- Bark -- Bark
- GoogleChat -- GoogleChat
- Push -- Push
- Slack -- Slack
- Pushback -- Pushback
- Zulip -- Zulip
- RocketChat -- RocketChat
Gitter -- Gitter- Pushover -- Pushover
- 爱语飞飞 -- Iyuu
- Ntfy -- Ntfy
- 一封传话 -- YiFengChuanHua
- WPush -- WPush
- PushBullet -- PushBullet
- SimplePush -- SimplePush
AnPush -- AnPush- PushMe -- PushMe
npm install all-pusher-api -S具体参数说明请查看说明文档
点击展开
const { PushApi } = require('all-pusher-api'); // 多平台同时推送
(async () => {
console.log((await new PushApi([
{
name: 'ServerChanTurbo',
config: {
key: {
token: '******'
}
}
},
{
name: 'PushDeer',
config: {
key: {
token: '******'
}
}
},
{
name: 'WxPusher',
config: {
key: {
token: '******',
uids: ['******']
}
}
},
...,
{
name: 'PushMe',
config: {
key: {
token: '******'
}
}
}
])
.send({ message: '测试文本' })).map((e) => (e.result.status >= 200 && e.result.status < 300) ? `${e.name} 测试成功` : e));
})();(async () => {
// Example 1
const { PushApi } = require('all-pusher-api'); // 多平台同时推送
const result = await new PushApi([
{
name: 'ServerChanTurbo',
config: {
key: {
token: '******'
}
}
}
])
.send({ message: '测试文本' });
console.log(result.map((e) => (e.result.status >= 200 && e.result.status < 300) ? `${e.name} 测试成功` : e));
// Example 2
const { WxPusher } = require('all-pusher-api/dist/WxPusher'); // 单平台推送可选
const wxPusherResult = await new WxPusher({
token: '******',
uids: ['******']
})
.send({ message: '测试文本' });
console.log(wxPusherResult);
})();npm install all-pusher-api -gallpush send -m '测试文本' -c '{\"name\":\"ServerChanTurbo\",\"config\":{\"key\":{\"token\":\"******\"}}}'
allpush send -m '测试文本' -f './config.json'
allpush send -h
# Usage: allpush send [options]
#
# 向配置的推送平台发送消息
#
# Options:
# -c, --config <config> JSON 配置字符串,需对引号进行转义。在线生成: https://configer.hclonely.com/?fileLink=https://raw.githubusercontent.com/HCLonely/all-pusher-api/main/config/template.yaml.js
# -f, --config-file <path> JSON 配置文件路径。在线生成: https://configer.hclonely.com/?fileLink=https://raw.githubusercontent.com/HCLonely/all-pusher-api/main/config/template.yaml.js
# -m, --message <text> 要发送的消息内容
# -t, --title <text> 消息标题
# -h, --help 显示帮助信息使用-c选项时JSON字符串要压缩为单行,双引号要转义! 使用多个通道同时推送时建议使用-f选项而不是-c选项!
所有平台支持均纯文本(
text)格式消息, 大部分支持markdown格式消息, 部分支持html格式消息
markdown*为支持html格式不支持markdown格式消息时自动将markdown转换为html格式
other为部分平台支持特殊格式的消息, 可通过customOptions传入参数, 具体参数请查看相应平台的文档
- Showdoc: 'text'
- Pushover: 'text'
- 爱语飞飞: 'text'
- SimplePush: 'text'
- QQ(go-cqhttp): 'text', 'other'
Qmsg: 'text', 'other'- Discord: 'text', 'other'
- 飞书: 'text', 'other'
- PushBullet: 'text', 'other'
NowPush: 'text', 'other'- Chanify: 'text', 'other'
- Bark: 'text', 'other'
- Server酱Turbo: 'text', 'markdown'
- 息知: 'text', 'markdown'
- WPush: 'text', 'markdown'
- AnPush: 'text', 'markdown'
- PushDeer: 'text', 'markdown', 'other'
- QQ官方机器人: 'text', 'markdown', 'other'
- 企业微信: 'text', 'markdown', 'other'
- 企业微信群机器人: 'text', 'markdown', 'other'
- 钉钉: 'text', 'markdown', 'other'
- TelegramBot: 'text', 'markdown', 'html'
- 一封传话: 'text', 'markdown', 'html'
- PushMe: 'text', 'markdown', 'html'
- 邮件: 'text', 'markdown*', 'html'
- PushPlus: 'text', 'markdown*', 'html'
- WxPusher: 'text', 'markdown*', 'html'
0-Missing Parameter: ***: 缺少必要参数10-Missing Options: 缺少发送消息配置11-Unknown Error: 未知错误200-Success: 推送成功201-Waiting: 待审核100-Error: 请求发送成功, 服务器返回错误信息101-No Response Data: 请求发送成功, 但没有接收到服务器返回的数据102-Request Error: 请求发送失败, 一般是网络问题103-Options Format Error: 参数格式错误104-Get "***" Failed: 获取参数失败140-Check Sign Failed: 签名校检失败