From dfc39d7f1c99b728119bab71402302c4836bbdec Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 13 May 2018 11:46:53 -0400 Subject: Add documentation for attachments --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) 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("", 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 ~~~~~~~~~~~~ -- cgit v1.2.3-70-g09d2