1 | <?php |
||
12 | class Github extends BaseApi implements Api |
||
13 | { |
||
14 | /** |
||
15 | * lists your's github repos. |
||
16 | * |
||
17 | * @param string $language |
||
18 | * @param bool $private |
||
19 | * @param string $organization |
||
20 | * @param string $type |
||
21 | * @param bool $imported |
||
22 | * |
||
23 | * @return array |
||
24 | */ |
||
25 | 1 | public function repos($language = null, $private = null, $organization = null, $type = null, $imported = null) |
|
26 | { |
||
27 | 1 | return $this->request(sprintf('github?lang=%s&private=%b&org_name=%s&org_type=%s&page=%d&only_imported=%b', |
|
28 | 1 | $language, $private, $organization, $type, 1, $imported |
|
29 | )); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * re-load github data. |
||
34 | * |
||
35 | * @return array |
||
36 | */ |
||
37 | 1 | public function sync() |
|
41 | |||
42 | /** |
||
43 | * shows the detailed information for the repository. |
||
44 | * |
||
45 | * @param string $repository |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | 1 | public function show($repository) |
|
53 | |||
54 | /** |
||
55 | * imports project file from github. |
||
56 | * |
||
57 | * @param string $repository |
||
58 | * @param string $branch |
||
59 | * @param string $file |
||
60 | * |
||
61 | * @return array |
||
62 | */ |
||
63 | 1 | public function import($repository, $branch = null, $file = null) |
|
67 | |||
68 | /** |
||
69 | * remove imported project. |
||
70 | * |
||
71 | * @param string $repository |
||
72 | * @param string $branch |
||
73 | * @param string $file |
||
74 | * |
||
75 | * @return array |
||
76 | */ |
||
77 | 1 | public function delete($repository, $branch = null, $file = null) |
|
81 | |||
82 | /** |
||
83 | * GitHub Hook. |
||
84 | * |
||
85 | * @param string $project |
||
86 | * |
||
87 | * @return array |
||
88 | */ |
||
89 | 1 | public function hook($project) |
|
93 | } |
||
94 |