Skip to content

Commit 0e7c3ec

Browse files
committed
added User::organizations, to be able fetch user's organizations
1 parent a462c35 commit 0e7c3ec

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Github/Api/User.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ public function show($username)
5151
return $this->get('users/'.rawurlencode($username));
5252
}
5353

54+
/**
55+
* Get extended information about a user by its username
56+
* @link https://developer.github.com/v3/orgs/
57+
*
58+
* @param string $username the username to show
59+
* @return array information about organizations that user belongs to
60+
*/
61+
public function organizations($username)
62+
{
63+
return $this->get('users/'.rawurlencode($username).'/orgs');
64+
}
65+
5466
/**
5567
* Request the users that a specific user is following
5668
* @link http://developer.github.com/v3/users/followers/

0 commit comments

Comments
 (0)