File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1010 */
1111class Comments extends AbstractApi
1212{
13+ /**
14+ * Get all comments for a gist.
15+ *
16+ * @param string $gist
17+ *
18+ * @return array
19+ */
1320 public function all ($ gist )
1421 {
1522 return $ this ->get ('gists/ ' .rawurlencode ($ gist ).'/comments ' );
1623 }
1724
25+ /**
26+ * Get a comment of a gist.
27+ *
28+ * @param string $gist
29+ * @param int $comment
30+ *
31+ * @return array
32+ */
1833 public function show ($ gist , $ comment )
1934 {
2035 return $ this ->get ('gists/ ' .rawurlencode ($ gist ).'/comments/ ' .rawurlencode ($ comment ));
2136 }
2237
38+ /**
39+ * Create a comment for gist.
40+ *
41+ * @param string $gist
42+ * @param string $body
43+ *
44+ * @return array
45+ */
2346 public function create ($ gist , $ body )
2447 {
2548 return $ this ->post ('gists/ ' .rawurlencode ($ gist ).'/comments ' , array ('body ' => $ body ));
2649 }
2750
51+ /**
52+ * Create a comment for a gist.
53+ *
54+ * @param string $gist
55+ * @param int $comment_id
56+ * @param string $body
57+ *
58+ * @return array
59+ */
2860 public function update ($ gist , $ comment_id , $ body )
2961 {
3062 return $ this ->patch ('gists/ ' .rawurlencode ($ gist ).'/comments/ ' .rawurlencode ($ comment_id ), array ('body ' => $ body ));
3163 }
3264
65+ /**
66+ * Delete a comment for a gist.
67+ *
68+ * @param string $gist
69+ * @param int $comment
70+ *
71+ * @return array
72+ */
3373 public function remove ($ gist , $ comment )
3474 {
3575 return $ this ->delete ('gists/ ' .rawurlencode ($ gist ).'/comments/ ' .rawurlencode ($ comment ));
You can’t perform that action at this time.
0 commit comments