slack-node
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
module.exports = require("./lib/slack.seed"); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var DEFAULT_MAX_ATTEMPTS, DEFAULT_TIMEOUT, Slack, request, | ||
@@ -12,5 +12,5 @@ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | ||
Slack = (function() { | ||
function Slack(token, domain) { | ||
this.token = token; | ||
this.domain = domain; | ||
function Slack(_at_token, _at_domain) { | ||
this.token = _at_token; | ||
this.domain = _at_domain; | ||
this.api = __bind(this.api, this); | ||
@@ -17,0 +17,0 @@ this.webhook = __bind(this.webhook, this); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var Slack, apiToken, domain, nock, should, url, webhookToken, webhookUri; | ||
@@ -83,3 +83,3 @@ | ||
}); | ||
return it("run with user.list", function(done) { | ||
it("run with user.list", function(done) { | ||
return slack.api("users.list", function(err, response) { | ||
@@ -90,2 +90,28 @@ response.should.be.ok.and.an.Object; | ||
}); | ||
return it("run with Attachments", function(done) { | ||
var payload; | ||
payload = { | ||
channel: "#general", | ||
username: "webhookbot", | ||
text: "This is posted to #general and comes from a bot named webhookbot.", | ||
icon_emoji: ":ghost:", | ||
attachments: [ | ||
{ | ||
"pretext": "pretext", | ||
"color": "#0000FF", | ||
"fields": [ | ||
{ | ||
"title": "title", | ||
"value": "foobar", | ||
"short": false | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
return slack.api('chat.postMessage', payload, function(err, response) { | ||
response.should.be.ok.and.an.Object; | ||
return done(); | ||
}); | ||
}); | ||
}); | ||
@@ -92,0 +118,0 @@ |
{ | ||
"name": "slack-node", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "slack for node verision, full support", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
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
27061
326