public class LicenseTemplatesApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
LicenseTemplatesApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
LicenseTemplate |
getLicenseTemplate(String key)
Get a single license template.
|
List<LicenseTemplate> |
getLicenseTemplates()
Get a List of all license templates.
|
Pager<LicenseTemplate> |
getLicenseTemplates(Boolean popular,
int itemsPerPage)
Get a Pager of license templates.
|
Pager<LicenseTemplate> |
getLicenseTemplates(int itemsPerPage)
Get a Pager of all license templates.
|
Stream<LicenseTemplate> |
getLicenseTemplatesStream()
Get a Stream of all license templates.
|
Optional<LicenseTemplate> |
getOptionalLicenseTemplate(String key)
Get a single license template as the value of an Optional.
|
List<LicenseTemplate> |
getPopularLicenseTemplates()
Get a List of popular license templates.
|
Stream<LicenseTemplate> |
getPopularLicenseTemplatesStream()
Get a Stream of popular license templates.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public LicenseTemplatesApi(GitLabApi gitLabApi)
public List<LicenseTemplate> getLicenseTemplates() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses
GitLabApiException
- if any exception occurspublic Stream<LicenseTemplate> getLicenseTemplatesStream() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses
GitLabApiException
- if any exception occurspublic Pager<LicenseTemplate> getLicenseTemplates(int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /templates/licenses
itemsPerPage
- the number of LicenseTemplate instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<LicenseTemplate> getPopularLicenseTemplates() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses?popular=true
GitLabApiException
- if any exception occurspublic Stream<LicenseTemplate> getPopularLicenseTemplatesStream() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses?popular=true
GitLabApiException
- if any exception occurspublic Pager<LicenseTemplate> getLicenseTemplates(Boolean popular, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /templates/licenses
popular
- if true, returns only popular licenses.itemsPerPage
- the number of LicenseTemplate instances that will be fetched per pageGitLabApiException
- if any exception occurspublic LicenseTemplate getLicenseTemplate(String key) throws GitLabApiException
GitLab Endpoint: GET /templates/licenses/:key
key
- The key of the license templateGitLabApiException
- if any exception occurspublic Optional<LicenseTemplate> getOptionalLicenseTemplate(String key)
GitLab Endpoint: GET /templates/licenses/:key
key
- The key of the license templateCopyright © 2019. All rights reserved.