-
Notifications
You must be signed in to change notification settings - Fork 3
/
GithubOrgs.php
51 lines (43 loc) · 1.11 KB
/
GithubOrgs.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
51
<?php
require_once('Github.php');
class GithubOrgs extends Github {
/**
* List all public organizations for a user.
*
* @param string $username
*/
public function listUserOrgs($username) {
return $this->request('/users/'.$username.'/orgs');
}
/**
* List public and private organizations for the authenticated user
*/
public function listOwnOrgs() {
return $this->request('/user/orgs');
}
/**
* Get single organization
*/
public function get($organization) {
return $this->request('/orgs/'.$organization);
}
/**
* Edit organization
*
* @param string $billing_email Default: false
* @param string $company Default: false
* @param string $email Default: false
* @param string $location Default: false
* @param string $name Default: false
*/
public function edit($organization, $billing_email = false, $company = false, $email = false, $location = false, $name = false) {
return $this->request('/orgs/'.$organization, 'PATCH', array(
'billing_email' => $billing_email,
'company' => $company,
'email' => $email,
'location' => $location,
'name' => $name,
));
}
}
?>