small-package/luci-app-serverchan/root/usr/share/serverchan/api/diy.json

41 lines
1.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"_//": "-------------------------------------------------------------------------------",
"_readme": "这是 自定义 api 文件,这里以 telegram 为例",
"_readme": "特殊符号请使用斜杠转义,变量使用 ${var} 表示",
"_//": "-------------------------------------------------------------------------------",
"_api": "【DIY 推送】",
"_url": "api 地址",
"_data": "生成的 json 文件路径,一般不需要改,如 api 不支持 json请参考 serverchan 推送接口",
"_content_type": "post 内容类型,这里为 json",
"_//": "-------------------------------------------------------------------------------",
"_str_title_start": "标题粗体字开始符号",
"_str_title_end": "标题粗体字结束符号",
"_str_linefeed": "换行符号",
"_str_splitline": "换行+分隔符",
"_str_space": "空格",
"_str_tab": "TAB用在行首生成文字区块",
"_//": "-------------------------------------------------------------------------------",
"_type":
{
"_readme": "type 对象因为需要转义变量,前后必须使用 斜杠+双引号 转义",
"_readme": "参照上文说明,填写下文相关参数"
},
"_//": "-------------------------------------------------------------------------------",
"url": "https://api.telegram.org/bot${tg_token}/sendMessage",
"data": "@${tempjsonpath}",
"content_type": "Content-Type: application/json",
"str_title_start": "<b>",
"str_title_end": "</b>",
"str_linefeed": "\\n",
"str_splitline": "\\n----\\n",
"str_space": " ",
"str_tab": " ",
"type":
{
"text":"\"${str_title_start}${1}${str_title_end}${str_splitline}${nowtime}${2}\"",
"chat_id":"\"${chat_id}\"",
"parse_mode":"\"HTML\""
}
}