@@ -18,7 +18,7 @@ pip install whatsapp-api-client-python
1818## Import
1919
2020```
21- from whatsapp_api_client_python import greenAPI
21+ from whatsapp_api_client_python import API
2222```
2323## Authorization
2424
@@ -29,13 +29,13 @@ To send a message or to exacute some other Green-API method, you have to have th
2929### How to initialize an object
3030
3131```
32- restApi = greenAPI.RestApi (ID_INSTANCE, API_TOKEN_INSTANCE)
32+ greenApi = API.GreenApi (ID_INSTANCE, API_TOKEN_INSTANCE)
3333```
3434
3535### Sending a text message to a WhatsApp number
3636
3737```
38- result = restApi .sending.sendMessage('79001234567@g.us', 'Message text')
38+ result = greenApi .sending.sendMessage('79001234567@g.us', 'Message text')
3939```
4040
4141Example url: [ sendTextMessage.py] ( https://github.com/green-api/whatsapp-api-client-python/blob/master/examples/sendTextMessage.py )
@@ -51,7 +51,7 @@ API_TOKEN_INSTANCE = environ['API_TOKEN_INSTANCE']
5151### Sending an image via URL
5252
5353```
54- result = restApi .sending.sendFileByUrl('120363025955348359@g.us',
54+ result = greenApi .sending.sendFileByUrl('120363025955348359@g.us',
5555 'https://www.google.ru/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png',
5656 'googlelogo_color_272x92dp.png', 'Google logo')
5757```
@@ -61,7 +61,7 @@ Example url: [sendPictureByLink.py](https://github.com/green-api/whatsapp-api-cl
6161### Sending an image by uploading from the disk
6262
6363```
64- result = restApi .sending.sendFileByUpload('120363025955348359@g.us',
64+ result = greenApi .sending.sendFileByUpload('120363025955348359@g.us',
6565 'C:\Games\PicFromDisk.png',
6666 'PicFromDisk.png', 'Picture from disk')
6767```
@@ -74,11 +74,11 @@ Example url: [sendPictureByUpload.py](https://github.com/green-api/whatsapp-api-
7474chatIds = [
7575 "79001234567@c.us"
7676]
77- resultCreate = restApi .groups.createGroup('GroupName',
77+ resultCreate = greenApi .groups.createGroup('GroupName',
7878 chatIds)
7979
8080if resultCreate.code == 200:
81- resultSend = restApi .sending.sendMessage(resultCreate.data['chatId'],
81+ resultSend = greenApi .sending.sendMessage(resultCreate.data['chatId'],
8282 'Message text')
8383```
8484
@@ -90,7 +90,7 @@ Example url: [createGroupAndSendMessage.py](https://github.com/green-api/whatsap
9090### Receiving incoming webhooks
9191
9292```
93- resultReceive = restApi .receiving.receiveNotification()
93+ resultReceive = greenApi .receiving.receiveNotification()
9494```
9595
9696## Examples list
0 commit comments