Skip to content
Browse files

Merge pull request #12 from JangoSteve/orgs

Added user.orgs function to get list of user's organizations
  • Loading branch information...
2 parents 699b166 + 46593c5 commit 54b39c957675b35b91588790bf86c6a67bebd0fa @fitzgen committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 github.js
View
10 github.js
@@ -232,6 +232,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) {

0 comments on commit 54b39c9

Please sign in to comment.
Something went wrong with that request. Please try again.