class JGithubPackageIssuesComments extends JGithubPackage

GitHub API Comments class for the Joomla Platform.

The Issue Comments API supports listing, viewing, editing, and creating comments on issues and pull requests.

Methods

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

__get( string $name)

Magic method to lazily create API objects

array
getList( string $owner, string $repo, integer $issueId, integer $page, integer $limit)

Method to get the list of comments on an issue.

array
getRepositoryList( string $owner, string $repo, string $sort = 'created', string $direction = 'asc', JDate $since = null)

Method to get the list of comments in a repository.

mixed
get( string $owner, string $repo, integer $id)

Method to get a single comment.

object
edit( string $user, string $repo, integer $commentId, string $body)

Method to update a comment on an issue.

object
create( string $user, string $repo, integer $issueId, string $body)

Method to create a comment on an issue.

boolean
delete( string $user, string $repo, integer $commentId)

Method to delete a comment on an issue.

Details

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

Parameters

Registry $options GitHub options object.
JGithubHttp $client The HTTP client object.

JGithubPackage __get( string $name)

Magic method to lazily create API objects

Parameters

string $name Name of property to retrieve

Return Value

JGithubPackage GitHub API package object.

Exceptions

RuntimeException

array getList( string $owner, string $repo, integer $issueId, integer $page, integer $limit)

Method to get the list of comments on an issue.

Parameters

string $owner The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $issueId The issue number.
integer $page The page number from which to get items.
integer $limit The number of items on a page.

Return Value

array

Exceptions

DomainException

array getRepositoryList( string $owner, string $repo, string $sort = 'created', string $direction = 'asc', JDate $since = null)

Method to get the list of comments in a repository.

Parameters

string $owner The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $sort The sort field - created or updated.
string $direction The sort order- asc or desc. Ignored without sort parameter.
JDate $since A timestamp in ISO 8601 format.

Return Value

array

Exceptions

UnexpectedValueException
DomainException

mixed get( string $owner, string $repo, integer $id)

Method to get a single comment.

Parameters

string $owner The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $id The comment id.

Return Value

mixed

object edit( string $user, string $repo, integer $commentId, string $body)

Method to update a comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $commentId The id of the comment to update.
string $body The new body text for the comment.

Return Value

object

Exceptions

DomainException

object create( string $user, string $repo, integer $issueId, string $body)

Method to create a comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $issueId The issue number.
string $body The comment body text.

Return Value

object

Exceptions

DomainException

boolean delete( string $user, string $repo, integer $commentId)

Method to delete a comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $commentId The id of the comment to delete.

Return Value

boolean

Exceptions

DomainException