Skip to content

Commit

Permalink
docs: format webhook json
Browse files Browse the repository at this point in the history
  • Loading branch information
jeessy2 committed Apr 10, 2023
1 parent 3093854 commit 62bd142
Showing 1 changed file with 63 additions and 4 deletions.
67 changes: 63 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,49 @@
- 钉钉电脑端 -> 群设置 -> 智能群助手 -> 添加机器人 -> 自定义
- 只勾选 `自定义关键词`, 输入的关键字必须包含在RequestBody的content中, 如:`你的公网IP变了`
- URL中输入钉钉给你的 `Webhook地址`
- RequestBody中输入 `{"msgtype": "markdown","markdown": {"title":"你的公网IP变了","text": "#### 你的公网IP变了 \n - IPV4地址:#{ipv4Addr} \n - 域名更新结果:#{ipv4Result} \n"}}`
- RequestBody中输入
```json
{
"msgtype": "markdown",
"markdown": {
"title": "你的公网IP变了",
"text": "#### 你的公网IP变了 \n - IPv4地址:#{ipv4Addr} \n - 域名更新结果:#{ipv4Result} \n"
}
}
```
</details>
- <details><summary>飞书</summary>

- 飞书电脑端 -> 群设置 -> 添加机器人 -> 自定义机器人
- 安全设置只勾选 `自定义关键词`, 输入的关键字必须包含在RequestBody的content中, 如:`你的公网IP变了`
- URL中输入飞书给你的 `Webhook地址`
- RequestBody中输入 `{"msg_type": "post","content": {"post": {"zh_cn": {"title": "你的公网IP变了","content": [[{"tag": "text","text": "IPV4地址:#{ipv4Addr}"}] , [{"tag": "text","text": "域名更新结果:#{ipv4Result}"}]]}}}}`
- RequestBody中输入
```json
{
"msg_type": "post",
"content": {
"post": {
"zh_cn": {
"title": "你的公网IP变了",
"content": [
[
{
"tag": "text",
"text": "IPv4地址:#{ipv4Addr}"
}
],
[
{
"tag": "text",
"text": "域名更新结果:#{ipv4Result}"
}
]
]
}
}
}
}
```
</details>
- <details><summary>Telegram</summary>

Expand All @@ -131,13 +166,37 @@

- [获取token](https://www.pushplus.plus/push1.html)
- URL中输入 `https://www.pushplus.plus/send`
- RequestBody中输入 `{"token":"your token","title":"你的公网IP变了","content":"你的公网IP变了 \n - IPV4地址:#{ipv4Addr} \n - 域名更新结果:#{ipv4Result} \n"}`
- RequestBody中输入
```json
{
"token": "your token",
"title": "你的公网IP变了",
"content": "你的公网IP变了 \n - IPv4地址:#{ipv4Addr} \n - 域名更新结果:#{ipv4Result} \n"
}
```
</details>
- <details><summary>Discord</summary>

- Discord任意客户端 -> 伺服器 -> 频道设置 -> 整合 -> 查看Webhook -> 新Webhook -> 复制Webhook网址
- URL中输入Discord复制的 `Webhook网址`
- RequestBody中输入 `{"content":"域名 #{ipv4Domains} 动态解析 #{ipv4Result}.","embeds":[{"description":"#{ipv4Domains} 的动态解析 #{ipv4Result}, IP: #{ipv4Addr}","color":15258703,"author":{"name":"DDNS"},"footer":{"text":"DDNS #{ipv4Result}"}}]}`
- RequestBody中输入
```json
{
"content": "域名 #{ipv4Domains} 动态解析 #{ipv4Result}.",
"embeds": [
{
"description": "#{ipv4Domains} 的动态解析 #{ipv4Result}, IP: #{ipv4Addr}",
"color": 15258703,
"author": {
"name": "DDNS"
},
"footer": {
"text": "DDNS #{ipv4Result}"
}
}
]
}
```
</details>

- [查看更多Webhook配置参考](https://github.com/jeessy2/ddns-go/issues/327)
Expand Down

0 comments on commit 62bd142

Please sign in to comment.