Skip to content

Commit 4a8717b

Browse files
authored
Update README.md
1 parent b57b573 commit 4a8717b

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ if create_group_response.code == 200:
109109
)
110110
```
111111

112+
### Sending a message with poll
113+
114+
Link to example: [sendPoll.py](
115+
https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sendPoll.py
116+
).
117+
118+
```
119+
response = greenAPI.sending.sendPoll(
120+
"11001234567@c.us",
121+
"Please choose the color:",
122+
[
123+
{"optionName": "green"},
124+
{"optionName": "red"},
125+
{"optionName": "blue"}
126+
]
127+
)
128+
129+
print(response.data)
130+
```
131+
112132
### Receive incoming messages by HTTP API
113133

114134
Link to example: [receiveNotification.py](
@@ -145,6 +165,7 @@ business logic of your system.
145165
| Example of sending a picture by URL | [sendPictureByLink.py](https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sendPictureByLink.py) |
146166
| Example of sending a picture by uploading from the disk | [sendPictureByUpload.py](https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sendPictureByUpload.py) |
147167
| Example of a group creation and sending a message to the group | [createGroupAndSendMessage.py](https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/createGroupAndSendMessage.py) |
168+
| Example of sending a message with a poll | [sendPoll.py](https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sendPoll.py) |
148169
| Example of incoming webhooks receiving | [receiveNotification.py](https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/receiveNotification.py) |
149170

150171
## The full list of the library methods
@@ -190,6 +211,8 @@ business logic of your system.
190211
| `sending.sendContact` | The method is for sending a message with a contact | [SendContact](https://green-api.com/en/docs/api/sending/SendContact/) |
191212
| `sending.sendLink` | The method is designed to send a message with a link that will add an image preview, title and description | [SendLink](https://green-api.com/en/docs/api/sending/SendLink/) |
192213
| `sending.forwardMessages` | The method is designed for forwarding messages to a personal or group chat | [ForwardMessages](https://green-api.com/en/docs/api/sending/ForwardMessages/) |
214+
| `sending.sendPoll` | The method is designed for sending messages with a poll to a personal or group chat | [SendPoll](https://green-api.com/en/docs/api/sending/SendPoll/)
215+
|
193216
| `serviceMethods.checkWhatsapp` | The method checks if there is a WhatsApp account on the phone number | [CheckWhatsapp](https://green-api.com/en/docs/api/service/CheckWhatsapp/) |
194217
| `serviceMethods.getAvatar` | The method returns the avatar of the correspondent or group chat | [GetAvatar](https://green-api.com/en/docs/api/service/GetAvatar/) |
195218
| `serviceMethods.getContacts` | The method is designed to get a list of contacts of the current account | [GetContacts](https://green-api.com/en/docs/api/service/GetContacts/) |

0 commit comments

Comments
 (0)