aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2018-05-13 11:46:53 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2018-05-13 11:46:53 -0400
commitdfc39d7f1c99b728119bab71402302c4836bbdec (patch)
treec241ecfcc9c19e744f7f2f86d286b301cf130f5c
parent8522972b34f23c59204e7bd4ab1531b34aa9d571 (diff)
downloadpython-pushover-dfc39d7f1c99b728119bab71402302c4836bbdec.tar.gz
Add documentation for attachments
-rw-r--r--README.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index fa2332e..7df7f6e 100644
--- a/README.rst
+++ b/README.rst
@@ -48,6 +48,14 @@ initialize the module at the same time:
client = Client("<user-key>", api_token="<api-token>")
client.send_message("Hello!", title="Hello")
+Attachments can be sent with the ``attachment`` parameter which takes as
+argument as file object:
+
+.. code-block:: python
+
+ with open('/path/to/my/image.png', 'rb') as image:
+ client.send_message('Message with image', attachment=image)
+
Command line
~~~~~~~~~~~~