Skip to content

Commit 5ed46cc

Browse files
authored
Update User.php
1 parent c17e729 commit 5ed46cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/Github/Api/User.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ public function show($username)
5858
{
5959
return $this->get('/users/'.rawurlencode($username));
6060
}
61+
62+
/**
63+
* Get extended information about a user by its id.
64+
* Note: at time of writing this is an undocumented feature
65+
*
66+
* @link http://developer.github.com/v3/users/
67+
*
68+
* @param int $id the id of the user to show
69+
*
70+
* @return array information about the user
71+
*/
72+
public function showById($id)
73+
{
74+
return $this->get('/user/'.rawurlencode($id));
75+
}
6176

6277
/**
6378
* Get extended information about a user by its username.

0 commit comments

Comments
 (0)