yanyuyijian/Conf/Vtop/notify/notify.md
2021-06-24 10:45:38 +08:00

1.2 KiB

pushplus

{ "token": xxxxxxxxxxxxxxxxxxxx, "title": $title$, "content": $body$\n$url$, "Content-Type": application/json }

telegram

Post https://api.telegram.org/botxxxxxxxxxx/ { "method": "sendMessage", "chat_id": xxxxxxxxxx, "text": $title$\n$body$\n$url$ }

COOKIESJD

[ { "userName": "", "cookie": "pt_key=;pt_pin=;" }, { "userName": "", "cookie": "pt_key=;pt_pin=;" } ]

notify.js

if (typeof title !== "undefined") { botNotify(title, body, url) } //if (typeof title !== "undefined") { botNotify1(title, body, url) botNotify2(title, body, url) }

function botNotify(title, body, url) { if (body=== "undefined"){body=""} if (url==="undefined"){url=""} let req = { url: 'https://api.telegram.org/botxxxxxxxxxx/', headers: { 'Content-Type': 'application/json; charset=UTF-8' }, method: 'post', data: { "method": "sendMessage", "chat_id": 'xxxxxxxxxx', "text": ${title}\n${body}\n${url} } } $axios(req).then(res=>{ console.log('mynotify1 ֪ͨ½á¹û', res.data) }).catch(e=>{ console.error('mynotify1 ֪ͨʧ°Ü', e.message) }) }