Constants
public class LabelsApi extends AbstractApi
Constants.ActionType, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Modifier and Type | Method | Description |
---|---|---|
Label |
createLabel(Integer projectId,
String name,
String color) |
Create a label
|
Label |
createLabel(Integer projectId,
String name,
String color,
Integer priority) |
Create a label
|
Label |
createLabel(Integer projectId,
String name,
String color,
String description) |
Create a label
|
Label |
createLabel(Integer projectId,
String name,
String color,
String description,
Integer priority) |
Create a label
|
void |
deleteLabel(Integer projectId,
String name) |
Delete the specified label
|
List<Label> |
getLabels(Integer projectId) |
Get all labels of the specified project.
|
List<Label> |
getLabels(Integer projectId,
int page,
int perPage) |
Get all labels of the specified project to using the specified page and per page setting
|
Label |
subscribeLabel(Integer projectId,
Integer labelId) |
Subscribe a specified label
|
Label |
unsubscribeLabel(Integer projectId,
Integer labelId) |
Unsubscribe a specified label
|
Label |
updateLabel(Integer projectId,
String name,
String newName,
String color,
String description,
Integer priority) |
Update the specified label
|
Label |
updateLabelColor(Integer projectId,
String name,
String color,
String description,
Integer priority) |
Update the specified label
|
Label |
updateLabelName(Integer projectId,
String name,
String newName,
String description,
Integer priority) |
Update the specified label
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, getWithAccepts, handle, isApiVersion, post, post, post, post, put, put, putWithFormData, urlEncode, validate
public LabelsApi(GitLabApi gitLabApi)
public List<Label> getLabels(Integer projectId) throws GitLabApiException
projectId
- the project ID to get the labels forGitLabApiException
- if any exception occurspublic List<Label> getLabels(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get the labels forpage
- the page to getperPage
- the number of issues per pageGitLabApiException
- if any exception occurspublic Label createLabel(Integer projectId, String name, String color, String description) throws GitLabApiException
projectId
- the project ID to create a label forname
- the name for the labelcolor
- the color for the labeldescription
- the description for the labelGitLabApiException
- if any exception occurspublic Label createLabel(Integer projectId, String name, String color) throws GitLabApiException
projectId
- the project ID to create a label forname
- the name for the labelcolor
- the color for the labelGitLabApiException
- if any exception occurspublic Label createLabel(Integer projectId, String name, String color, Integer priority) throws GitLabApiException
projectId
- the project ID to create a label forname
- the name for the labelcolor
- the color for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurspublic Label createLabel(Integer projectId, String name, String color, String description, Integer priority) throws GitLabApiException
projectId
- the project ID to create a label forname
- the name for the labelcolor
- the color for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurspublic Label updateLabelName(Integer projectId, String name, String newName, String description, Integer priority) throws GitLabApiException
projectId
- the project ID to update a label forname
- the name for the labelnewName
- the new name for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurspublic Label updateLabelColor(Integer projectId, String name, String color, String description, Integer priority) throws GitLabApiException
projectId
- the project ID to update a label forname
- the name for the labelcolor
- the color for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurspublic Label updateLabel(Integer projectId, String name, String newName, String color, String description, Integer priority) throws GitLabApiException
projectId
- the project ID to update a label forname
- the name for the labelnewName
- the new name for the labelcolor
- the color for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurspublic void deleteLabel(Integer projectId, String name) throws GitLabApiException
projectId
- the project ID to delete a label forname
- the name for the labelGitLabApiException
- if any exception occurspublic Label subscribeLabel(Integer projectId, Integer labelId) throws GitLabApiException
projectId
- the project ID to subscribe a label forlabelId
- the lable IDGitLabApiException
- if any exception occurspublic Label unsubscribeLabel(Integer projectId, Integer labelId) throws GitLabApiException
projectId
- the project ID to unsubscribe a label forlabelId
- the lable IDGitLabApiException
- if any exception occursCopyright © 2018. All rights reserved.