PushOver versenden von Raspberry Pi
Erscheinungsbild
import httplib, urllib# Application specific variablesapplication_token = "YOUR APPLICATION TOKEN"user_token = "YOUR USER TOKEN"# Message specific variablestitle = "A Simple Test"message = "Saying hello from BeagleBone Black"url = "http://michaelhleonard.com/blog"# To remove any of these fields you will need to remove them# from the conn.request() below# Start your connection with the Pushover API serverconn = httplib.HTTPSConnection("api.pushover.net:443")# Send a POST request in urlencoded jsonconn.request("POST", "/1/messages.json",urllib.urlencode({"token": application_token,"user": user_token,"title": title,"message": message,"url": url,}), { "Content-type": "application/x-www-form-urlencoded" })# Listen for any error messages or other responsesconn.getresponse()