Skip to content

Instantly share code, notes, and snippets.

@0asa
Last active August 29, 2015 14:02
Show Gist options
  • Save 0asa/6e1805a500857b6ef996 to your computer and use it in GitHub Desktop.
Save 0asa/6e1805a500857b6ef996 to your computer and use it in GitHub Desktop.
Pushbullet notification
import requests
API_KEY = 'API_KEY'
IDEN = 'DEVICE_ID'
# get the list of available devices
resp = requests.get('https://api.pushbullet.com/v2/devices',auth=(API_KEY,''))
print resp.json()
data = {
'type':'note',
'title':'Now',
'body':'I can send push notifications to my phone from a Python script (or whatever)',
'device_iden' : IDEN
}
# send a push notification
resp = requests.post('https://api.pushbullet.com/api/pushes',data=data, auth=(API_KEY,''))
@0asa
Copy link
Author

0asa commented Jun 1, 2014

Hurry up, go get more informations here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment