Package org.gitlab4j.api
Class LicensesApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.LicensesApi
-
- All Implemented Interfaces:
Constants
public class LicensesApi extends AbstractApi
This class provides an entry point to all the GitLab API licenses calls.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
-
-
Field Summary
-
Fields inherited from interface org.gitlab4j.api.Constants
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
-
-
Constructor Summary
Constructors Constructor Description LicensesApi(GitLabApi gitLabApi)
-
Method Summary
Modifier and Type Method Description List<LicenseTemplate>
getAllLicenseTemplates()
Get all license templates.List<LicenseTemplate>
getPopularLicenseTemplates()
Get popular license templates.LicenseTemplate
getSingleLicenseTemplate(String key)
Get a single license template.-
Methods inherited from class org.gitlab4j.api.AbstractApi
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
-
-
-
-
Constructor Detail
-
LicensesApi
public LicensesApi(GitLabApi gitLabApi)
-
-
Method Detail
-
getAllLicenseTemplates
public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException
Get all license templates. GET /licenses- Returns:
- a list of LicenseTemplate instances
- Throws:
GitLabApiException
- if any exception occurs
-
getPopularLicenseTemplates
public List<LicenseTemplate> getPopularLicenseTemplates() throws GitLabApiException
Get popular license templates. GET /licenses- Returns:
- a list of LicenseTemplate instances
- Throws:
GitLabApiException
- if any exception occurs
-
getSingleLicenseTemplate
public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException
Get a single license template. GET /licenses- Parameters:
key
- The key of the license template- Returns:
- a LicenseTemplate instance
- Throws:
GitLabApiException
- if any exception occurs
-
-