a dotnet core application for webhooks
- install dotnet core environment
- clone project
- cd project and run
dotnet restore
- run
dotnet publish -c Release -o /home/MessagePusher/publish
- cd publish folder and run
dotnet MessagePusher.Web.dll
- ref
doc/supervisor.conf
docker-compose up -d
-
reload config file without restart app request
http://{your_host}:8001/api/reload
-
set message senders
- edit
/publish/config.json
, add:e.g."Sender": { "{your sender name}": { "Type": "{required, sender type}", "{xxx}": "{sender config field}" } }
💡 telegram: follow this link to get your chat id"Sender": { "SendToAlice": { "Type": "ServerJiang", "Token": "" }, "SendToBob": { "Type": "Telegram", "Token": "", "ChatId": "" }, "SendToCarol": { "Type": "Slack", "Webhook": "https://hooks.slack.com/services/{{service token}}" } }
💡 slack: follow this link to set your incoming webhooks
- edit
-
web hook
e.g. Github- Payload URL
http://{your_host}:8001/api/github
- content-type
application/json
- set config
edit
/publish/config.json
, add:"Receiver": { "GitHub": { "Token": "", "SendTo": [ "your sender name" ] } }
- Payload URL
-
simple site monitor service
- config
"Receiver": { "SiteMonitor": { "Sites": [ "{your site, e.g. https://i.caoyue.me/}" ], "SendTo": [ "{your sender name}" ] } }
- cronjob
*/5 * * * * curl http://{your_host}:8001/api/sitemonitor >/dev/null 2>&1
- config
-
twitch stream notification
- config
💡 To get a client ID, register a developer application on the connections page of your Twitch account.
"Receiver": { "Twitch": { "Channels": [ "{twitch channel id}" ], "ClientId": "{your client id}", "SendTo": [ "{your sender name}" ] } }
- cronjob
*/5 * * * * curl http://{your_host}:8001/api/douyu >/dev/null 2>&1
- config
-
斗鱼开播提醒
- config
需要提醒的房间 id 填入
"Receiver": { "DouYu": { "Rooms": [ "{douyu room id}" ], "SendTo": [ "{your sender name}" ] } }
Rooms
- 设置 cronjob
*/5 * * * * curl http://{your_host}:8001/api/douyu >/dev/null 2>&1
- config