walkie-talkie
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -35,3 +35,2 @@ var gulp = require('gulp'); | ||
spawn('npm', ['publish'], { stdio: 'inherit' }).on('close', done); | ||
spawn.on('exit', function(code) {}); | ||
}); | ||
@@ -38,0 +37,0 @@ |
@@ -220,4 +220,27 @@ var request = require("request"); | ||
} | ||
}, | ||
events: { | ||
create: function(data, cb) { | ||
var args = { | ||
"method": "POST", | ||
"url": gen_api_url("events"), | ||
"headers": { | ||
"Authorization": sign(), | ||
"Content-type": "application/json" | ||
}, | ||
"body": JSON.stringify(data) | ||
}; | ||
return request(args, function(e, r, body) { | ||
if(e) { | ||
console.dir('event create failed with error: ' + JSON.stringify(e)); | ||
cb(null, null, null); | ||
} else { | ||
cb(r.statusCode); | ||
} | ||
}); | ||
} | ||
} | ||
}; | ||
}; |
{ | ||
"name": "walkie-talkie", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "An Intercom.io interface for nodejs", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -27,3 +27,4 @@ # Walkie-Talkie | ||
// body is the response body as a JSON object | ||
console.log(code, body); | ||
console.log(code); | ||
console.log(body); | ||
}); | ||
@@ -58,4 +59,3 @@ | ||
- Impressions API | ||
- Events API | ||
- Impressions API | ||
@@ -62,0 +62,0 @@ |
@@ -22,6 +22,6 @@ var config = require('./config.json'); | ||
intercom.users.create({ | ||
"email" : "brandon@brandonb.io", | ||
"name" : "Test McTesterson", | ||
"created_at" : (new Date() / 1000), | ||
"last_seen_ip" : "1.2.3.4", | ||
"email" : "brandon@brandonb.io", | ||
"name" : "Test McTesterson", | ||
"created_at" : (new Date() / 1000), | ||
"last_seen_ip" : "1.2.3.4", | ||
"last_seen_user_agent" : "ie6" | ||
@@ -28,0 +28,0 @@ }, function(code, body) { |
19283
10
406