ellipsis-api
Advanced tools
Comparing version 0.3.0-0 to 0.3.0-1
22
index.js
@@ -223,2 +223,23 @@ const request = require('request'); | ||
disableListen(options) { | ||
return new Promise((resolve, reject) => { | ||
const mergedOptions = this.mergeOptions(options, resolve, reject); | ||
this.checkListeningOptionsIn(mergedOptions); | ||
const formData = { | ||
actionName: mergedOptions.actionName, | ||
medium: this.mediumFor(mergedOptions), | ||
channel: this.channelFor(mergedOptions), | ||
thread: mergedOptions.thread, | ||
userId: this.ellipsis.userInfo.ellipsisUserId, | ||
copilot: mergedOptions.copilot, | ||
token: this.token() | ||
}; | ||
request.post({ | ||
url: this.urlFor("v1/disable_message_listener"), | ||
form: formData, | ||
json: true | ||
}, (error, response, body) => this.handleResponse(mergedOptions, error, response, body)); | ||
}); | ||
} | ||
generateToken(options) { | ||
@@ -364,2 +385,3 @@ return new Promise((resolve, reject) => { | ||
this.listen = this.actions.listen.bind(this.actions); | ||
this.disableListen = this.actions.disableListen.bind(this.disableListen); | ||
this.generateToken = this.actions.generateToken.bind(this.actions); | ||
@@ -366,0 +388,0 @@ } |
{ | ||
"name": "ellipsis-api", | ||
"version": "0.3.0-0", | ||
"version": "0.3.0-1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
29127
722