Comments
Extends AbstractPackageGitHub API Pulls Comments class for the Joomla Framework.
| link | |
|---|---|
| since |
1.0 |
| package |
Joomla Framework |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry options = null, \Joomla\Http\Http client = null) :
__get
Magic method to lazily create API objects
__get( name) : \Joomla\Github\AbstractPackage
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- name
stringName of property to retrieve
Response
AbstractPackageGitHub API package object.
create
Create a comment.
create( user, repo, pullId, body, commitId, filePath, position) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- pullId
intThe pull request number.- body
stringThe comment body text.- commitId
stringThe SHA1 hash of the commit to comment on.- filePath
stringThe Relative path of the file to comment on.- position
stringThe line index in the diff to comment on.
Response
object
createReply
Method to create a comment in reply to another comment.
createReply( user, repo, pullId, body, inReplyTo) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- pullId
intThe pull request number.- body
stringThe comment body text.- inReplyTo
intThe id of the comment to reply to.
Response
object
delete
Delete a comment.
delete( user, repo, commentId) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- commentId
intThe id of the comment to delete.
Response
void
edit
Edit a comment.
edit( user, repo, commentId, body) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- commentId
intThe id of the comment to update.- body
stringThe new body text for the comment.
Response
object
fetchUrl
Method to build and return a full request URL for the request. This method will add appropriate pagination details if necessary and also prepend the API url to have a complete URL for the request.
fetchUrl( path, page, limit) : \Joomla\Uri\Uri
| since |
1.0 |
|---|
Arguments
- path
stringURL to inflect- page
intPage to request- limit
intNumber of results to return per page
Response
get
Get a single comment.
get( user, repo, commentId) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- commentId
intThe comment id to get.
Response
object
getList
List comments on a pull request.
getList( user, repo, pullId, page, limit) : mixed||string|int
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- pullId
intThe pull request number.- page
intThe page number from which to get items.- limit
intThe number of items on a page.
Response
array<string|int, mixed>
getListForRepo
List comments in a repository.
getListForRepo( user, repo, page, limit) : mixed||string|int
| since |
1.4.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- page
intThe page number from which to get items.- limit
intThe number of items on a page.
Response
array<string|int, mixed>
processResponse
Process the response and decode it.
processResponse(\Joomla\Http\Response response, expectedCode = 200) :
| since |
1.0 |
|---|---|
| throws |
Arguments
- response
ResponseThe response.- expectedCode
intThe expected "good" code.
Response
mixed
Properties
package
The package the object resides in
| since |
1.0 |
|---|
Type(s)
string
hookEvents
Array containing the allowed hook events
| since |
1.5.2 |
|---|---|
| link | |
| note |
From 1.4.0 to 1.5.1 this was named $events, it was renamed due to naming conflicts with package subclasses |
Type(s)
array<string|int, mixed>