Package org.gitlab4j.api
Class ReleaseLinksApi
java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.ReleaseLinksApi
- All Implemented Interfaces:
Constants
This class provides an entry point to all the GitLab ReleaseLinks API calls.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gitlab4j.api.Constants
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.AutoDevopsDeployStrategy, Constants.BuildGitStrategy, Constants.CommitBuildState, Constants.ContributorOrderBy, 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.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.SquashOption, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
-
Field Summary
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
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
-
Method Summary
Modifier and TypeMethodDescriptioncreateLink
(Object projectIdOrPath, ReleaseLinkParams params) Create a Link.void
deleteLink
(Object projectIdOrPath, String tagName, Integer linkId) Delete a Link.Get a Link for the given tag name and link id.Get assets as Links from a Release.Get assets as Links from a Release.getLinksStream
(Object projectIdOrPath, String tagName) Get a Stream of assets as Links from a Release.getOptionalLink
(Object projectIdOrPath, String tagName, Integer linkId) Get an Optional instance holding a Link instance for the specific tag name and link id.updateLink
(Object projectIdOrPath, Integer linkId, 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, 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
-
Constructor Details
-
ReleaseLinksApi
-
-
Method Details
-
getLinks
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<Link> getLinks(Object projectIdOrPath, 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 Stream<Link> getLinksStream(Object projectIdOrPath, 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 Link getLink(Object projectIdOrPath, String tagName, 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 Optional<Link> getOptionalLink(Object projectIdOrPath, String tagName, 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
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 Link updateLink(Object projectIdOrPath, Integer linkId, 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(Object projectIdOrPath, String tagName, 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
-