push_note ( "Hello Channel!", "Hello My Channel" ) Then you can send a push to all subscribers of this channel like so: push = my_channel. All channels whichīelong to the current user can be retrieved as follows: # Get all channels created by the current user print ( pb. Website (also make sure to subscribe to that channel). First, create a channel on the Pushbullet remove_device ( listener )Ī PushbulletError is raised on error. Of course, you can also delete devices, even those not added by you. edit_device ( motog, nickname = "My MotoG" ) Deleting devices edit_device ( listener, make = "Python", model = "3.4.1" ) motog = pb. You can change the nickname, the manufacturer and the model of the device: listener = pb. Now you can use it like any other device. push_note ( "Hello world!", "We're using the api.", device = motog ) Creating new devicesĬreating a new device is easy too, you only need to specify a name for it. push_note ( "Hello world!", "We're using the api." )Īlternatively we can pass the device to push methods: push = pb. Now we can use the device objects like we did with pb: push = motog. # Get all devices that the current user has access to. So far all our pushes went to all connected devices, but there’s a way to limit that.įirst we need to get hold of some devices. 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. 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 I apologise if this is a duplicate of any recent post that I may of missed.This is a python library for the wonderful Click here to change notification settings.", this is still present even with the email notifications working. I would also note that at the top of the screen I have a banner stating "System notifications are disabled. Notifications by e-mail are working fine. Searching the forums I see that this was an issue before, and the only fix was to change version, these are all from 2+ years ago, is there a re-occurrence of the problem or am I missing something obvious? I have tried this after a reboot, but nothing has changed. Unlike when I make a change to the settings of any docker app, I will see the change being recorded in the log when it has completed. When I change the "Agent Function" to "Enabled", enter an "Access token" and then click apply, there is no activity in the log. Hi, I have been trying to set up PushBullet on Unraid 6.7.2, but I keep getting the message "Starting Services" in the lower info bar, I have left this for over 15 minutes but nothing changes, and refreshing the page nothing has changed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |