Skip to content

Commit dfc39d7

Browse files
committed
Add documentation for attachments
1 parent 8522972 commit dfc39d7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ initialize the module at the same time:
4848
client = Client("<user-key>", api_token="<api-token>")
4949
client.send_message("Hello!", title="Hello")
5050
51+
Attachments can be sent with the ``attachment`` parameter which takes as
52+
argument as file object:
53+
54+
.. code-block:: python
55+
56+
with open('/path/to/my/image.png', 'rb') as image:
57+
client.send_message('Message with image', attachment=image)
58+
5159
Command line
5260
~~~~~~~~~~~~
5361

0 commit comments

Comments
 (0)