whatsapp-chapi
Advanced tools
Comparing version 1.0.2 to 1.0.3
const https = require('https'); | ||
class Chapi { | ||
hostname = "https://botqa.live"; | ||
hostname; | ||
instanceID; | ||
@@ -9,2 +9,3 @@ token; | ||
constructor(instanceID, token) { | ||
this.hostname = "http://194.34.245.24:3333" | ||
this.token = token; | ||
@@ -32,2 +33,8 @@ this.instanceID = instanceID; | ||
setWebhook(webhook) { | ||
return this._request('POST', `webhook/${this.instanceID}`, { | ||
webhook: webhook | ||
}); | ||
} | ||
getStatus() { | ||
@@ -59,3 +66,3 @@ return this._request('GET', `status/${this.instanceID}`); | ||
'port': 8000, | ||
'path': `/api/v1/${path}`, | ||
'path': `/api/v1/${path}?token=${token}`, | ||
'headers': { | ||
@@ -62,0 +69,0 @@ 'Content-Type': 'application/json' |
{ | ||
"name": "whatsapp-chapi", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "WhatsApp chat api", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# WhatsApp Node.JS Bot API | ||
Use this library to develop a bot for the WhatsApp platform. | ||
The library is available on **[GitHub](https://github.com/dwintechnology/whatsapp-chapi)** as well as a package on [npm](https://github.com/dwintechnology/whatsapp-chapi). | ||
The library is available on **[GitHub](https://github.com/dwintechnology/whatsapp-chapi)** as well as a package on [npm](https://www.npmjs.com/package/whatsapp-chapi). | ||
@@ -5,0 +5,0 @@ ## License |
8404
77