Skip to content

Instantly share code, notes, and snippets.

@quartzjer
Created November 28, 2011 22:16
Show Gist options
  • Save quartzjer/1402338 to your computer and use it in GitHub Desktop.
Save quartzjer/1402338 to your computer and use it in GitHub Desktop.
lupdate.js
var req = require("request");
var async = require("async");
var cols = ["photos", "places", "contacts", "links"];
var c = {};
async.forEachSeries(cols, function(col, cb){
req.get({uri:"http://localhost:8042/Me/"+col+"/state", json:true}, function(e,r,js){
c[col] = js.count;
cb();
});
}, function(){
console.log(JSON.stringify(c, null, 4));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment