Commits

Jeffrey Goettsch  committed 702f59e

Updated pydoc.

  • Participants
  • Parent commits 33e87d3

Comments (0)

Files changed (4)

File pushnotify/abstract.py

 
     Member Vars:
         developerkey: A string containing a valid developer key for the
-            given type_ of client.
+            client's application.
         application: A string containing the name of the application on
             behalf of whom the client will be sending messages.
         apikeys: A dictionary where the keys are strings containing
 
         Args:
             developerkey: A string containing a valid developer key for
-                the given type_ of client.
+                the client's application.
             application: A string containing the name of the application
                 on behalf of whom the client will be sending messages.
 
         """Add the given key to self.apikeys.
 
         Args:
-            apikey: A string containing a valid user's API key.
+            apikey: A string containing a valid user's API key for the
+                client's application.
             device_key: A string containing a valid device key to go
                 along with the API key. (default: '')
         """
         keys. Otherwise only delete the device key.
 
         Args:
-            apikey: A string containing a valid user's API key in
-                self.apikeys.
-            device_key: A string containing a valid device key in
-                self.apikeys[apikey]. (default: '')
+            apikey: A string containing a valid user's API key that is
+                in self.apikeys.
+            device_key: A string containing a valid device key that is
+                in self.apikeys[apikey]. (default: '')
 
         """
 
             del(self.apikeys[apikey])
 
     def notify(self, description, event, split=True, kwargs=None):
+        """Send a notification to each user/device combination in
+        self.apikeys.
+
+        Args:
+            description: A string containing the main notification text.
+                The maximum length varies by application. See each
+                client's documentation for details.
+            event: A string containing a subject or brief description of
+                the event. The maximum length varies by application. See
+                each client's documentation for details.
+            split: A boolean indicating whether to split long
+                descriptions among multiple notifications (True) or to
+                raise an exception if it is too long (False).
+                (default True)
+            kwargs: A dictionary for application specific options. See
+                each client's documentation for details.
+                (default: None)
+
+        Raises:
+            pushnotify.exceptions.ApiKeyError
+            pushnotify.exceptions.FormatError
+            pushnotify.exceptions.RateLimitExceeded
+            pushnotify.exceptions.ServerError
+            pushnotify.exceptions.UnknownError
+            pushnotify.exceptions.UnrecognizedResponseError
+
+        """
 
         raise NotImplementedError
 
         raise NotImplementedError
 
     def verify_device(self, apikey, device_key):
+        """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.
+
+        """
 
         raise NotImplementedError
 
     def verify_user(self, apikey):
+        """Verify a user's API key.
+
+        Args:
+            apikey: A string 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.
+
+        """
 
         raise NotImplementedError

File pushnotify/nma.py

 
     Member Vars:
         developerkey: A string containing a valid developer key for the
-            NMA client.
+            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
 
         Args:
             developerkey: A string containing a valid developer key for
-                the NMA client.
+                the NMA application.
             application: A string containing the name of the application
                 on behalf of whom the NMA client will be sending
                 messages.

File pushnotify/prowl.py

 
     Member Vars:
         developerkey: A string containing a valid provider key for the
-            given Prowl client.
+            Prowl application.
         application: A string containing the name of the application on
             behalf of whom the Prowl client will be sending messages.
         apikeys: A dictionary where the keys are strings containing
 
         Args:
             developerkey: A string containing a valid provider key for
-                the Prowl client.
+                the Prowl application.
             application: A string containing the name of the application
                 on behalf of whom the Prowl client will be sending
                 messages.

File pushnotify/pushover.py

     with the Pushover application installed.
 
     Member Vars:
-        developerkey: A string containing a valid provider key for the
-            given Pushover client.
+        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 API keys, and the values are lists of strings,
-            each containing a valid user device key.
+            valid user identifier, and the values are lists of strings,
+            each containing a valid device identifier.
 
     """
 
         """Initialize the Pushover client.
 
         Args:
-            developerkey: A string containing a valid provider key for
-                the Pushover client.
+            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.
+                messages. Not used by this client. (default: '')
 
         """
 
             raise exceptions.UnrecognizedResponseError(msg, self._last['code'])
 
     def notify(self, description, event, split=True, kwargs=None):
-        """Send a notification to each user's API key/device key
-        combintation in self.apikeys.
+        """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
             self._raise_exception()
 
     def verify_user(self, apikey):
-        """Verify a user token.
+        """Verify a user identifier.
 
         Args:
-            apikey: A string containing a user's token.
+            apikey: A string containing a user identifer.
 
         Returns:
             A boolean containing True if apikey is valid, and
         return self._last['status']
 
     def verify_device(self, apikey, device_key):
-        """Verify a device for a user.
+        """Verify a device identifier for the user given by apikey.
 
         Args:
-            apikey: A string containing a user's token.
-            device_key: A string containing a device name.
+            apikey: A string containing a user identifer.
+            device_key: A string containing a device identifier.
 
         Raises:
             pushnotify.exceptions.ApiKeyError