Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "node-slack", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Send and receive Slack Webhooks easily!", | ||
@@ -5,0 +5,0 @@ "main": "slack.js", |
@@ -18,11 +18,7 @@ # node-slack | ||
Get your custom domain and token from Slack. | ||
Get your hook_url from the Slack Incoming Webhooks Integration page. | ||
Domain is the first part of your <domain>.slack.com. | ||
Token is provided on the integration setup page. | ||
``` | ||
var Slack = require('node-slack'); | ||
var slack = new Slack(domain,token); | ||
var slack = new Slack(hook_url,token); | ||
``` | ||
@@ -36,3 +32,3 @@ | ||
``` | ||
var slack = new Slack(domain,token,{proxy: http_proxy}); | ||
var slack = new Slack(hook_url,{proxy: http_proxy}); | ||
``` | ||
@@ -69,3 +65,3 @@ | ||
To respond to an [outgoing webhook from slack](https://slack.com/services/new/outgoing-webhook), pass the information from the webhook into slack.respond, | ||
along with a callback function responsible for returnign a response. | ||
along with a callback function responsible for returning a response. | ||
@@ -72,0 +68,0 @@ From inside an Express.js route, this is as easy as passing in req.body: |
@@ -6,5 +6,4 @@ "use strict"; | ||
function Slack(domain, token, http_proxy_options) { | ||
this.domain = domain; | ||
this.token = token; | ||
function Slack(hook_url, http_proxy_options) { | ||
this.hook_url = hook_url; | ||
this.http_proxy_options = http_proxy_options; | ||
@@ -20,3 +19,3 @@ } | ||
var command = 'https://' + this.domain + '.slack.com/services/hooks/incoming-webhook?token=' + this.token; | ||
var command = this.hook_url; | ||
var body = { | ||
@@ -23,0 +22,0 @@ channel: message.channel, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4092
58
84