Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pashutan Modaresi committed Jan 17, 2019
1 parent e8bc78d commit a6b2f5c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
'page': 'fbotics.md',
'methods': [
fbotics.Client.send_text_message,
fbotics.Client.send_message,
fbotics.Client.retrieve_supported_tags,
],
},
Expand Down
24 changes: 21 additions & 3 deletions fbotics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,28 @@ def send_message(
quick_replies: An array of objects the describe the quick reply buttons to send. A maximum of 11 quick replies are supported.
# Examples
Sending a Text Message
```python
client.send_text_message(recipient_id="2157136727638083", text="hello world!")
client.send_text_message(phone_number="+1 (555) 857-6309", text="hello world!")
client.send_text_message(user_ref="<UNIQUE_REF_PARAM>", text="hello world!")
client.send_text_message(recipient_id="2157136727638083", text="hello world!")
client.send_text_message(phone_number="+1 (555) 857-6309", text="hello world!")
client.send_text_message(user_ref="<UNIQUE_REF_PARAM>", text="hello world!")
```
Sending Quick Replies
```python
from fbotics.models.quick_reply import QuickReply
qr1 = QuickReply({"content_type": "text",
"title": "Yes",
"payload": "payload1",
"image_url": "http://i64.tinypic.com/1hothh.png"})
qr2 = QuickReply({"content_type": "text",
"title": "No",
"payload": "payload2",
"image_url": "http://i63.tinypic.com/2pqpbth.png"})
quick_replies = [qr1, qr2]
response = client.send_message(recipient_id=2157136727638083,
text="Text Message with Quick Replies",
quick_replies=quick_replies)
```
"""
message = Message({"text": text, "quick_replies": quick_replies})
Expand Down

0 comments on commit a6b2f5c

Please sign in to comment.