Labels
Extends AbstractPackageGitHub API Milestones class for the Joomla Framework.
| documentation |
http://developer.github.com/v3/issues/labels/ |
|---|---|
| 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.
add
Add labels to an issue.
add( owner, repo, number, mixed||string|int labels) :
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- number
stringThe issue number.- labels
array<string|int, mixed>An array of labels to add.
Response
object
create
Create a label.
create( owner, repo, name, color) :
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- name
stringThe label name.- color
stringThe label color.
Response
object
delete
Delete a label.
delete( owner, repo, name) :
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- name
stringThe label name.
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 label.
get( user, repo, name) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- name
stringThe label name to get.
Response
object
getList
List all labels for this repository.
getList( owner, repo) : mixed||string|int
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.
Response
array<string|int, mixed>
getListByIssue
List labels on an issue.
getListByIssue( owner, repo, number) :
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- number
intThe issue number.
Response
object
getListByMilestone
Get labels for every issue in a milestone.
getListByMilestone( owner, repo, number) :
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- number
stringThe issue number.
Response
object
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
removeAllFromIssue
Remove all labels from an issue.
removeAllFromIssue( owner, repo, number) :
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- number
stringThe issue number.
Response
object
removeFromIssue
Remove a label from an issue.
removeFromIssue( owner, repo, number, name) :
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- number
stringThe issue number.- name
stringThe name of the label to remove.
Response
object
replace
Replace all labels for an issue.
replace( owner, repo, number, mixed||string|int labels) :
Sending an empty array ([]) will remove all Labels from the Issue.
| since |
1.0 |
|---|
Arguments
- owner
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- number
stringThe issue number.- labels
array<string|int, mixed>New labels
Response
object
update
Update a label.
update( user, repo, label, name, color) :
| since |
1.0 |
|---|
Arguments
- user
stringThe name of the owner of the GitHub repository.- repo
stringThe name of the GitHub repository.- label
stringThe label name.- name
stringThe new label name.- color
stringThe new label color.
Response
object
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>