Last active
April 19, 2018 14:07
-
-
Save christianmondabon/08362d6b7cdc58ec009d19b360cfc65e to your computer and use it in GitHub Desktop.
send pushover message (message is 1st command line parameter)
This file contains 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
import http.client, urllib | |
conn = http.client.HTTPSConnection("api.pushover.net:443") | |
conn.request("POST", "/1/messages.json", | |
urllib.parse.urlencode({ | |
"token": "APP_TOKEN", | |
"user": "USER_KEY", | |
"message": str(sys.argv[1]), | |
}), { "Content-type": "application/x-www-form-urlencoded" }) | |
conn.getresponse() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment