From 2ec7fcbfe1ce5a292a1ab4e1b990e925a54502f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=84=B6=E5=90=8E=E4=B8=83=E5=B9=B4?= <69092025+zzsj0928@users.noreply.github.com> Date: Sat, 11 Sep 2021 12:31:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E4=BD=BF=E7=94=A8POST?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E6=9B=BF=E4=BB=A3GET=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E6=94=AF=E6=8C=81Bark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 刚看到Bark的API里有支持POST --- root/usr/bin/pushbot/api/bark.json | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/root/usr/bin/pushbot/api/bark.json b/root/usr/bin/pushbot/api/bark.json index 89b13957..ae8dbf9e 100644 --- a/root/usr/bin/pushbot/api/bark.json +++ b/root/usr/bin/pushbot/api/bark.json @@ -2,15 +2,15 @@ "_api": "这是Bark推送 post 模板信息 api 文件", "_api": "【Bark推送】", - "url": "", + "url": "${bark_srv}/push?group=${device_name}", "data": "@${tempjsonpath}", - "content_type": "", + "content_type": "Content-Type: application/json; charset=utf-8", "str_title_start": "【", "str_title_end": "】", - "str_linefeed": "%0D%0A%0D%0A", - "str_splitline": "%0D%0A%0D%0A", - "str_space": "%20", - "str_tab": "%20", + "str_linefeed": "\\n", + "str_splitline": "\\n\\n", + "str_space": " ", + "str_tab": " ", "table_tab": "", "font_green": "", "font_green2": "", @@ -23,6 +23,12 @@ "boldstar": "", "type": { - "bark_text": "\"${bark_srv}/${bark_token}/${1}/${nowtime}${str_linefeed}${2}?group=${device_name}\"" + "device_key": "\"${bark_token}\"", + "title": "\"${1}\"", + "body": "\"${nowtime}${str_linefeed}${2}\"", + "ext_params": { + "group": "\"${device_name}\"", + "isArchive": "1" + } } }