Skip to content

Commit e9d2f29

Browse files
committed
Updated comments documentation
1 parent d51c9fe commit e9d2f29

File tree

1 file changed

+51
-4
lines changed

1 file changed

+51
-4
lines changed

doc/issue/comments.md

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,24 @@ Wraps [GitHub Issue Comments API](http://developer.github.com/v3/issues/comments
99
$comments = $client->api('issue')->comments()->all('KnpLabs', 'php-github-api', 4);
1010
```
1111

12-
List an issue comments by username, repo and issue number.
13-
Returns an array of issues.
12+
* `KnpLabs` : the owner of the repository
13+
* `php-github-api` : the name of the repository
14+
* `4` : the id of the issue
15+
* You can select another page of comments using one more parameter (default: 1)
16+
17+
Returns an array of comments.
18+
19+
20+
### Show an issue comment
21+
22+
```php
23+
$comment = $client->api('issue')->comments()->show('KnpLabs', 'php-github-api', 33793831);
24+
```
25+
26+
* `KnpLabs` : the owner of the repository
27+
* `php-github-api` : the name of the repository
28+
* `33793831` : the id of the comment
29+
1430

1531
### Add a comment on an issue
1632

@@ -23,5 +39,36 @@ Returns an array of issues.
2339
$client->api('issue')->comments()->create('KnpLabs', 'php-github-api', 4, array('body' => 'My new comment'));
2440
```
2541

26-
Add a comment to the issue by username, repo and issue number and array with comment data: `body`
27-
and optionally `title`.
42+
* `KnpLabs` : the owner of the repository
43+
* `php-github-api` : the name of the repository
44+
* `4` : the id of the issue
45+
* You can set a `body` and optionally a `title`
46+
47+
48+
### Update a comment on an issue
49+
50+
> **Note:**
51+
52+
> Requires [authentication](../security.md).
53+
54+
```php
55+
$client->api('issue')->comments()->create('KnpLabs', 'php-github-api', 33793831, array('body' => 'My updated comment'));
56+
```
57+
58+
* `KnpLabs` : the owner of the repository
59+
* `php-github-api` : the name of the repository
60+
* `33793831` : the id of the comment
61+
62+
### Remove a comment on an issue
63+
64+
> **Note:**
65+
66+
> Requires [authentication](../security.md).
67+
68+
```php
69+
$client->api('issue')->comments()->remove('KnpLabs', 'php-github-api', 33793831);
70+
```
71+
72+
* `KnpLabs` : the owner of the repository
73+
* `php-github-api` : the name of the repository
74+
* `33793831` : the id of the comment

0 commit comments

Comments
 (0)