| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
abstract.AbstractClient --+
|
Client
Client for sending push notifications to Android and iOS devices
with the Pushover application installed.
Member Vars:
developerkey: A string containing a valid token for the Pushover
application.
application: A string containing the name of the application on
behalf of whom the Pushover client will be sending messages.
Not used by this client.
apikeys: A dictionary where the keys are strings containing
valid user identifier, and the values are lists of strings,
each containing a valid device identifier.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize the Pushover client.
Args:
developerkey: A string containing a valid token for the
Pushover application.
application: A string containing the name of the application
on behalf of whom the Pushover client will be sending
messages. Not used by this client. (default: '')
|
Send a notification to each user/device combintation in
self.apikeys.
As of 2012-09-18, this is not returning a 4xx status code as
per the Pushover API docs, but instead chopping the delivered
messages off at 512 characters.
Args:
description: A string of up to DESC_LIMIT characters
containing the notification text.
event: A string of up to 100 characters containing a
subject or brief description of the event.
split: A boolean indicating whether to split long
descriptions among multiple notifications (True) or to
possibly raise an exception (False). (default True)
kwargs: A dictionary with any of the following strings as
keys:
priority: The integer 1, which will make the
notification display in red and override any set
quiet hours.
url: A string of up to 500 characters containing a URL
to attach to the notification.
url_title: A string of up to 50 characters containing a
title to give the attached URL.
(default: None)
Raises:
pushnotify.exceptions.ApiKeyError
pushnotify.exceptions.FormatError
pushnotify.exceptions.RateLimitExceeded
pushnotify.exceptions.ServerError
pushnotify.exceptions.UnrecognizedResponseError
|
Verify a user identifier.
Args:
apikey: A string containing a user identifer.
Returns:
A boolean containing True if apikey is valid, and
False if it is not.
|
Verify a device identifier for the user given by apikey.
Args:
apikey: A string containing a user identifer.
device_key: A string containing a device identifier.
Raises:
pushnotify.exceptions.ApiKeyError
Returns:
A boolean containing True if device_key is valid for
apikey, and False if it is not.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Oct 3 20:47:38 2012 | http://epydoc.sourceforge.net |