Skip to content

Instantly share code, notes, and snippets.

@siddhant3s
Created July 20, 2011 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siddhant3s/1095295 to your computer and use it in GitHub Desktop.
Save siddhant3s/1095295 to your computer and use it in GitHub Desktop.
"loadDocument": function (doc_id, handler ) {
/*
Calls handler with an object associated with requested document of the `doc_id`
The first argument of handler is error object or null depending on if error occured or not.(Like NodeJS)
Second argmuent is the object literal containing
.hash of the object is the MD5 hash of the data
.data of the object is the data itself
Signature of Handler:
handler = function (err, dataobject) {
if(err===null) {
console.log(dataobject.hash);
console.log(dataobject.data);
}
else{
console.log(err.status);
}
};
*/
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment