| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
abstract.AbstractClient --+
|
Client
Client for sending push notificiations to Android devices with
the Notify My Android (NMA) application installed.
Member Vars:
developerkey: A string containing a valid developer key for the
NMA application.
application: A string containing the name of the application on
behalf of whom the NMA client will be sending messages.
apikeys: A dictionary where the keys are strings containing
valid user API keys, and the values are lists of strings,
each containing a valid user device key. Device keys are not
used by this client.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize the Notify My Android client.
Args:
developerkey: A string containing a valid developer key for
the NMA application.
application: A string containing the name of the application
on behalf of whom the NMA client will be sending
messages.
|
Send a notification to each user's apikey in self.apikeys.
Args:
description: A string of up to DESC_LIMIT characters
containing the main notification text.
event: A string of up to 1000 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: An integer between -2 and 2, indicating the
priority of the notification. -2 is the lowest, 2 is
the highest, and 0 is normal.
url: A string of up to 2000 characters containing a URL
to attach to the notification.
content_type: A string containing "text/html" (without
the quotes) that then allows some basic HTML to be
used while displaying the notification.
(default: None)
Raises:
pushnotify.exceptions.ApiKeyError
pushnotify.exceptions.FormatError
pushnotify.exceptions.RateLimitExceeded
pushnotify.exceptions.ServerError
pushnotify.exceptions.UnknownError
pushnotify.exceptions.UnrecognizedResponseError
|
This method is deprecated. Use verify_user instead.
|
Verify a user's API key.
Args:
apikey: A string of 48 characters containing a user's API
key.
Raises:
pushnotify.exceptions.RateLimitExceeded
pushnotify.exceptions.ServerError
pushnotify.exceptions.UnknownError
pushnotify.exceptions.UnrecognizedResponseError
Returns:
A boolean containing True if the user's API key is valid,
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 |