繁体   English   中英

自动将链接推送到手机的最佳方法是什么?

[英]What's the best way to automatically push a link to my phone?

我会编写脚本或利用Chrome扩展程序自动将链接推送到我的Android。 我已经安装了Pushbullet,这很棒,但是我必须使用键盘快捷键来手动推送链接。 我将如何实现此自动化? 有没有办法只推送某些URL?

非常感谢!

如果它们来自脚本,则可以很容易地调用pushbullet api将推送发送到手机: https ://docs.pushbullet.com/#pushes

如果在命令行上使用curl,它将看起来像这样:

curl --header 'Authorization: Bearer <your_access_token_here>' -X POST https://api.pushbullet.com/v2/pushes \
    --header 'Content-Type: application/json' \
    --data-binary '{"type": "note", "title": "Note Title", "body": "Note Body"}'

如果您使用的是python,则可能要使用requests库,它看起来像这样:

requests.post('https://api.pushbullet.com/v2/pushes',
    data=json.dumps({"type": "note", "title": "Note Title", "body": "Note Body"}), 
    headers={'Authorization': 'Bearer <access token>', 'Content-Type': 'application/json'})

您可以在此页面上找到您的访问令牌: https : //www.pushbullet.com/account

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM