Skip to content

Commit

Permalink
Add poll support
Browse files Browse the repository at this point in the history
  • Loading branch information
tqc committed Mar 2, 2013
1 parent 7ac7a41 commit 283ef1f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/blitline.js
Expand Up @@ -82,4 +82,17 @@ module.exports = function() {

}

};
this.poll = function(jobId, callback) {
var request = http.get("http://api.blitline.com/poll?job_id="+jobId, function (res) {
var body = "";
res.on("data", function(data) {
body += data;
});
res.on("end", function() {
callback(JSON.parse(body));
});
});
};


};

0 comments on commit 283ef1f

Please sign in to comment.