class CommentsClient

Traits

Properties

protected $curl from CICommon
protected $api_url from CICommon

Methods

__construct(Curl $curl, string $api_url)

CICommon constructor.

from CICommon
mixed
list(string $gist_id)

List comments on a gist.

mixed
get(string $gist_id, int $comment_id)

Get a single comment.

mixed
create(string $gist_id, string $body, string $method = 'post')

Create a comment.

mixed
edit(string $gist_id, string $body)

Edit a comment.

mixed
delete(string $gist_id, int $comment_id)

Delete a comment.

Details

in CICommon at line 18
__construct(Curl $curl, string $api_url)

CICommon constructor.

Parameters

Curl $curl
string $api_url

at line 22
mixed list(string $gist_id)

List comments on a gist.

Parameters

string $gist_id

Return Value

mixed

Exceptions

Exception

See also

at line 34
mixed get(string $gist_id, int $comment_id)

Get a single comment.

Parameters

string $gist_id
int $comment_id

Return Value

mixed

Exceptions

Exception

at line 48
mixed create(string $gist_id, string $body, string $method = 'post')

Create a comment.

201

Parameters

string $gist_id
string $body
string $method

Return Value

mixed

Exceptions

Exception

at line 60
mixed edit(string $gist_id, string $body)

Edit a comment.

Parameters

string $gist_id
string $body

Return Value

mixed

Exceptions

Exception

at line 74
mixed delete(string $gist_id, int $comment_id)

Delete a comment.

204

Parameters

string $gist_id
int $comment_id

Return Value

mixed

Exceptions

Exception