public class LicenseTemplatesApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, Constants.DefaultBranchProtectionLevel, Constants.DeploymentOrderBy, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.EventScope, 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.PackageOrderBy, Constants.PackageStatus, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectAccessTokenScope, Constants.ProjectCreationLevel, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.SubgroupCreationLevel, 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(java.lang.String key)
Get a single license template.
|
java.util.List<LicenseTemplate> |
getLicenseTemplates()
Get a List of all license templates.
|
Pager<LicenseTemplate> |
getLicenseTemplates(java.lang.Boolean popular,
int itemsPerPage)
Get a Pager of license templates.
|
Pager<LicenseTemplate> |
getLicenseTemplates(int itemsPerPage)
Get a Pager of all license templates.
|
java.util.stream.Stream<LicenseTemplate> |
getLicenseTemplatesStream()
Get a Stream of all license templates.
|
java.util.Optional<LicenseTemplate> |
getOptionalLicenseTemplate(java.lang.String key)
Get a single license template as the value of an Optional.
|
java.util.List<LicenseTemplate> |
getPopularLicenseTemplates()
Get a List of popular license templates.
|
java.util.stream.Stream<LicenseTemplate> |
getPopularLicenseTemplatesStream()
Get a Stream of popular license templates.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, upload, urlEncode, validate
public LicenseTemplatesApi(GitLabApi gitLabApi)
public java.util.List<LicenseTemplate> getLicenseTemplates() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses
GitLabApiException
- if any exception occurspublic java.util.stream.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 java.util.List<LicenseTemplate> getPopularLicenseTemplates() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses?popular=true
GitLabApiException
- if any exception occurspublic java.util.stream.Stream<LicenseTemplate> getPopularLicenseTemplatesStream() throws GitLabApiException
GitLab Endpoint: GET /templates/licenses?popular=true
GitLabApiException
- if any exception occurspublic Pager<LicenseTemplate> getLicenseTemplates(java.lang.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(java.lang.String key) throws GitLabApiException
GitLab Endpoint: GET /templates/licenses/:key
key
- The key of the license templateGitLabApiException
- if any exception occurspublic java.util.Optional<LicenseTemplate> getOptionalLicenseTemplate(java.lang.String key)
GitLab Endpoint: GET /templates/licenses/:key
key
- The key of the license template