aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.rst11
-rw-r--r--pushover.py10
2 files changed, 15 insertions, 6 deletions
diff --git a/README.rst b/README.rst
index 98aa1f4..24f7075 100644
--- a/README.rst
+++ b/README.rst
@@ -85,7 +85,16 @@ You can have additional sections and specify a device as well:
``python-pushover`` will attempt to read the configuration from
``~/.pushoverrc`` by default. The section to read can be specified by using the
-``profile`` argument.
+``profile`` argument. With the configuration file above, you can send a message
+by simply doing:
+
+.. code-block:: python
+
+ from pushover import Client
+
+ client = Client().send_message("Hello!", title="Hello")
+
+or ``pushover --title "Hello" "Hello!"`` from the command line.
API
---
diff --git a/pushover.py b/pushover.py
index 9782d7c..9946eba 100644
--- a/pushover.py
+++ b/pushover.py
@@ -49,8 +49,8 @@ class InitError(Exception):
"""
def __str__(self):
- return "No api_token provided. Init the pushover module by\
- calling the init function"
+ return ("No api_token provided. Init the pushover module by "
+ "calling the init function")
class UserError(Exception):
@@ -59,7 +59,7 @@ class UserError(Exception):
"""
def __str__(self):
- return "No :attr:`user_key` attribute provided."
+ return "No user_key attribute provided."
class RequestError(Exception):
@@ -257,8 +257,8 @@ def main():
parser.add_argument("--priority", "-p", help="message priority")
parser.add_argument("--url", help="additional url")
parser.add_argument("--url-title", help="additional url title")
- parser.add_argument("-c", "--config", help="configuration file",
- default="~/.pushoverrc")
+ parser.add_argument("-c", "--config", help="configuration file\
+ (default: ~/.pushoverrc)", default="~/.pushoverrc")
parser.add_argument("--profile", help="profile to read in the\
configuration file (default: Default)",
default="Default")