Bark/README.md
2023-08-23 11:49:14 +08:00

124 lines
4.1 KiB
Markdown
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.

## 使用文档
[https://bark.day.app](https://bark.day.app)
## 问题反馈 Telegram 群
[Bark反馈群](https://t.me/joinchat/OsCbLzovUAE0YjY1)
## 发送推送
1. 打开APP复制测试URL
<img src="https://wx4.sinaimg.cn/mw2000/003rYfqply1grd1meqrvcj60bi08zt9i02.jpg" width=365 />
2. 修改内容请求这个URL
```
可以发 get 或者 post 请求 ,请求成功会立即收到推送
URL 组成: 第一个部分是 key , 之后有三个匹配
/:key/:body
/:key/:title/:body
/:key/:category/:title/:body
title 推送标题 比 body 字号粗一点
body 推送内容 换行请使用换行符 '\n'
category 另外的功能占用的字段,还没开放 忽略就行
post 请求 参数名也是上面这些
```
## 复制推送内容
收到推送时下拉推送(或在通知中心左滑查看推送)有一个`复制`按钮,点击即可复制推送内容。
> <img src="http://wx4.sinaimg.cn/mw690/0060lm7Tly1g0btjhgimij30ku0a60v1.jpg" width=375 />
```objc
//将复制“验证码是9527”
https://api.day.app/yourkey/验证码是9527
```
携带参数 automaticallyCopy=1 收到推送时,推送内容会自动复制到粘贴板(如发现不能自动复制,可尝试重启一下手机)
```objc
//自动复制 “验证码是9527” 到粘贴板
https://api.day.app/yourkey/验证码是9527?automaticallyCopy=1
```
携带copy参数 则上面两种复制操作将只复制copy参数的值
```objc
//自动复制 “9527” 到粘贴板
https://api.day.app/yourkey/验证码是9527?automaticallyCopy=1&copy=9527
```
## 其他参数
* url
```
// 点击推送将跳转到url的地址发送时URL参数需要编码
https://api.day.app/yourkey/百度网址?url=https://www.baidu.com
```
* isArchive
```
// 指定是否需要保存推送信息到历史记录1 为保存,其他值为不保存。
// 如果不指定这个参数推送信息将按照APP内设置来决定是否保存。
https://api.day.app/yourkey/需要保存的推送?isArchive=1
```
* group
```
// 指定推送消息分组,可在历史记录中按分组查看推送。
https://api.day.app/yourkey/需要分组的推送?group=groupName
```
* icon (仅 iOS15 或以上支持)
```
// 指定推送消息图标
https://api.day.app/yourkey/需要自定义图标的推送?icon=http://day.app/assets/images/avatar.jpg
```
* 时效性通知
```
// 设置时效性通知
https://api.day.app/yourkey/时效性通知?level=timeSensitive
// 可选参数值
// active不设置时的默认值系统会立即亮屏显示通知。
// timeSensitive时效性通知可在专注状态下显示通知。
// passive仅将通知添加到通知列表不会亮屏提醒
```
## 后端代码
[bark-server](https://github.com/Finb/bark-server)
>将后端代码部署在你自己的服务器上。支持Docker
## Chrome 插件
[Bark-Chrome-Extension](https://github.com/xlvecle/Bark-Chrome-Extension)
>这是一款chrome插件能帮你方便地把网页上的文本或者网址推送到Bark手机端。
效果展示
![](http://wx4.sinaimg.cn/mw690/0060lm7Tly1fyaqyhzdnxg30660dcu0h.gif)
## 在线定时发送
[https://api.ihint.me/bark.html](https://api.ihint.me/bark.html)
## Windows推送客户端
[https://github.com/HsuDan/BarkHelper](https://github.com/HsuDan/BarkHelper)
## 跨平台的命令行应用
[https://github.com/JasonkayZK/bark-cli](https://github.com/JasonkayZK/bark-cli)
## GitHub Actions
[https://github.com/harryzcy/action-bark](https://github.com/harryzcy/action-bark)
## Quicker 动作
使用 Quicker 软件在 Windows 上将选中文字一键推送到iPhone支持打开URL和自动复制推送内容
[https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b](https://getquicker.net/Sharedaction?code=e927d844-d212-4428-758d-08d69de12a3b)
## Bark for Wox
[https://github.com/Zeroto521/Wox.Plugin.Bark](https://github.com/Zeroto521/Wox.Plugin.Bark)
## bark-jssdk
[https://github.com/afeiship/bark-jssdk](https://github.com/afeiship/bark-jssdk)
## java-bark-server
[https://gitee.com/hotlcc/java-bark-server](https://gitee.com/hotlcc/java-bark-server)
## Python for Bark
[barknotificator](https://github.com/funny-cat-happy/barknotificator)