Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

URL fixes and URL support on notifications #1

Merged
merged 1 commit into from

2 participants

@donnex

Updated URLs (homepage and recommended API url). Also added support for setting the URL on notifications (new in 1.2).

@mikeboers mikeboers merged commit 406c5af into from
@mikeboers
Owner

Thanks! =]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2011
  1. @donnex

    Updated URLs (homepage and recommended API url). Also added support f…

    donnex authored
    …or setting the URL on notifications (new in 1.2).
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 4 deletions.
  1. +7 −4 prowler.py
View
11 prowler.py
@@ -4,8 +4,7 @@
sending multiple messages, and a `LogHandler` for sending log records via
prowl.
-See: http://prowl.weks.net/
-
+See: http://www.prowlapp.com/
"""
@@ -24,7 +23,7 @@
__all__ = ['Error', 'get_remaining', 'get_reset_time', 'verify', 'post',
'Prowl', 'LogHandler']
-API_URL_BASE = 'https://prowl.weks.net/publicapi/'
+API_URL_BASE = 'https://api.prowlapp.com/publicapi/'
DEFAULT_PRIORITY = 0
DEFAULT_APP = 'py:%s' % __name__
@@ -119,13 +118,15 @@ def verify(key):
raise Error(text.lower())
-def post(key, message, priority=None, app=None, event=None, providerkey=None):
+def post(key, message, priority=None, url=None, app=None, event=None, providerkey=None):
"""Send a message.
Parameters:
key -- An API key, or a list of API keys to post to.
message -- The message to send.
priority -- Integer from -2 to 2 inclusive.
+ url -- Requires Prowl 1.2 The URL which should be attached to the
+ notification.
app -- App identifier to send as.
event -- Event identifier to send as.
providerkey -- Provider API key if you have been whitelisted.
@@ -141,6 +142,8 @@ def post(key, message, priority=None, app=None, event=None, providerkey=None):
'event': event or DEFAULT_EVENT,
'description': message
}
+ if url is not None:
+ data['url'] = url
if providerkey is not None:
data['providerkey'] = providerkey
Something went wrong with that request. Please try again.