1 | <?php |
||
13 | class Comments extends AbstractIssues |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * List comments on an issue |
||
18 | * |
||
19 | * @link https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue |
||
20 | * |
||
21 | * @param int $number |
||
22 | * |
||
23 | * @return array |
||
24 | */ |
||
25 | public function listIssueComments(int $number): array |
||
30 | |||
31 | /** |
||
32 | * List comments in a repository |
||
33 | * |
||
34 | * @link https://developer.github.com/v3/issues/comments/#list-comments-in-a-repository |
||
35 | * |
||
36 | * @param string $sort |
||
37 | * @param string $direction |
||
38 | * @param string $since |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function listRepositoryComments(string $sort = AbstractApi::SORT_CREATED, |
||
53 | |||
54 | /** |
||
55 | * Get a single comment |
||
56 | * |
||
57 | * @link https://developer.github.com/v3/issues/comments/#get-a-single-comment |
||
58 | * |
||
59 | * @param int $id |
||
60 | * |
||
61 | * @return array |
||
62 | */ |
||
63 | public function getComment(int $id): array |
||
68 | |||
69 | /** |
||
70 | * Create a comment |
||
71 | * |
||
72 | * @link https://developer.github.com/v3/issues/comments/#create-a-comment |
||
73 | * |
||
74 | * @param int $number |
||
75 | * @param string $body |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | public function createComment(int $number, string $body): array |
||
86 | |||
87 | /** |
||
88 | * Edit a comment |
||
89 | * |
||
90 | * @link https://developer.github.com/v3/issues/comments/#edit-a-comment |
||
91 | * |
||
92 | * @param int $id |
||
93 | * @param string $body |
||
94 | * |
||
95 | * @return array |
||
96 | */ |
||
97 | public function editComment(int $id, string $body): array |
||
104 | |||
105 | /** |
||
106 | * Delete a comment |
||
107 | * |
||
108 | * @link https://developer.github.com/v3/issues/comments/#delete-a-comment |
||
109 | * |
||
110 | * @param int $id |
||
111 | * |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function deleteComment(int $id): bool |
||
125 | } |