diff --git a/github.js b/github.js index 3fa3045..7da691e 100644 --- a/github.js +++ b/github.js @@ -215,6 +215,16 @@ return this; }; + // Get a list of organizations that this user belongs to. + // + // gh.user("fitzgen").organizations( function(data) { + // alert(data.organizations.length); + // }); + gh.user.prototype.orgs = function (callback, context) { + jsonp("user/show/" + this.username + "/organizations", callback, context); + return this + }; + // Get a list of this user's repositories, 30 per page // // gh.user("fitzgen").repos(function (data) {