diff --git a/notification/pushover.sh b/notification/pushover.sh new file mode 100755 index 0000000..ef07257 --- /dev/null +++ b/notification/pushover.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +#################################################################################################################### +# +# full dokumentation on https://pushover.net/api +# +# POST an HTTPS request to https://api.pushover.net/1/messages.json with the following parameters: +# token (required) - your application's API token +# user (required) - the user/group key (not e-mail address) of your user (or you), +# viewable when logged into our dashboard (often referred to as USER_KEY in our documentation and code examples) +# message (required) - your message +# +# Some optional parameters may be included: +# device - your user's device name to send the message directly to that device, +# rather than all of the user's devices (multiple devices may be separated by a comma) +# title - your message's title, otherwise your app's name is used +# url - a supplementary URL to show with your message +# url_title - a title for your supplementary URL, otherwise just the URL is shown +# priority - send as +# -2 to generate no notification/alert, +# -1 to always send as a quiet notification, +# 1 to display as high-priority and bypass the user's quiet hours, or +# 2 to also require confirmation from the user +# timestamp - a Unix timestamp of your message's date and time to display to the user, rather than the time your message is received by our API +# sound - the name of one of the sounds supported by device clients to override the user's default sound choice +# +# That's it. Make sure your application is friendly to our API servers and you're all set. +# For more information on each parameter, keep reading or jump to a section at the left. +# +# Need help using our API or found an error in the documentation? Drop us a line. +# +#################################################################################################################### + +curl -s \ + --form-string "token=asphg1hm9qecnzyrc8i7k5oy1efhuk" \ + --form-string "user=u44drxvefhqrehxid8f131d9v5nit4" \ + --form-string "message=this is a + +message with a line break" \ + --form-string "priority=1" \ + --form-string "title=Dies ist ein Test" \ + https://api.pushover.net/1/messages.json