mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
minor changes
This commit is contained in:
parent
1e019376d2
commit
633f8535bc
3 changed files with 37 additions and 4 deletions
|
|
@ -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
|
||||
// --------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue