| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Client
Client for sending push notifications to Android and iOS devices
with the Pushover application installed.
Member Vars:
token: A string containing a valid API token.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize the Pushover client.
Args:
token: A string of 30 characters containing a valid API
token.
users: A list containing 1 or 2-item tuples, where the first
item is a string of 30 characters containing a user
token, and the second is an optional string of up to 25
characters containing a device name for the given user.
(default: None)
|
Send a notification to each user/device in self.users.
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:
title: A string of up to 100 characters containing the
title of the message (i.e. subject or brief description)
message: A string of up to 512 characters containing the
notification text.
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 token.
Args:
user: A string containing a valid user token.
Returns:
A boolean containing True if the user token is valid, and
False if it is not.
|
Verify a device for a user.
Args:
user: A string containing a valid user token.
device: A string containing a device name.
Raises:
pushnotify.exceptions.ApiKeyError
Returns:
A boolean containing True if the device is valid, and
False if it is not.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Sep 20 20:21:12 2012 | http://epydoc.sourceforge.net |