Home | Trees | Indices | Help |
|
---|
|
object --+ | Client
Client for sending push notificiations to Android devices with the Notify My Android application installed. Member Vars: apikeys: A list of strings, each containing a 48 character api key. developerkey: A string containing a 48 character developer key.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Initialize the Notify My Android client. Args: apikeys: A list of strings, each containing a valid api key. developerkey: A string containing a valid developer key.
|
Send a notification to each apikey in self.apikeys. Args: app: A string of up to 256 characters containing the name of the application sending the notification. event: A string of up to 1000 characters containing the event that is being notified (i.e. subject or brief description.) desc: A string of up to 10000 characters containing the notification text. 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.FormatError pushnotify.exceptions.ApiKeyError pushnotify.exceptions.RateLimitExceeded pushnotify.exceptions.ServerError pushnotify.exceptions.UnknownError pushnotify.exceptions.UnrecognizedResponseError |
Verify an API key. Args: apikey: A string of 48 characters containing an API key. Raises: pushnotify.exceptions.RateLimitExceeded pushnotify.exceptions.ServerError pushnotify.exceptions.UnknownError pushnotify.exceptions.UnrecognizedResponseError Returns: A boolean containing True if the API key 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 |