Skip to content

Commit

Permalink
Update api methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ripreal committed Nov 26, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 869aa21 commit 632faf5
Showing 9 changed files with 951 additions and 13 deletions.
3 changes: 2 additions & 1 deletion examples/SendWhatsAppMessageAsync.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@ import whatsAppClient from '@green-api/whatsapp-api-client'
// Send WhatsApp message
(async () => {
const restAPI = whatsAppClient.restAPI(({
credentialsPath: "examples\\credentials"
idInstance: 'kghk',
apiTokenInstance: 'rwererwq'
}))
try {
const response = await restAPI.message.sendMessage("79999999999@c.us", null,"hello world");
4 changes: 2 additions & 2 deletions examples/SendWhatsAppMessageCallback.js
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@ import whatsAppClient from '@green-api/whatsapp-api-client'

// Send WhatsApp message using callbacks
const restAPI = whatsAppClient.restAPI(({
idInstance: process.env.ID_INSTANCE,
apiTokenInstance: process.env.API_TOKEN_INSTANCE
idInstance: 'kghk',
apiTokenInstance: 'rwererwq'
}))
restAPI.message.sendMessage(null, 79999999999, "hello world")
.then((data) => {
132 changes: 132 additions & 0 deletions examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "examples",
"version": "1.0.0",
"description": "",
"main": "ReceiveNotifications.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"@green-api/whatsapp-api-client": "^0.3.29"
}
}
Loading

0 comments on commit 632faf5

Please sign in to comment.