Created
July 20, 2011 16:26
-
-
Save siddhant3s/1095295 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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