Package org.gitlab4j.api
Class ReleaseLinksApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.ReleaseLinksApi
-
- All Implemented Interfaces:
org.gitlab4j.models.Constants
public class ReleaseLinksApi extends AbstractApi
This class provides an entry point to all the GitLab ReleaseLinks API calls.- See Also:
- ReleaseLinks API at GitLab
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gitlab4j.models.Constants
org.gitlab4j.models.Constants.ActionType, org.gitlab4j.models.Constants.ApplicationScope, org.gitlab4j.models.Constants.ArchiveFormat, org.gitlab4j.models.Constants.AutoDevopsDeployStrategy, org.gitlab4j.models.Constants.BuildGitStrategy, org.gitlab4j.models.Constants.CommitBuildState, org.gitlab4j.models.Constants.ContributorOrderBy, org.gitlab4j.models.Constants.DefaultBranchProtectionLevel, org.gitlab4j.models.Constants.DeploymentOrderBy, org.gitlab4j.models.Constants.DeploymentStatus, org.gitlab4j.models.Constants.DeployTokenScope, org.gitlab4j.models.Constants.Encoding, org.gitlab4j.models.Constants.EpicOrderBy, org.gitlab4j.models.Constants.EventScope, org.gitlab4j.models.Constants.GroupOrderBy, org.gitlab4j.models.Constants.GroupSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.ImpersonationState, org.gitlab4j.models.Constants.IssueOrderBy, org.gitlab4j.models.Constants.IssueScope, org.gitlab4j.models.Constants.IssueState, org.gitlab4j.models.Constants.JobScope, org.gitlab4j.models.Constants.LineType, org.gitlab4j.models.Constants.MergeRequestOrderBy, org.gitlab4j.models.Constants.MergeRequestScope, org.gitlab4j.models.Constants.MergeRequestSearchIn, org.gitlab4j.models.Constants.MergeRequestState, org.gitlab4j.models.Constants.MilestoneState, org.gitlab4j.models.Constants.PackageOrderBy, org.gitlab4j.models.Constants.PackageStatus, org.gitlab4j.models.Constants.PipelineOrderBy, org.gitlab4j.models.Constants.PipelineScope, org.gitlab4j.models.Constants.PipelineSource, org.gitlab4j.models.Constants.ProjectAccessTokenScope, org.gitlab4j.models.Constants.ProjectCreationLevel, org.gitlab4j.models.Constants.ProjectOrderBy, org.gitlab4j.models.Constants.ProjectSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SortOrder, org.gitlab4j.models.Constants.SquashOption, org.gitlab4j.models.Constants.StateEvent, org.gitlab4j.models.Constants.SubgroupCreationLevel, org.gitlab4j.models.Constants.TagOrderBy, org.gitlab4j.models.Constants.TargetType, org.gitlab4j.models.Constants.TodoAction, org.gitlab4j.models.Constants.TodoState, org.gitlab4j.models.Constants.TodoType, org.gitlab4j.models.Constants.TokenType
-
-
Field Summary
-
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
-
-
Constructor Summary
Constructors Constructor Description ReleaseLinksApi(GitLabApi gitLabApi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.gitlab4j.api.models.Link
createLink(java.lang.Object projectIdOrPath, org.gitlab4j.api.models.ReleaseLinkParams params)
Create a Link.void
deleteLink(java.lang.Object projectIdOrPath, java.lang.String tagName, java.lang.Integer linkId)
Delete a Link.org.gitlab4j.api.models.Link
getLink(java.lang.Object projectIdOrPath, java.lang.String tagName, java.lang.Integer linkId)
Get a Link for the given tag name and link id.java.util.List<org.gitlab4j.api.models.Link>
getLinks(java.lang.Object projectIdOrPath, java.lang.String tagName)
Get assets as Links from a Release.Pager<org.gitlab4j.api.models.Link>
getLinks(java.lang.Object projectIdOrPath, java.lang.String tagName, int itemsPerPage)
Get assets as Links from a Release.java.util.stream.Stream<org.gitlab4j.api.models.Link>
getLinksStream(java.lang.Object projectIdOrPath, java.lang.String tagName)
Get a Stream of assets as Links from a Release.java.util.Optional<org.gitlab4j.api.models.Link>
getOptionalLink(java.lang.Object projectIdOrPath, java.lang.String tagName, java.lang.Integer linkId)
Get an Optional instance holding a Link instance for the specific tag name and link id.org.gitlab4j.api.models.Link
updateLink(java.lang.Object projectIdOrPath, java.lang.Integer linkId, org.gitlab4j.api.models.ReleaseLinkParams params)
Updates the attributes of a given Link.-
Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getNamespaceIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
-
-
-
Constructor Detail
-
ReleaseLinksApi
public ReleaseLinksApi(GitLabApi gitLabApi)
-
-
Method Detail
-
getLinks
public java.util.List<org.gitlab4j.api.models.Link> getLinks(java.lang.Object projectIdOrPath, java.lang.String tagName) throws GitLabApiException
Get assets as Links from a Release.GitLab Endpoint: GET /projects/:id/releases/:tagName/assets/links
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtagName
- the tag name that the release was created from- Returns:
- the list of assets for the specified release
- Throws:
GitLabApiException
- if any exception occurs
-
getLinks
public Pager<org.gitlab4j.api.models.Link> getLinks(java.lang.Object projectIdOrPath, java.lang.String tagName, int itemsPerPage) throws GitLabApiException
Get assets as Links from a Release.GitLab Endpoint: GET /projects/:id/releases/:tagName/assets/links
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtagName
- the tag name that the release was created fromitemsPerPage
- the number of Link instances that will be fetched per page- Returns:
- the Pager of Link instances for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs
-
getLinksStream
public java.util.stream.Stream<org.gitlab4j.api.models.Link> getLinksStream(java.lang.Object projectIdOrPath, java.lang.String tagName) throws GitLabApiException
Get a Stream of assets as Links from a Release.GitLab Endpoint: GET /projects/:id/releases/:tagName/assets/links
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtagName
- the tag name that the release was created from- Returns:
- a Stream of Link instances for the specified project ID
- Throws:
GitLabApiException
- if any exception occurs
-
getLink
public org.gitlab4j.api.models.Link getLink(java.lang.Object projectIdOrPath, java.lang.String tagName, java.lang.Integer linkId) throws GitLabApiException
Get a Link for the given tag name and link id.GitLab Endpoint: GET /projects/:id/releases/:tagName/assets/links/:linkId
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtagName
- the name of the tag to fetch the Link forlinkId
- the id of the Link to fetch for- Returns:
- a Link instance with info on the specified tag and id
- Throws:
GitLabApiException
- if any exception occurs
-
getOptionalLink
public java.util.Optional<org.gitlab4j.api.models.Link> getOptionalLink(java.lang.Object projectIdOrPath, java.lang.String tagName, java.lang.Integer linkId) throws GitLabApiException
Get an Optional instance holding a Link instance for the specific tag name and link id.GitLab Endpoint: GET /projects/:id/releases/:tagName/assets/links/:linkId
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathtagName
- the name of the tag to fetch the Link forlinkId
- the id of the Link to fetch for- Returns:
- an Optional instance with the specified Link as the value
- Throws:
GitLabApiException
- if any exception occurs
-
createLink
public org.gitlab4j.api.models.Link createLink(java.lang.Object projectIdOrPath, org.gitlab4j.api.models.ReleaseLinkParams params) throws GitLabApiException
Create a Link. You need push access to the repository to create a Link.GitLab Endpoint: POST /projects/:id/releases/:tagName/assets/links
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathparams
- a ReleaseLinksParams instance holding the parameters for the link- Returns:
- a Link instance containing the newly created Link info
- Throws:
GitLabApiException
- if any exception occurs
-
updateLink
public org.gitlab4j.api.models.Link updateLink(java.lang.Object projectIdOrPath, java.lang.Integer linkId, org.gitlab4j.api.models.ReleaseLinkParams params) throws GitLabApiException
Updates the attributes of a given Link.GitLab Endpoint: PUT /projects/:id/releases/:tagName/assets/links/:linkId
- Parameters:
projectIdOrPath
- id, path of the project, or a Project instance holding the project ID or pathlinkId
- the id of the Link to fetch forparams
- a ReleaseLinksParams instance holding the parameters for the Link- Returns:
- a Link instance containing info on the updated Link
- Throws:
GitLabApiException
- if any exception occurs
-
deleteLink
public void deleteLink(java.lang.Object projectIdOrPath, java.lang.String tagName, java.lang.Integer linkId) throws GitLabApiException
Delete a Link.GitLab Endpoint: DELETE /projects/:id/releases/:tagName/assets/links/:linkId
- Parameters:
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancetagName
- the tag name that the link was created fromlinkId
- the id of the Link to delete- Throws:
GitLabApiException
- if any exception occurs
-
-