-
Notifications
You must be signed in to change notification settings - Fork 3
/
GithubUsers.php
50 lines (43 loc) · 961 Bytes
/
GithubUsers.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
require_once('Github.php');
class GithubUsers extends Github {
/**
* Get a single user
*
* @param string $username
*/
public function get($username) {
return $this->request('/users/'.$username);
}
/**
* Get the current authenticated user
*
* @param string $username
*/
public function me() {
return $this->request('/user');
}
/**
* Update the authenticated user
*
* @param string $name
* @param string $email
* @param string $blog
* @param string $company
* @param string $location
* @param boolean $hireable
* @param string $bio
*/
public function edit($name = false, $email = false, $blog = false, $company = false, $location = false, $hireable = false, $bio = false) {
return $this->request('/user', 'PATCH', array(
'name' => $name,
'email' => $email,
'blog' => $blog,
'company' => $company,
'location' => $location,
'hireable' => $hireable,
'bio' => $bio,
));
}
}
?>