更新中英文通知文档

This commit is contained in:
“hhhkkk520” 2022-07-21 16:51:16 +02:00
parent 4aa07d2e10
commit a308d49a02
2 changed files with 40 additions and 6 deletions

View File

@ -18,7 +18,39 @@ Refer to the example below, it is very flexible.
- Request method: GET - Request method: GET
- Request type: default - Request type: default
- Body: null - Body: null
- URL Parameter acquisition instructionsThe XXXXXX in botXXXXXX is the token provided when you follow the official @Botfather in Telegram and enter /newbot to create a new bot. (In the line after _Use this token to access the HTTP API_). The 'bot' are essential. After creating a bot, you need to talk to the BOT in Telegram (send a random message) before you can send a message by using API. YYYYYY is Telegram user's ID, you can get it by talking to the bot @userinfobot. - Notes for this methodThe XXXXXX in botXXXXXX is the token provided when you follow the official @Botfather in Telegram and enter /newbot to create a new bot. (In the line after _Use this token to access the HTTP API_). The 'bot' are essential. After creating a bot, you need to talk to the BOT in Telegram (send a random message) before you can send a message by using API. YYYYYY is Telegram user's ID, you can get it by talking to the bot @userinfobot.
- Email notification example - Outlook, contributed by [@MIKU_N
](https://github.com/MIKU-N)
- Name: MS Mail Notification
- URLhttps://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
- Request method: POST
- Request type: JSON
- Header: `{"Content-type":"application/json",
"Authorization":"Bearer {Token}"}`
- Body:
```
{
"message": {
"subject": "Server Status Notification",
"body": {
"contentType": "Text",
"content": "#NEZHA#"
},
"toRecipients": [
{
"emailAddress": {
"address": "ADDRESS FOR RECEVING EMAILS"
}
}
]
}
}
```
- Notes for this method: This method requires calling Microsoft Graph V1.0, you need to go to Microsoft Graph and create your own application, give `Mail.Send` permission and get the Token, or you can go [Microsoft Graph Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) directly to give permission and get the Token, just replace the Token in the Header with the actual Token.
<br/> <br/>
<br/> <br/>

View File

@ -26,7 +26,7 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
- 请求类型: JSON - 请求类型: JSON
- Body: `{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}` - Body: `{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}`
- Telegram 示例 [@haitau](https://github.com/haitau) 贡献 - Telegram 示例 贡献者:[@haitau](https://github.com/haitau)
- 名称telegram 机器人消息通知 - 名称telegram 机器人消息通知
- URLhttps://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA# - URLhttps://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
@ -35,7 +35,7 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
- Body: 空 - Body: 空
- URL 参数获取说明botXXXXXX 中的 XXXXXX 是在 telegram 中关注官方 @Botfather ,输入/newbot 创建新的机器人bot会提供的 token在提示 Use this token to access the HTTP API:后面一行)这里 'bot' 三个字母不可少。创建 bot 后,需要先在 telegram 中与 BOT 进行对话(随便发个消息),然后才可用 API 发送消息。YYYYYY 是 telegram 用户的数字 ID。与机器人@userinfobot 对话可获得。 - URL 参数获取说明botXXXXXX 中的 XXXXXX 是在 telegram 中关注官方 @Botfather ,输入/newbot 创建新的机器人bot会提供的 token在提示 Use this token to access the HTTP API:后面一行)这里 'bot' 三个字母不可少。创建 bot 后,需要先在 telegram 中与 BOT 进行对话(随便发个消息),然后才可用 API 发送消息。YYYYYY 是 telegram 用户的数字 ID。与机器人@userinfobot 对话可获得。
- Outlook 示例 - 邮件通知示例 - Outlook 贡献者:[@MIKU_N](https://github.com/MIKU-N)
- 名称MS邮件告警 - 名称MS邮件告警
- URLhttps://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail - URLhttps://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
@ -44,7 +44,8 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
- Header: `{"Content-type":"application/json", - Header: `{"Content-type":"application/json",
"Authorization":"Bearer {Token}"}` "Authorization":"Bearer {Token}"}`
- Body: - Body:
`{ ```
{
"message": { "message": {
"subject": "服务器状态警报", "subject": "服务器状态警报",
"body": { "body": {
@ -59,8 +60,9 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。
} }
] ]
} }
}` }
- URL 参数获取说明此方式调用Microsoft Graph V1.0,需要前往Microsoft Graph自行创建应用程序并授予`Mail.Send`权限并获取Token;或者你可以使用[Microsoft Graph Explorer](https://developer.microsoft.com/zh-cn/graph/graph-explorer)直接授予权限并获取Token。将Header中的Token字段替换为实际字符段即可。 ```
- URL 参数获取说明:此方式调用 Microsoft Graph V1.0,需要前往 Microsoft Graph 自行创建应用程序,授予 `Mail.Send` 权限并获取 Token;或者你可以使用[Microsoft Graph Explorer](https://developer.microsoft.com/zh-cn/graph/graph-explorer)直接授予权限并获取 Token。将 Header 中的 Token 字段替换为实际字符段即可。
<br/> <br/>