Skip to content

Commit 9d02e05

Browse files
committed
Updated examples
1 parent 109adff commit 9d02e05

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sen
6666
response = greenAPI.sending.sendFileByUrl(
6767
"11001234567@c.us",
6868
"https://green-api.com/green-api-logo_2.png",
69-
"green-api-logo_2.png"
69+
"green-api-logo_2.png",
70+
"GREEN API logo"
7071
)
7172
7273
print(response.data)
@@ -80,7 +81,10 @@ https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sen
8081

8182
```
8283
response = greenAPI.sending.sendFileByUpload(
83-
"11001234567@c.us", "data/green-api-logo_2.png"
84+
"11001234567@c.us",
85+
"data/green-api-logo_2.png",
86+
"green-api-logo_2.png",
87+
"GREEN API logo"
8488
)
8589
8690
print(response.data)

README_RUS.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ print(response.data)
6161
response = greenAPI.sending.sendFileByUrl(
6262
"11001234567@c.us",
6363
"https://green-api.com/green-api-logo_2.png",
64-
"green-api-logo_2.png"
64+
"green-api-logo_2.png",
65+
"GREEN API logo"
6566
)
6667
6768
print(response.data)
@@ -73,7 +74,10 @@ print(response.data)
7374

7475
```
7576
response = greenAPI.sending.sendFileByUpload(
76-
"11001234567@c.us", "data/green-api-logo_2.png"
77+
"11001234567@c.us",
78+
"data/green-api-logo_2.png",
79+
"green-api-logo_2.png",
80+
"GREEN API logo"
7781
)
7882
7983
print(response.data)

examples/receiveNotification.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
from datetime import datetime
21
import json
3-
from whatsapp_api_client_python import API as API
2+
from datetime import datetime
3+
4+
from whatsapp_api_client_python import API
45

5-
ID_INSTANCE = '1101000001'
6-
API_TOKEN_INSTANCE = '3e03ea9ff3324e228ae3dfdf4d48e409bfa1b1ad0b0c46bf8c'
6+
greenAPI = API.GreenApi(
7+
"1101000001", "d75b3a66374942c5b3c019c698abc2067e151558acbd412345"
8+
)
79

8-
greenAPI = API.GreenApi(ID_INSTANCE, API_TOKEN_INSTANCE)
910

1011
def main():
1112
greenAPI.webhooks.startReceivingNotifications(onEvent)

examples/sendPictureByLink.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ def main():
99
response = greenAPI.sending.sendFileByUrl(
1010
"11001234567@c.us",
1111
"https://green-api.com/green-api-logo_2.png",
12-
"green-api-logo_2.png"
12+
"green-api-logo_2.png",
13+
"GREEN API logo"
1314
)
1415

1516
print(response.data)

examples/sendPictureByUpload.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
def main():
99
response = greenAPI.sending.sendFileByUpload(
10-
"11001234567@c.us", "data/green-api-logo_2.png"
10+
"11001234567@c.us",
11+
"data/green-api-logo_2.png",
12+
"green-api-logo_2.png",
13+
"GREEN API logo"
1114
)
1215

1316
print(response.data)

0 commit comments

Comments
 (0)