Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added several read-only, non-auth-required api calls for /orgs /users…

… and /repos
  • Loading branch information...
commit 8f85f587a94e1a249703789cea32dae00929545d 1 parent 2a1d8ff
J. Félix Ontañón authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 github.js
26 github.js
View
@@ -118,6 +118,32 @@ var GitHub = (function() {
return this.retrieveAll(api_call);
};
+ // /repos/:user/:repo/forks
+ GitHub.prototype.getReposForks = function (user, project) {
+ var api_call = '/repos/' + user + '/' + project + '/forks';
+ return this.retrieveAll(api_call);
+ };
+
+ // Orgs API http://developer.github.com/v3/orgs/
+ // /orgs/:org/members
+ GitHub.prototype.getOrgMembers = function (org) {
+ var api_call = '/orgs/' + org + '/members';
+ return this.retrieveAll(api_call);
+ };
+
+ // Users API http://developer.github.com/v3/users/
+ // /users/:user
+ GitHub.prototype.getUser = function (user) {
+ var api_call = '/users/' + user;
+ return this.retrieveAll(api_call);
+ };
+
+ // /users/:user/repos
+ GitHub.prototype.getUserRepos = function (user) {
+ var api_call = '/users/' + user + '/repos';
+ return this.retrieveAll(api_call);
+ };
+
return GitHub;
})();
Please sign in to comment.
Something went wrong with that request. Please try again.