-
Notifications
You must be signed in to change notification settings - Fork 3
/
GithubEvents.php
101 lines (87 loc) · 2.1 KB
/
GithubEvents.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
require_once('Github.php');
class GithubEvents extends Github {
/**
* List public events
*/
public function all() {
return $this->request('/events');
}
/**
* List repository events
*
* @param string $username
* @param string $repository
*/
public function repositories($username, $repository) {
return $this->request('/repos/'.$username.'/'.$repository.'/events');
}
/**
* List issue events for a repository
*
* @param string $username
* @param string $repository
*/
public function repositoryIssues($username, $repository) {
return $this->request('/repos/'.$username.'/'.$repository.'/issues/events');
}
/**
* List public events for a network of repositories
*
* @param string $username
* @param string $repository
*/
public function network($username, $repository) {
return $this->request('/networks/'.$username.'/'.$repository.'/events');
}
/**
* List public events for an organization
*
* @param string $organization
*/
public function organization($organization) {
return $this->request('/orgs/'.$organization.'/events');
}
/**
* List events that a user has received
*
* @param string $username
*/
public function user($username) {
return $this->request('/users/'.$username.'/received_events');
}
/**
* List public events that a user has received
*
* @param string $username
*/
public function userPublic($username) {
return $this->request('/users/'.$username.'/received_events/public');
}
/**
* List events performed by a user
*
* @param string $username
*/
public function userPerformed($username) {
return $this->request('/users/'.$username.'/events');
}
/**
* List public events performed by a user
*
* @param string $username
*/
public function userPerformedPublic($username) {
return $this->request('/users/'.$username.'/events/public');
}
/**
* List events for an organization
*
* @param string $username
* @param string $organization
*/
public function orgDashboard($username, $organization) {
return $this->request('/users/'.$username.'/events/orgs/'.$organization);
}
}
?>