大家都知道我本来就是大聪明🤓,小机灵鬼😳,然后偶尔~嘿,我就要去 chatanywhere 看看API余额还有多少,这也没有个接口时不时的就要查一下,如果能提醒就好了,我就想:我怎么这么帅呢😎
首先使用火狐浏览器的开发者工具把提交数据复制下来
得到如下字符串
curl "https://api.chatanywhere.tech/v1/query/balance" --compressed -X POST -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" -H "Accept: application/json, text/plain, */*" -H "Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2" -H "Accept-Encoding: gzip, deflate, br, zstd" -H "Access-Control-Allow-Headers: Authorization,Origin, X-Requested-With, Content-Type, Accept" -H "Access-Control-Allow-Methods: GET,POST" -H "Access-Control-Allow-Origin: *" -H "Authorization: 不告诉你" -H "Origin: https://api.chatanywhere.tech" -H "Connection: keep-alive" -H "Referer: https://api.chatanywhere.tech/" -H "Sec-Fetch-Dest: empty" -H "Sec-Fetch-Mode: cors" -H "Sec-Fetch-Site: same-origin" -H "Priority: u=1" -H "Pragma: no-cache" -H "Cache-Control: no-cache" -H "Content-Length: 0"
然后使用 APIFOX 测试一下
就得到结果了
服务器的 Uptime Kuma
也是我安装的,可以监听服务,也可以监听json,非常方便,把参数填进去
这里使用了 JSONata,挺有意思,这样Uptime Kuma
就可以监听并通知到钉钉了,裆余额小于10时通知我的丁丁👏
所有这里只要有API
接口返回个json
,就可以使用 Uptime Kuma
监听通知并通知,是一个新的运维思路
本文作者:没想好
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!