hipchatter
Advanced tools
Comparing version 0.1.3 to 0.2.0
@@ -190,6 +190,6 @@ // Dependencies | ||
else if (typeof options != 'object' && typeof options == 'function') { | ||
options(new Error('Must supply an options object to the notify function containing at least the message and the room notification token. See https://www.hipchat.com/docs/apiv2/method/send_room_notification')); | ||
options(new Error('Must supply an options object to the notify function containing at least the message. See https://www.hipchat.com/docs/apiv2/method/send_room_notification')); | ||
} | ||
else if (!options.hasOwnProperty('message') || (!options.hasOwnProperty('token'))) { | ||
callback(new Error('Message and Room Notification token are required.')); | ||
else if (!options.hasOwnProperty('message') ) { | ||
callback(new Error('Message is required.')); | ||
} | ||
@@ -348,7 +348,7 @@ else this.request('post', 'room/'+room+'/notification', options, callback); | ||
needle.post(url, payload, {json: true}, requestCallback); | ||
needle.post(url, payload, {json: true, headers:{'Content-Type': 'application/json; charset=utf-8'}}, requestCallback); | ||
// PUT request | ||
} else if (type.toLowerCase() === 'put') { | ||
needle.put(this.url(path), payload, {json: true}, requestCallback); | ||
needle.put(this.url(path), payload, {json: true, headers:{'Content-Type': 'application/json; charset=utf-8'}}, requestCallback); | ||
@@ -371,2 +371,2 @@ // DELETE request | ||
module.exports = Hipchatter; | ||
module.exports = Hipchatter; |
{ | ||
"name": "hipchatter", | ||
"description": "Wrapper for the HipChat API (v2)", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"author": "Charlton Roberts <charltonroberts@gmail.com (http://charlton.io)", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -251,4 +251,4 @@ HipChatter | ||
event: 'room_message' | ||
}, function(err){ | ||
if (err == null) console.log('Successfully created webhook.'); | ||
}, function(err, webhook){ | ||
if (err == null) console.log('Successfully created webhook id:'+webhook.id+'.'); | ||
}); | ||
@@ -255,0 +255,0 @@ ```` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
80354
1276
0