Skip to content

Instantly share code, notes, and snippets.

@matbor
Created February 10, 2015 02:31
Show Gist options
  • Save matbor/1ca4c1c87383eccc5f32 to your computer and use it in GitHub Desktop.
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.
# 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