一个python库和一个简单的pushbullet命令行应用程序。
PushbulletPythonLibrar的Python项目详细描述
用于Pushbullet的python库(和超级简单的命令行应用程序)。
库使用
>>>frompushbullet.pushbulletimportPushbullet>>>pb=Pushbullet(api_key='replace-with-your-api-key')>>>
列出设备:
>>>pb.list_devices(){u'shared_devices':[],u'devices':[]}>>>
发送便条:
>>>pb.bullet_note(device_idn,title="Hello, World!",body="This is an example note."){}>>>
命令行用法
$ pushbullet --help pushbullet -h usage: pushbullet [-h] -a API_KEY [-d DEVICE] [-t {note,link,address,list,file}] [-n TITLE] [-b BODY] [-i ITEMS] [-f FILE] [-l] optional arguments: -h, --help show this help message and exit -a API_KEY, --apikey API_KEY What is your Pushbullet API key? -d DEVICE, --device DEVICE What device do you want to send the bullet to? -t {note,link,address,list,file}, --type {note,link,address,list,file} What type of bullet do you want to send? -n TITLE, --name TITLE, --title TITLE The title/name of the note, link, address, or list. -b BODY, --body BODY, --address BODY The body, address of the note or additional data for a file. -u URL, --url URL The referenced url of the link. -i ITEMS, --items ITEMS The items in a list. -f FILE, --file FILE The file to push. -l, --list-devices Get a list of devices.