oseshed.blogg.se

Pushbullet iphone
Pushbullet iphone











pushbullet iphone

delete_pushes () Pushing to specific devices You can also delete all of your pushes: pushes = pb. get ( "iden" ))īoth of these raise PushbulletError if there’s an error.

pushbullet iphone

latest = pushes # We already read it, so let's dismiss it pb. You can use this data to dismiss notifications or delete pushes. Pushes is a list containing dictionaries that have push data. You can also view all previous pushes: pushes = pb. push_file ( file_url = "", file_name = "cat.jpg", file_type = "image/jpeg" ) Working with pushes The advantage of this is that if you already have a file uploaded somewhere, you can use that instead of uploading again. These are the same parameters that push_file take. Upload_file returns a dictionary containing file_type, file_url and file_name keys. upload_file ( pic, "picture.jpg" ) push = pb. with open ( "my_cool_picture.jpg", "rb" ) as pic : file_data = pb. First you need to upload the file, and after that you can push it like you would anything else. push_link ( "Cool site", "" ) Pushing a file push_list ( "Shopping list", to_buy ) Pushing a link push = pb. push_address ( "home", address ) Pushing a list to_buy = push = pb. Pushing an address address = " 25 E 85th St, 10028 New York, NY" push = pb. Push is a dictionary containing the data returned by the Pushbullet API. push_note ( "This is the title", "This is the body" ) Pushing things Pushing a text note push = pb. If your key is invalid (that is, the Pushbullet API returns a 401), an InvalidKeyError is raised. Usage Authentication from pushbullet import Pushbullet pb = Pushbullet ( api_key ) The easiest way is to just open your favorite terminal and type pip install pushbullet.pyĪlternatively you can clone this repo and install it with python setup.py install Requirements In order to use the API you need an API key that can be obtained This is a python library for the wonderful













Pushbullet iphone