public class PackagesApi extends AbstractApi
This class implements the client side API for the GitLab Packages API. See Packages API at GitLab for more information.
NOTE: This API is not available in the Community edition of GitLab.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 |
---|
PackagesApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
void |
deletePackage(java.lang.Object projectIdOrPath,
java.lang.Long packageId)
Deletes a project package.
|
Package |
getPackage(java.lang.Object projectIdOrPath,
java.lang.Long packageId)
Get a single project package.
|
java.util.List<PackageFile> |
getPackageFiles(java.lang.Object projectIdOrPath,
java.lang.Long packageId)
Get a list of package files of a single package.
|
Pager<PackageFile> |
getPackageFiles(java.lang.Object projectIdOrPath,
java.lang.Long packageId,
int itemsPerPage)
Get a Pager of project package files.
|
java.util.List<PackageFile> |
getPackageFiles(java.lang.Object projectIdOrPath,
java.lang.Long packageId,
int page,
int perPage)
Get a list of package files of a single package for the specified page.
|
java.util.List<Package> |
getPackages(java.lang.Object projectIdOrPath)
Get a list of project packages.
|
Pager<Package> |
getPackages(java.lang.Object projectIdOrPath,
int itemsPerPage)
Get a Pager of project packages.
|
java.util.List<Package> |
getPackages(java.lang.Object projectIdOrPath,
int page,
int perPage)
Get a list of project packages for the specified page.
|
Pager<Package> |
getPackages(java.lang.Object projectIdOrPath,
PackageFilter filter,
int itemsPerPage)
Get a Pager of project packages.
|
java.util.stream.Stream<Package> |
getPackagesStream(java.lang.Object projectIdOrPath)
Get a Stream of project packages.
|
java.util.stream.Stream<PackageFile> |
getPackagesStream(java.lang.Object projectIdOrPath,
java.lang.Long packageId)
Get a Stream of project package files.
|
java.util.stream.Stream<Package> |
getPackagesStream(java.lang.Object projectIdOrPath,
PackageFilter filter)
Get a Stream of project packages.
|
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 PackagesApi(GitLabApi gitLabApi)
public java.util.List<Package> getPackages(java.lang.Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic java.util.List<Package> getPackages(java.lang.Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepage
- the page to getperPage
- the number of Package instances per pageGitLabApiException
- if any exception occurspublic Pager<Package> getPackages(java.lang.Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceitemsPerPage
- the number of Package instances per pageGitLabApiException
- if any exception occurspublic Pager<Package> getPackages(java.lang.Object projectIdOrPath, PackageFilter filter, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancefilter
- the PackageFilter instance holding the filter values for the queryitemsPerPage
- the number of Package instances per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Package> getPackagesStream(java.lang.Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic java.util.stream.Stream<Package> getPackagesStream(java.lang.Object projectIdOrPath, PackageFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancefilter
- the PackageFilter instance holding the filter values for the queryGitLabApiException
- if any exception occurspublic Package getPackage(java.lang.Object projectIdOrPath, java.lang.Long packageId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages/:package_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepackageId
- the ID of the package to getGitLabApiException
- if any exception occurspublic java.util.List<PackageFile> getPackageFiles(java.lang.Object projectIdOrPath, java.lang.Long packageId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepackageId
- the ID of the package to get the package files forGitLabApiException
- if any exception occurspublic java.util.List<PackageFile> getPackageFiles(java.lang.Object projectIdOrPath, java.lang.Long packageId, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepackageId
- the ID of the package to get the package files forpage
- the page to getperPage
- the number of PackageFile instances per pageGitLabApiException
- if any exception occurspublic Pager<PackageFile> getPackageFiles(java.lang.Object projectIdOrPath, java.lang.Long packageId, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepackageId
- the ID of the package to get the package files foritemsPerPage
- the number of PackageFile instances per pageGitLabApiException
- if any exception occurspublic java.util.stream.Stream<PackageFile> getPackagesStream(java.lang.Object projectIdOrPath, java.lang.Long packageId) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepackageId
- the ID of the package to get the package files forGitLabApiException
- if any exception occurspublic void deletePackage(java.lang.Object projectIdOrPath, java.lang.Long packageId) throws GitLabApiException
GitLab Endpoint: DELETE /projects/:id/packages/:package_id
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instancepackageId
- the ID of the package to deleteGitLabApiException
- if any exception occurs