v2ex-pusher
v2ex-pusher 是一个通过 V2EX api 使用 Github Action 每 5 分钟执行一次获取最新消息并发送通知的工具。
环境变量
V2EX_TOKEN=...
JSON_TO_FETCH_BASE64=... // 参考 telegram
KV_URL="redis://...."
KV_REST_API_URL="https://...vercel-storage.com"
KV_REST_API_TOKEN="AYg...."
KV_REST_API_READ_ONLY_TOKEN="..."
JSON_TO_FETCH_BASE64
// Telegram
{
"method": "POST",
"url": "https://api.telegram.org/bot/sendMessage",
"headers": {
"Content-Type": "application/json"
},
"body": {
"chat_id": ,
"text": "#replace_hoder#"
}
}
Github secrets define
secrets.VRECEL_APP_LINK
APIs
[td]Request[/td]
[td]Description[/td]
http:///api/notify?v2exToken=&jsonToFetchBase64=
Manually trigger a request with the specified V2EX token and base64 encoded JSON to fetch.
http:///api/id-history
View the processed message IDs.
http:///api/id-history?clear=true
Reset the list of processed message IDs.