Skip to content
Browse files

updated docs so that ndoc generates API docs for the entire Client

  • Loading branch information...
1 parent ff58896 commit 71fa9b477835cf75e531dd23e36bba2ab410c8d2 @mikedeboer mikedeboer committed Apr 5, 2012
View
20 api/v3.0.0/events.js
@@ -19,7 +19,7 @@ var events = module.exports = {
};
(function() {
- /**
+ /** section: github
* events#get(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -59,7 +59,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromRepo(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -101,7 +101,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromRepoIssues(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -143,7 +143,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromRepoNetwork(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -185,7 +185,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromOrg(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -226,7 +226,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getReceived(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -267,7 +267,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getReceivedPublic(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -308,7 +308,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -349,7 +349,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromUserPublic(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -390,7 +390,7 @@ var events = module.exports = {
});
};
- /**
+ /** section: github
* events#getFromUserOrg(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
24 api/v3.0.0/gists.js
@@ -19,7 +19,7 @@ var gists = module.exports = {
};
(function() {
- /**
+ /** section: github
* gists#getAll(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -59,7 +59,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#getFromUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -100,7 +100,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#create(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -141,7 +141,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#edit(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -182,7 +182,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#public(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -221,7 +221,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#starred(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -260,7 +260,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#get(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -299,7 +299,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#star(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -338,7 +338,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#deleteStar(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -377,7 +377,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#checkStar(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -416,7 +416,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#fork(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -455,7 +455,7 @@ var gists = module.exports = {
});
};
- /**
+ /** section: github
* gists#delete(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
24 api/v3.0.0/gitdata.js
@@ -19,7 +19,7 @@ var gitdata = module.exports = {
};
(function() {
- /**
+ /** section: github
* gitdata#getBlob(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -62,7 +62,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#createBlob(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -104,7 +104,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#getCommit(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -145,7 +145,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#createCommit(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -190,7 +190,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#getReference(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -231,7 +231,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#getAllReferences(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -273,7 +273,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#createReference(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -315,7 +315,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#updateReference(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -357,7 +357,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#getTag(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -398,7 +398,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#createTag(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -445,7 +445,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#getTree(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -487,7 +487,7 @@ var gitdata = module.exports = {
});
};
- /**
+ /** section: github
* gitdata#createTree(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
44 api/v3.0.0/issues.js
@@ -19,7 +19,7 @@ var issues = module.exports = {
};
(function() {
- /**
+ /** section: github
* issues#getAll(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -65,7 +65,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#repoIssues(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -115,7 +115,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getRepoIssue(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -156,7 +156,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#create(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -201,7 +201,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#edit(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -247,7 +247,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getComments(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -290,7 +290,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -331,7 +331,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#createComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -373,7 +373,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#editComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -415,7 +415,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#deleteComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -456,7 +456,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getEvents(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -499,7 +499,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getRepoEvents(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -541,7 +541,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getEvent(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -582,7 +582,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getLabels(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -622,7 +622,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getLabel(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -663,7 +663,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#createLabel(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -705,7 +705,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#updateLabel(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -747,7 +747,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getAllMilestones(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -791,7 +791,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#getMilestone(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -832,7 +832,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#createMilestone(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -876,7 +876,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#updateMilestone(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -921,7 +921,7 @@ var issues = module.exports = {
});
};
- /**
+ /** section: github
* issues#deleteMilestone(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
46 api/v3.0.0/orgs.js
@@ -19,7 +19,7 @@ var orgs = module.exports = {
};
(function() {
- /**
+ /** section: github
* orgs#getFromUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -60,7 +60,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#get(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -101,7 +101,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#update(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -145,7 +145,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getMembers(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -186,7 +186,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getMember(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -226,7 +226,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#removeMember(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -266,7 +266,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getPublicMembers(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -305,7 +305,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getPublicMember(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -345,7 +345,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#publicizeMembership(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -385,7 +385,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#concealMembership(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -425,7 +425,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getTeams(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -464,7 +464,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getTeam(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -503,7 +503,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#createTeam(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -545,7 +545,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#updateTeam(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -586,7 +586,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#deleteTeam(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -625,7 +625,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getTeamMembers(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -666,7 +666,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getTeamMember(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -706,7 +706,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#addTeamMember(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -746,7 +746,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#deleteTeamMember(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -786,7 +786,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getTeamRepos(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -827,7 +827,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#getTeamRepo(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -868,7 +868,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#addTeamRepo(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -909,7 +909,7 @@ var orgs = module.exports = {
});
};
- /**
+ /** section: github
* orgs#deleteTeamRepo(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
30 api/v3.0.0/pullRequests.js
@@ -19,7 +19,7 @@ var pullRequests = module.exports = {
};
(function() {
- /**
+ /** section: github
* pullRequests#getAll(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -62,7 +62,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#get(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -103,7 +103,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#create(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -147,7 +147,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#createFromIssue(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -190,7 +190,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#update(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -234,7 +234,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#getCommits(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -277,7 +277,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#getFiles(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -320,7 +320,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#getMerged(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -363,7 +363,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#merge(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -405,7 +405,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#getComments(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -448,7 +448,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#getComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -489,7 +489,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#createComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -534,7 +534,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#createCommentReply(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -577,7 +577,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#updateComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -619,7 +619,7 @@ var pullRequests = module.exports = {
});
};
- /**
+ /** section: github
* pullRequests#deleteComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
94 api/v3.0.0/repos.js
@@ -19,7 +19,7 @@ var repos = module.exports = {
};
(function() {
- /**
+ /** section: github
* repos#getAll(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -60,7 +60,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getFromUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -102,7 +102,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getFromOrg(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -144,7 +144,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#create(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -189,7 +189,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#createFromOrg(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -236,7 +236,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#get(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -276,7 +276,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#update(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -323,7 +323,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getContributors(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -366,7 +366,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getLanguages(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -408,7 +408,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getTeams(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -450,7 +450,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getTags(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -492,7 +492,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getBranches(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -534,7 +534,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getCollaborators(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -576,7 +576,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getCollaborator(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -617,7 +617,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#addCollaborator(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -658,7 +658,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#removeCollaborator(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -699,7 +699,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getCommits(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -743,7 +743,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getCommit(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -784,7 +784,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getAllCommitComments(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -826,7 +826,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getCommitComments(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -869,7 +869,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#createCommitComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -915,7 +915,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getCommitComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -956,7 +956,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#updateCommitComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -998,7 +998,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#compareCommits(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1040,7 +1040,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#deleteCommitComment(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1081,7 +1081,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getDownloads(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1123,7 +1123,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getDownload(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1164,7 +1164,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#deleteDownload(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1205,7 +1205,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getForks(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1248,7 +1248,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#fork(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1289,7 +1289,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getKeys(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1331,7 +1331,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1372,7 +1372,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#createKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1414,7 +1414,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#updateKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1457,7 +1457,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#deleteKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1498,7 +1498,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getWatchers(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1540,7 +1540,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getWatched(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1580,7 +1580,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getWatchedFromUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1621,7 +1621,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getWatching(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1663,7 +1663,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#watch(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1703,7 +1703,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#unWatch(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1743,7 +1743,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getHooks(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1785,7 +1785,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#getHook(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1826,7 +1826,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#createHook(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1870,7 +1870,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#updateHook(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1917,7 +1917,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#testHook(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -1958,7 +1958,7 @@ var repos = module.exports = {
});
};
- /**
+ /** section: github
* repos#deleteHook(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
34 api/v3.0.0/user.js
@@ -19,7 +19,7 @@ var user = module.exports = {
};
(function() {
- /**
+ /** section: github
* user#getFrom(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -58,7 +58,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#get(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -97,7 +97,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#update(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -142,7 +142,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getEmails(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -182,7 +182,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#addEmails(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -221,7 +221,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#deleteEmails(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -260,7 +260,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getFollowers(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -301,7 +301,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getFollowingFromUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -342,7 +342,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getFollowing(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -382,7 +382,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getFollowUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -423,7 +423,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#followUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -462,7 +462,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#unFollowUser(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -501,7 +501,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getKeys(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -541,7 +541,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#getKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -580,7 +580,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#createKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -620,7 +620,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#updateKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
@@ -661,7 +661,7 @@ var user = module.exports = {
});
};
- /**
+ /** section: github
* user#deleteKey(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
View
25 error.js
@@ -1,11 +1,13 @@
-/**
- * Copyright 2012 Cloud9 IDE, Inc.
+/** section: github
+ * class HttpError
+ *
+ * Copyright 2012 Cloud9 IDE, Inc.
*
- * This product includes software developed by
- * Cloud9 IDE, Inc (http://c9.io).
+ * This product includes software developed by
+ * Cloud9 IDE, Inc (http://c9.io).
*
- * Author: Mike de Boer <mike@c9.io>
- */
+ * Author: Mike de Boer <mike@c9.io>
+ **/
var Util = require("util");
@@ -18,11 +20,20 @@ exports.HttpError = function(message, code) {
Util.inherits(exports.HttpError, Error);
(function() {
-
+ /**
+ * HttpError#toString() -> String
+ *
+ * Returns the stringified version of the error (i.e. the message).
+ **/
this.toString = function() {
return this.message;
};
+ /**
+ * HttpError#toJSON() -> Object
+ *
+ * Returns a JSON object representation of the error.
+ **/
this.toJSON = function() {
return {
code: this.code,
View
28 generate.js
@@ -1,11 +1,13 @@
-/**
- * Copyright 2012 Cloud9 IDE, Inc.
+/** section: github, internal
+ * class ApiGenerator
+ *
+ * Copyright 2012 Cloud9 IDE, Inc.
*
- * This product includes software developed by
- * Cloud9 IDE, Inc (http://c9.io).
+ * This product includes software developed by
+ * Cloud9 IDE, Inc (http://c9.io).
*
- * Author: Mike de Boer <mike@c9.io>
- */
+ * Author: Mike de Boer <mike@c9.io>
+ **/
"use strict";
@@ -14,12 +16,12 @@ var Path = require("path");
var Util = require("./util");
-var IndexTpl = Fs.readFileSync(__dirname + "/templates/index.js", "utf8");
-var SectionTpl = Fs.readFileSync(__dirname + "/templates/section.js", "utf8");
-var HandlerTpl = Fs.readFileSync(__dirname + "/templates/handler.js", "utf8");
-var AfterRequestTpl = Fs.readFileSync(__dirname + "/templates/after_request.js", "utf8");
-var TestSectionTpl = Fs.readFileSync(__dirname + "/templates/test_section.js", "utf8");
-var TestHandlerTpl = Fs.readFileSync(__dirname + "/templates/test_handler.js", "utf8");
+var IndexTpl = Fs.readFileSync(__dirname + "/templates/index.js.tpl", "utf8");
+var SectionTpl = Fs.readFileSync(__dirname + "/templates/section.js.tpl", "utf8");
+var HandlerTpl = Fs.readFileSync(__dirname + "/templates/handler.js.tpl", "utf8");
+var AfterRequestTpl = Fs.readFileSync(__dirname + "/templates/after_request.js.tpl", "utf8");
+var TestSectionTpl = Fs.readFileSync(__dirname + "/templates/test_section.js.tpl", "utf8");
+var TestHandlerTpl = Fs.readFileSync(__dirname + "/templates/test_handler.js.tpl", "utf8");
var main = module.exports = function(versions) {
Util.log("Generating for versions", versions);
@@ -39,7 +41,7 @@ var main = module.exports = function(versions) {
function createComment(paramsStruct, section, funcName, indent) {
var params = Object.keys(paramsStruct);
var comment = [
- indent + "/**",
+ indent + "/** section: github",
indent + " * " + section + "#" + funcName + "(msg, callback) -> null",
indent + " * - msg (Object): Object that contains the parameters and their values to be sent to the server.",
indent + " * - callback (Function): function to call when the request is finished " +
View
231 index.js
@@ -1,13 +1,3 @@
-/**
- * Copyright 2012 Cloud9 IDE, Inc.
- *
- * This product includes software developed by
- * Cloud9 IDE, Inc (http://c9.io).
- *
- * Author: Mike de Boer <mike@c9.io>
- */
-
-
"use strict";
var error = require("./error");
@@ -16,9 +6,16 @@ var Util = require("./util");
/** section: github
* class Client
*
+ * Copyright 2012 Cloud9 IDE, Inc.
+ *
+ * This product includes software developed by
+ * Cloud9 IDE, Inc (http://c9.io).
+ *
+ * Author: Mike de Boer <mike@c9.io>
+ *
* [[Client]] can load any version of the [[github]] client API, with the
* requirement that a valid routes.json definition file is present in the
- * `api/[VERSION]/client` directory and that the routes found in this file are
+ * `api/[VERSION]` directory and that the routes found in this file are
* implemented as well.
*
* Upon instantiation of the [[Client]] class, the routes.json file is loaded
@@ -38,139 +35,141 @@ var Util = require("./util");
* First, we look at a listing of a sample routes.json routes definition file:
*
* {
- * "incoming": {
- * "room": {
- * "addmember": {
- * "url": "/api/room/addmember",
- * "method": "POST",
- * "params": {
- * "roomid": {
- * "type": "String",
- * "required": true,
- * "validation": "^[0-9a-z]{1}[0-9a-z-_\\|\\/]{1,61}$",
- * "invalidmsg": "Room name invalid. Please only use letters, numbers, underscores (_), dashes (-), pipes (|), slashes (/) and more than one character",
- * "description": "Name of the chat room"
- * },
- * "uid": {
- * "type": "Number",
- * "required": true,
- * "validation": "^[0-9]+$",
- * "invalidmsg": "Invalid User ID encountered",
- * "description": "A uid is a numeric User ID, with which the user can be retrieved from the database"
- * },
- * "workspaceId": {
- * "type": "String",
- * "required": true,
- * "validation": "",
- * "invalidmessage": "workspaceId is a required field",
- * "description": "Identifier of the active workspace. Example: 'user/bob/node_chat'"
- * }
- * }
+ * "defines": {
+ * "constants": {
+ * "name": "Github",
+ * "description": "A Node.JS module, which provides an object oriented wrapper for the GitHub v3 API.",
+ * "protocol": "https",
+ * "host": "api.github.com",
+ * "port": 443,
+ * "dateFormat": "YYYY-MM-DDTHH:MM:SSZ",
+ * "requestFormat": "json"
+ * },
+ * "response-headers": [
+ * "X-RateLimit-Limit",
+ * "X-RateLimit-Remaining",
+ * "Link"
+ * ],
+ * "params": {
+ * "files": {
+ * "type": "Json",
+ * "required": true,
+ * "validation": "",
+ * "invalidmsg": "",
+ * "description": "Files that make up this gist. The key of which should be a required string filename and the value another required hash with parameters: 'content'"
+ * },
+ * "user": {
+ * "type": "String",
+ * "required": true,
+ * "validation": "",
+ * "invalidmsg": "",
+ * "description": ""
+ * },
+ * "description": {
+ * "type": "String",
+ * "required": false,
+ * "validation": "",
+ * "invalidmsg": "",
+ * "description": ""
+ * },
+ * "page": {
+ * "type": "Number",
+ * "required": false,
+ * "validation": "^[0-9]+$",
+ * "invalidmsg": "",
+ * "description": "Page number of the results to fetch."
+ * },
+ * "per_page": {
+ * "type": "Number",
+ * "required": false,
+ * "validation": "^[0-9]+$",
+ * "invalidmsg": "",
+ * "description": "A custom page size up to 100. Default is 30."
* }
+ * }
* },
*
- * "outgoing": {
- * "room": {
- * "addmessage": {
- * "url": "/api/room/addmessage",
- * "params": {
- * "roomid": {
- * "type": "String",
- * "required": true,
- * "validation": "^[0-9a-z]{1}[0-9a-z-_\\|\\/]{1,61}$",
- * "invalidmsg": "Room name invalid. Please only use letters, numbers, underscores (_), dashes (-), pipes (|), slashes (/) and more than one character",
- * "description": "Name of the chat room"
- * },
- * "from": {
- * "type": "Number",
- * "required": true,
- * "validation": "^[0-9]+$",
- * "invalidmsg": "Invalid User ID encountered",
- * "description": "from is numeric User ID, with which the user can be retrieved from the database"
- * },
- * "content": {
- * "type": "String",
- * "required": true,
- * "validation": "",
- * "invalidmsg": "No or empty message, which is not allowed",
- * "description": "Content of the message sent"
- * }
- * }
+ * "gists": {
+ * "get-from-user": {
+ * "url": ":user/gists",
+ * "method": "GET",
+ * "params": {
+ * "$user": null,
+ * "$page": null,
+ * "$per_page": null
+ * }
+ * },
+ *
+ * "create": {
+ * "url": "/gists",
+ * "method": "POST",
+ * "params": {
+ * "$description": null,
+ * "public": {
+ * "type": "Boolean",
+ * "required": true,
+ * "validation": "",
+ * "invalidmsg": "",
+ * "description": ""
+ * },
+ * "$files": null
* }
* }
* }
- * }
+ * }
*
* You probably noticed that the definition is quite verbose and the decision
- * for its design was made to be verbose rather than allowing for variables and
- * reuse, as is possible with Javascript, but not with JSON definitions.
+ * for its design was made to be verbose whilst still allowing for basic variable
+ * definitions and substitions for request parameters.
*
- * There are two sections; 'incoming' and 'outgoing'.
- * NOTE: if it is deemed more practical or common sense, the terms 'incoming' and
- * 'outgoing' may be swapped. This is up for discussion.
+ * There are two sections; 'defines' and 'gists' in this example.
*
- * The `incoming` section defines the endpoints for calls to the [[CollabServer]].
+ * The `defines` section contains a list of `constants` that will be used by the
+ * [[Client]] to make requests to the right URL that hosts the API.
+ * The `gists` section defines the endpoints for calls to the API server, for
+ * gists specifically in this example, but the other API sections are defined in
+ * the exact same way.
* These definitions are parsed and methods are created that the client can call
* to make an HTTP request to the server.
- * In this example, there is one endpoint defined: `incoming/room/addmember`.
- * This endpoint will be exposed as a member on the [[Client]] object and may
- * be invoked with
+ * there is one endpoint defined: .
+ * In this example, the endpoint `gists/get-from-user` will be exposed as a member
+ * on the [[Client]] object and may be invoked with
+ *
+ * client.getFromUser({
+ * "user": "bob"
+ * }, function(err, ret) {
+ * // do something with the result here.
+ * });
*
- * client["incoming/room/addmember"]({
- * "roomid": "ry/node_chat",
- * "uid": "1234",
- * "workspaceId": "user/bob/node_chat"
+ * // or to fetch a specfic page:
+ * client.getFromUser({
+ * "user": "bob",
+ * "page": 2,
+ * "per_page": 100
* }, function(err, ret) {
* // do something with the result here.
* });
*
- * The callback is optional. In the case of an error or when the `ret` argument
- * holds a value, it will also be broadcasted to all the connected Socket.IO clients
- * that are connected to the workspace called `user/bob/node_chat`.
* All the parameters as specified in the Object that is passed to the function
* as first argument, will be validated according to the rules in the `params`
* block of the route definition.
- * Thus, in the case of the `roomid` parameter, according to the definition in
- * the `params` block, it is a required parameter (needs to hold a value) and its
- * value validated with the RegExp `^[0-9a-z]{1}[0-9a-z-_\|\/]{1,61}$`. In other
+ * Thus, in the case of the `user` parameter, according to the definition in
+ * the `params` block, it's a variable that first needs to be looked up in the
+ * `params` block of the `defines` section (at the top of the JSON file). Params
+ * that start with a `$` sign will be substituted with the param with the same
+ * name from the `defines/params` section.
+ * There we see that it is a required parameter (needs to hold a value). In other
* words, if the validation requirements are not met, an HTTP error is passed as
* first argument of the callback.
*
* Implementation Notes: the `method` is NOT case sensitive, whereas `url` is.
* The `url` parameter also supports denoting parameters inside it as follows:
*
- * "addmember": {
- * "url": "/api/room/:roomid/addmember",
- * "method": "POST",
+ * "get-from-user": {
+ * "url": ":user/gists",
+ * "method": "GET"
* ...
* }
- *
- * The `outgoing` section defines the endpoints for events that come in through
- * [Redis pubsub](http://redis.io/topics/pubsub).
- * Each time that the [[CollabServer]] makes a change in the Redis database, this
- * may trigger an event to be published to a Redis pubsub channel. [[Client]]
- * has subscribed to quite bunch of channels; room, workspace, project and user.
- * Whenever a message comes in from one of these channels, [[Client]] first
- * checks if an endpoint is registered for that outgoing message.
- * In this example, there is one endpoint defined: `outgoing/room/addmessage`.
- * This is enpoint will be exposed as a member on the [[Client]] object and may
- * be invoked with
- *
- * client["outgoing/room/addmessage"]({
- * "roomid": "ry/node_chat",
- * "from": "1234",
- * "content": "my first message!"
- * });
- *
- * This means that when a message from Redis pubsub channel `room/addmessage`
- * arrives, this method is invoked with the JSON passed directly as first argument.
- * Important to point out here is that this message is only broadcasted from the
- * server when a message was added to a room object in the Redis database; everything
- * is persisted in the database, which allows both the server and client
- * to operate without keeping any state in memory.
- * The endpoint handler in this example then, upon invocation, retrieves all the
- * active workspaces that are connected with the room `ry/node_chat` and broadcasts
- * the message as-is to all Socket.IO clients that are connected to each workspace.
**/
var Client = module.exports = function(config) {
this.config = config;
View
0 templates/after_request.js → templates/after_request.js.tpl
File renamed without changes.
View
0 templates/handler.js → templates/handler.js.tpl
File renamed without changes.
View
0 templates/index.js → templates/index.js.tpl
File renamed without changes.
View
0 templates/section.js → templates/section.js.tpl
File renamed without changes.
View
0 templates/test_handler.js → templates/test_handler.js.tpl
File renamed without changes.
View
0 templates/test_section.js → templates/test_section.js.tpl
File renamed without changes.
View
16 test/example.js
@@ -1,11 +1,15 @@
-/**
- * Copyright 2012 Cloud9 IDE, Inc.
+/** section: github, internal
+ * Example
+ *
+ * Github API usage example.
+ *
+ * Copyright 2012 Cloud9 IDE, Inc.
*
- * This product includes software developed by
- * Cloud9 IDE, Inc (http://c9.io).
+ * This product includes software developed by
+ * Cloud9 IDE, Inc (http://c9.io).
*
- * Author: Mike de Boer <mike@c9.io>
- */
+ * Author: Mike de Boer <mike@c9.io>
+ **/
"use strict";
View
16 test/oauth.js
@@ -1,11 +1,15 @@
-/**
- * Copyright 2012 Cloud9 IDE, Inc.
+/** section: github, internal
+ * OAuth
+ *
+ * OAuth usage example.
+ *
+ * Copyright 2012 Cloud9 IDE, Inc.
*
- * This product includes software developed by
- * Cloud9 IDE, Inc (http://c9.io).
+ * This product includes software developed by
+ * Cloud9 IDE, Inc (http://c9.io).
*
- * Author: Mike de Boer <mike@c9.io>
- */
+ * Author: Mike de Boer <mike@c9.io>
+ **/
var http = require("http");
var Url = require("url");
View
118 util.js
@@ -1,14 +1,26 @@
-/**
- * Copyright 2012 Cloud9 IDE, Inc.
+/** section: github
+ * class Util
+ *
+ * Copyright 2012 Cloud9 IDE, Inc.
*
- * This product includes software developed by
- * Cloud9 IDE, Inc (http://c9.io).
+ * This product includes software developed by
+ * Cloud9 IDE, Inc (http://c9.io).
*
- * Author: Mike de Boer <mike@c9.io>
- */
+ * Author: Mike de Boer <mike@c9.io>
+ **/
var Util = require("util");
+/**
+ * Util#extend(dest, src, noOverwrite) -> Object
+ * - dest (Object): destination object
+ * - src (Object): source object
+ * - noOverwrite (Boolean): set to `true` to overwrite values in `src`
+ *
+ * Shallow copy of properties from the `src` object to the `dest` object. If the
+ * `noOverwrite` argument is set to to `true`, the value of a property in `src`
+ * will not be overwritten if it already exists.
+ **/
exports.extend = function(dest, src, noOverwrite) {
for (var prop in src) {
if (!noOverwrite || typeof dest[prop] == "undefined")
@@ -17,10 +29,30 @@ exports.extend = function(dest, src, noOverwrite) {
return dest;
};
+/**
+ * Util#escapeRegExp(str) -> String
+ * - str (String): string to escape
+ *
+ * Escapes characters inside a string that will an error when it is used as part
+ * of a regex upon instantiation like in `new RegExp("[0-9" + str + "]")`
+ **/
exports.escapeRegExp = function(str) {
return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
};