File tree 3 files changed +57
-1
lines changed 3 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 6
6
* [ Commits] ( commits.md )
7
7
* [ Enterprise] ( enterprise.md )
8
8
* [ Gists] ( gists.md )
9
+ * [ Comments] ( gists/comments.md )
9
10
* [ Issues] ( issues.md )
10
11
* [ Comments] ( issue/comments.md )
11
12
* [ Labels] ( issue/labels.md )
Original file line number Diff line number Diff line change 1
1
## Gists API
2
2
[ Back to the navigation] ( README.md )
3
3
4
- Creating, editing, deleting and listing gists. Wraps [ GitHub Gists API] ( http://developer.github.com/v3/gists/ ) .
4
+ Creating, editing, deleting and listing gists.
5
+ Wraps [ GitHub Gists API] ( http://developer.github.com/v3/gists/ ) .
6
+
7
+ Additional APIs:
8
+ * [ Comments] ( gists/comments.md )
5
9
6
10
#### List all public gists.
7
11
Original file line number Diff line number Diff line change
1
+ ## Gists / Comments API
2
+
3
+ [ Back to the "Gists API"] ( ../gists.md ) | [ Back to the navigation] ( ../README.md )
4
+
5
+ Wraps [ GitHub Issue Comments API] ( http://developer.github.com/v3/gists/comments/ ) .
6
+
7
+ ### List a gist comments
8
+
9
+ ``` php
10
+ // for gist https://gist.github.com/danvbe/4476697
11
+ $comments = $client->api('gist')->comments()->all('4476697');
12
+ ```
13
+
14
+ * ` 4476697 ` : the id of the gist
15
+
16
+ ### Show a gist comment
17
+
18
+ ``` php
19
+ $comment = $client->api('gist')->comments()->show('4476697', '779656');
20
+ ```
21
+
22
+ * ` 4476697 ` : the id of the gist
23
+ * ` 779656 ` : the id of the comment
24
+
25
+ ### Create a gist comment
26
+
27
+ ``` php
28
+ $client->api('gist')->comments()->create('4476697', 'Hello World');
29
+ ```
30
+
31
+ * ` 4476697 ` : the id of the gist
32
+ * ` Hello World ` : the body of the comment
33
+
34
+ ### Update a gist comment
35
+
36
+ ``` php
37
+ $client->api('gist')->comments()->create('4476697', '123456', 'Hello Dolly');
38
+ ```
39
+
40
+ * ` 4476697 ` : the id of the gist
41
+ * ` 123456 ` : the id of the comment
42
+ * ` Hello Dolly ` : the body of the updated comment
43
+
44
+ ### Remove a gist comment
45
+
46
+ ``` php
47
+ $client->api('gist')->comments()->remove('4476697', '123456');
48
+ ```
49
+
50
+ * ` 4476697 ` : the id of the gist
51
+ * ` 123456 ` : the id of the comment
You can’t perform that action at this time.
0 commit comments