We have detected an error in your notification set-up
(Event-ID dab39dc24f564ec7bd4628d1305fd03c).
Currently, we cannot inform you about inspection progress.
Please check that the user
557058:bca11929-8c2d-43f2-8a82-c5416880d395
still has access to your repository or
update the API account.
1 | <?php |
||
18 | class Teams extends Api |
||
19 | { |
||
20 | /** |
||
21 | * Get a list of teams to which the caller has access. |
||
22 | * |
||
23 | * @access public |
||
24 | * @param string $role Will only return teams on which the user has the specified role. |
||
25 | * @return MessageInterface |
||
26 | * |
||
27 | * @throws \InvalidArgumentException |
||
28 | */ |
||
29 | 8 | public function all($role) |
|
30 | { |
||
31 | 8 | if (!is_string($role)) { |
|
32 | 5 | throw new \InvalidArgumentException(sprintf('Expected $role of type string and got %s', gettype($role))); |
|
33 | } |
||
34 | |||
35 | 3 | if (!in_array(strtolower($role), array('member', 'contributor', 'admin'), true)) { |
|
36 | 2 | throw new \InvalidArgumentException(sprintf('Unknown role %s', $role)); |
|
37 | } |
||
38 | |||
39 | 1 | return $this->getClient()->setApiVersion('2.0')->get('teams', array('role' => $role)); |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * Get the public information associated with a team. |
||
44 | * |
||
45 | * @access public |
||
46 | * @param string $name The team's name. |
||
47 | * @return MessageInterface |
||
48 | */ |
||
49 | 1 | public function profile($name) |
|
55 | |||
56 | /** |
||
57 | * Get the team members. |
||
58 | * |
||
59 | * @access public |
||
60 | * @param string $name The team's name. |
||
61 | * @return MessageInterface |
||
62 | */ |
||
63 | 1 | public function members($name) |
|
69 | |||
70 | /** |
||
71 | * Get the team followers list. |
||
72 | * |
||
73 | * @access public |
||
74 | * @param string $name The team's name. |
||
75 | * @return MessageInterface |
||
76 | */ |
||
77 | 1 | public function followers($name) |
|
83 | |||
84 | /** |
||
85 | * Get a list of accounts the team is following. |
||
86 | * |
||
87 | * @access public |
||
88 | * @param string $name The team's name. |
||
89 | * @return MessageInterface |
||
90 | */ |
||
91 | 1 | public function following($name) |
|
97 | |||
98 | /** |
||
99 | * Get the team's repositories. |
||
100 | * |
||
101 | * @access public |
||
102 | * @param string $name The team's name. |
||
103 | * @return MessageInterface |
||
104 | */ |
||
105 | 1 | public function repositories($name) |
|
111 | } |
||
112 |