minor changes

This commit is contained in:
coderaiser 2012-11-25 05:15:23 -05:00
parent 1e019376d2
commit 633f8535bc
3 changed files with 37 additions and 4 deletions

View file

@ -81,8 +81,8 @@
this.show = function(username, cb) {
var command = username ? "/users/"+username : "/user";
_request("GET", command, null, function(err, res) {
_request("GET", "/users/"+username, null, function(err, res) {
cb(err, res);
});
};
@ -113,6 +113,24 @@
cb(err, res);
});
};
// Follow user
// -------
this.follow = function(username, cb) {
_request("PUT", "/user/following/"+username, null, function(err, res) {
cb(err, res);
});
};
// Unfollow user
// -------
this.unfollow = function(username, cb) {
_request("DELETE", "/user/following/"+username, null, function(err, res) {
cb(err, res);
});
};
};
@ -419,6 +437,21 @@
});
};
// Create the gist
// --------
// {
// "description": "the description for this gist",
// "public": true,
// "files": {
// "file1.txt": {
// "content": "String file contents"
// }
// }
// }
this.create = function(options, cb){
_request("POST", "/gists", options, cb);
};
// Delete the gist
// --------