Created
February 10, 2015 02:31
-
-
Save matbor/1ca4c1c87383eccc5f32 to your computer and use it in GitHub Desktop.
Pushover api test for python. Simple script for testing out the pushover api and all it's options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://pushover.net/api# | |
import httplib, urllib | |
conn = httplib.HTTPSConnection("api.pushover.net:443") | |
conn.request("POST", "/1/messages.json", | |
urllib.urlencode({ | |
"token": "xxxxxxxxxxxxxxxxxxxx", | |
"user": "xxxxxxxxxxxxxxxxxxxx", | |
"title": "Title of message", | |
"message": "message contents", | |
"priority": 0, | |
"sound":"spacealarm", | |
"retry": 60, | |
"expire": 3600, | |
"url_title":"tesing url title", | |
"url":"https://twitter.com/bordignon", | |
}), { "Content-type": "application/x-www-form-urlencoded" }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment