Constants
public class ProjectApi extends AbstractApi implements Constants
Constants.ActionType, Constants.GroupOrderBy, Constants.ImpersonationState, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder, Constants.StateEvent, Constants.TargetType, Constants.TokenType
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor | Description |
---|---|
ProjectApi(GitLabApi gitLabApi) |
Modifier and Type | Method | Description |
---|---|---|
ProjectHook |
addHook(Integer projectId,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents) |
Adds a hook to project.
|
ProjectHook |
addHook(Integer projectId,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken) |
Adds a hook to project.
|
ProjectHook |
addHook(String projectName,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken) |
Adds a hook to project.
|
ProjectHook |
addHook(Project project,
String url,
boolean doPushEvents,
boolean doIssuesEvents,
boolean doMergeRequestsEvents) |
Adds a hook to project.
|
ProjectHook |
addHook(Project project,
String url,
ProjectHook enabledHooks,
boolean enableSslVerification,
String secretToken) |
Adds a hook to project.
|
Member |
addMember(Integer projectId,
Integer userId,
Integer accessLevel) |
Adds a user to a project team.
|
Member |
addMember(Integer projectId,
Integer userId,
Integer accessLevel,
Date expiresAt) |
Adds a user to a project team.
|
Member |
addMember(Integer projectId,
Integer userId,
AccessLevel accessLevel) |
Adds a user to a project team.
|
Member |
addMember(Integer projectId,
Integer userId,
AccessLevel accessLevel,
Date expiresAt) |
Adds a user to a project team.
|
Project |
createProject(Integer groupId,
String projectName) |
Create a new project in the specified group.
|
Project |
createProject(String projectName) |
Create a new project with the current user's namespace.
|
Project |
createProject(String name,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Boolean isPublic,
Integer visibilityLevel,
String importUrl) |
Deprecated.
As of release 4.2.0, replaced by
createProject(String, Integer, String, Boolean, Boolean,
Boolean, Boolean, Visibility, Integer, String) |
Project |
createProject(String name,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Visibility visibility,
Integer visibilityLevel,
Boolean printingMergeRequestLinkEnabled,
String importUrl) |
Creates a Project
|
Project |
createProject(String name,
Integer namespaceId,
String description,
Boolean issuesEnabled,
Boolean mergeRequestsEnabled,
Boolean wikiEnabled,
Boolean snippetsEnabled,
Visibility visibility,
Integer visibilityLevel,
String importUrl) |
Creates a Project
|
Project |
createProject(Project project) |
Creates new project owned by the current user.
|
Project |
createProject(Project project,
String importUrl) |
Creates new project owned by the current user.
|
Snippet |
createSnippet(Integer projectId,
String title,
String filename,
String description,
String code,
Visibility visibility) |
Creates a new project snippet.
|
void |
deleteHook(Integer projectId,
Integer hookId) |
Deletes a hook from the project.
|
void |
deleteHook(ProjectHook hook) |
Deletes a hook from the project.
|
void |
deleteIssue(Integer projectId,
Integer issueId) |
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.deleteIssue(Integer, Integer) |
void |
deleteProject(Integer projectId) |
Removes project with all resources(issues, merge requests etc).
|
void |
deleteProject(Project project) |
Removes project with all resources(issues, merge requests etc).
|
void |
deleteSnippet(Integer projectId,
Integer snippetId) |
|
Project |
forkProject(Integer id,
Integer namespaceId) |
Forks a project into the user namespace of the authenticated user or the one provided.
|
Project |
forkProject(Integer id,
String namespace) |
Forks a project into the user namespace of the authenticated user or the one provided.
|
Project |
forkProject(Project project,
Integer namespaceId) |
Forks a project into the user namespace of the authenticated user or the one provided.
|
Project |
forkProject(Project project,
String namespace) |
Forks a project into the user namespace of the authenticated user or the one provided.
|
List<Project> |
getAllProjects() |
Deprecated.
Will be removed, no longer supported by the GitLab API
|
ProjectHook |
getHook(Integer projectId,
Integer hookId) |
Get a specific hook for project.
|
List<ProjectHook> |
getHooks(Integer projectId) |
Get list of project hooks.
|
Pager<ProjectHook> |
getHooks(Integer projectId,
int itemsPerPage) |
Get Pager of project hooks.
|
List<ProjectHook> |
getHooks(Integer projectId,
int page,
int perPage) |
Get list of project hooks in the specified page range.
|
Issue |
getIssue(Integer projectId,
Integer issueId) |
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssue(Integer, Integer) |
List<Issue> |
getIssues(Integer projectId) |
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Integer) |
Pager<Issue> |
getIssues(Integer projectId,
int itemsPerPage) |
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Integer, int) |
List<Issue> |
getIssues(Integer projectId,
int page,
int perPage) |
Deprecated.
Will be removed in version 5.0, replaced by
IssuesApi.getIssues(Integer, int, int) |
Member |
getMember(Integer projectId,
Integer userId) |
Gets a project team member.
|
List<Project> |
getMemberProjects() |
Get a list of projects that the authenticated user is a member of.
|
Pager<Project> |
getMemberProjects(int itemsPerPage) |
Get a Pager of projects that the authenticated user is a member of.
|
List<Project> |
getMemberProjects(int page,
int perPage) |
Get a list of projects that the authenticated user is a member of in the specified page range.
|
List<Member> |
getMembers(Integer projectId) |
Get a list of project team members.
|
Pager<Member> |
getMembers(Integer projectId,
int itemsPerPage) |
Get a Pager of project team members.
|
List<Member> |
getMembers(Integer projectId,
int page,
int perPage) |
Get a list of project team members in the specified page range.
|
Optional<ProjectHook> |
getOptionalHook(Integer projectId,
Integer hookId) |
Get a specific hook for project as an Optional instance.
|
Optional<Member> |
getOptionalMember(Integer projectId,
Integer userId) |
Gets a project team member.
|
Optional<Project> |
getOptionalProject(Integer projectId) |
Get an Optional instance with the value for the specific project, which is owned by the authentication user.
|
Optional<Project> |
getOptionalProject(String namespace,
String project) |
Get an Optional instance with the value for the specific project, which is owned by the authentication user.
|
Optional<String> |
getOptionalRawSnippetContent(Integer projectId,
Integer snippetId) |
|
Optional<Snippet> |
getOptionalSnippet(Integer projectId,
Integer snippetId) |
Get a single of project snippet as an Optional instance.
|
List<Project> |
getOwnedProjects() |
Get a list of projects owned by the authenticated user.
|
Pager<Project> |
getOwnedProjects(int itemsPerPage) |
Get a Pager of projects owned by the authenticated user.
|
List<Project> |
getOwnedProjects(int page,
int perPage) |
Get a list of projects owned by the authenticated user in the specified page range.
|
Project |
getProject(Integer projectId) |
Get a specific project, which is owned by the authentication user.
|
Project |
getProject(String namespace,
String project) |
Get a specific project, which is owned by the authentication user.
|
List<Event> |
getProjectEvents(Integer projectId) |
Get the project events for specific project.
|
Pager<Event> |
getProjectEvents(Integer projectId,
int itemsPerPage) |
Get a Pager of project events for specific project.
|
List<Event> |
getProjectEvents(Integer projectId,
int page,
int perPage) |
Get the project events for specific project.
|
List<Project> |
getProjects() |
Get a list of projects accessible by the authenticated user.
|
Pager<Project> |
getProjects(int itemsPerPage) |
Get a Pager instance of projects accessible by the authenticated user.
|
List<Project> |
getProjects(int page,
int perPage) |
Get a list of projects accessible by the authenticated user and in the specified page range.
|
List<Project> |
getProjects(Boolean archived,
Visibility visibility,
String orderBy,
String sort,
String search,
Boolean simple,
Boolean owned,
Boolean membership,
Boolean starred,
Boolean statistics) |
Deprecated.
Will be removed in version 5.0, replaced by
getProjects(Boolean, Visibility,
Constants.ProjectOrderBy, Constants.SortOrder, String, Boolean, Boolean, Boolean, Boolean, Boolean) |
List<Project> |
getProjects(Boolean archived,
Visibility visibility,
Constants.ProjectOrderBy orderBy,
Constants.SortOrder sort,
String search,
Boolean simple,
Boolean owned,
Boolean membership,
Boolean starred,
Boolean statistics) |
Get a list of projects accessible by the authenticated user and matching the supplied filter parameters.
|
Pager<Project> |
getProjects(Boolean archived,
Visibility visibility,
Constants.ProjectOrderBy orderBy,
Constants.SortOrder sort,
String search,
Boolean simple,
Boolean owned,
Boolean membership,
Boolean starred,
Boolean statistics,
int itemsPerPage) |
Get a Pager of projects accessible by the authenticated user and matching the supplied filter parameters.
|
List<Project> |
getProjects(Boolean archived,
Visibility visibility,
Constants.ProjectOrderBy orderBy,
Constants.SortOrder sort,
String search,
Boolean simple,
Boolean owned,
Boolean membership,
Boolean starred,
Boolean statistics,
int page,
int perPage) |
Get a list of projects accessible by the authenticated user and matching the supplied filter parameters.
|
List<Project> |
getProjects(String search) |
Get a list of projects accessible by the authenticated user that match the provided search string.
|
Pager<Project> |
getProjects(String search,
int itemsPerPage) |
Get a Pager of projects accessible by the authenticated user that match the provided search string.
|
List<Project> |
getProjects(String search,
int page,
int perPage) |
Get a list of projects accessible by the authenticated user that match the provided search string.
|
List<ProjectUser> |
getProjectUsers(Integer projectId) |
Get a list of project users.
|
List<ProjectUser> |
getProjectUsers(Integer projectId,
String search) |
Get a list of project users matching the specified search string.
|
String |
getRawSnippetContent(Integer projectId,
Integer snippetId) |
|
Snippet |
getSnippet(Integer projectId,
Integer snippetId) |
Get a single of project snippet.
|
List<Snippet> |
getSnippets(Integer projectId) |
Get a list of project snippets.
|
Pager<Snippet> |
getSnippets(Integer projectId,
int itemsPerPage) |
Get a Pager of project's snippets.
|
List<Snippet> |
getSnippets(Integer projectId,
int page,
int perPage) |
Get a list of project snippets.
|
List<Project> |
getStarredProjects() |
Get a list of projects starred by the authenticated user.
|
Pager<Project> |
getStarredProjects(int itemsPerPage) |
Get a Pager of projects starred by the authenticated user.
|
List<Project> |
getStarredProjects(int page,
int perPage) |
Get a list of projects starred by the authenticated user in the specified page range.
|
ProjectHook |
modifyHook(ProjectHook hook) |
Modifies a hook for project.
|
void |
removeMember(Integer projectId,
Integer userId) |
Removes user from project team.
|
void |
shareProject(Integer projectId,
Integer groupId,
AccessLevel accessLevel,
Date expiresAt) |
Share a project with the specified group.
|
void |
unshareProject(Integer projectId,
Integer groupId) |
Unshare the project from the group.
|
Member |
updateMember(Integer projectId,
Integer userId,
Integer accessLevel) |
Updates a member of a project.
|
Member |
updateMember(Integer projectId,
Integer userId,
Integer accessLevel,
Date expiresAt) |
Updates a member of a project.
|
Member |
updateMember(Integer projectId,
Integer userId,
AccessLevel accessLevel) |
Updates a member of a project.
|
Member |
updateMember(Integer projectId,
Integer userId,
AccessLevel accessLevel,
Date expiresAt) |
Updates a member of a project.
|
Project |
updateProject(Project project) |
Updates a project.
|
Snippet |
updateSnippet(Integer projectId,
Integer snippetId,
String title,
String filename,
String description,
String code,
Visibility visibility) |
Updates an existing project snippet.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, getWithAccepts, handle, isApiVersion, post, post, post, post, put, put, putWithFormData, urlEncode, validate
public ProjectApi(GitLabApi gitLabApi)
public List<Project> getProjects() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<Project> getProjects(int page, int perPage) throws GitLabApiException
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(int itemsPerPage) throws GitLabApiException
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<Project> getProjects(Boolean archived, Visibility visibility, String orderBy, String sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics) throws GitLabApiException
getProjects(Boolean, Visibility,
Constants.ProjectOrderBy, Constants.SortOrder, String, Boolean, Boolean, Boolean, Boolean, Boolean)
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields, default is created_atsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statisticsGitLabApiException
- if any exception occurspublic List<Project> getProjects(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics) throws GitLabApiException
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or
LAST_ACTIVITY_AT fields, default is CREATED_ATsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statisticsGitLabApiException
- if any exception occurspublic List<Project> getProjects(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int page, int perPage) throws GitLabApiException
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or
LAST_ACTIVITY_AT fields, default is CREATED_ATsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statisticspage
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(Boolean archived, Visibility visibility, Constants.ProjectOrderBy orderBy, Constants.SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int itemsPerPage) throws GitLabApiException
archived
- limit by archived statusvisibility
- limit by visibility public, internal, or privateorderBy
- return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or
LAST_ACTIVITY_AT fields, default is CREATED_ATsort
- return projects sorted in asc or desc order. Default is descsearch
- return list of projects matching the search criteriasimple
- return only the ID, URL, name, and path of each projectowned
- limit by projects owned by the current usermembership
- limit by projects that the current user is a member ofstarred
- limit by projects starred by the current userstatistics
- include project statisticsitemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<Project> getProjects(String search) throws GitLabApiException
search
- the project name search criteriaGitLabApiException
- if any exception occurspublic List<Project> getProjects(String search, int page, int perPage) throws GitLabApiException
search
- the project name search criteriapage
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getProjects(String search, int itemsPerPage) throws GitLabApiException
search
- the project name search criteriaitemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<Project> getMemberProjects() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<Project> getMemberProjects(int page, int perPage) throws GitLabApiException
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getMemberProjects(int itemsPerPage) throws GitLabApiException
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<Project> getAllProjects() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<Project> getOwnedProjects() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<Project> getOwnedProjects(int page, int perPage) throws GitLabApiException
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getOwnedProjects(int itemsPerPage) throws GitLabApiException
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<Project> getStarredProjects() throws GitLabApiException
GitLabApiException
- if any exception occurspublic List<Project> getStarredProjects(int page, int perPage) throws GitLabApiException
page
- the page to getperPage
- the number of projects per pageGitLabApiException
- if any exception occurspublic Pager<Project> getStarredProjects(int itemsPerPage) throws GitLabApiException
itemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Project getProject(Integer projectId) throws GitLabApiException
projectId
- the ID of the project to getGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(Integer projectId)
projectId
- the ID of the project to getpublic Project getProject(String namespace, String project) throws GitLabApiException
namespace
- the name of the project namespace or groupproject
- the name of the project to getGitLabApiException
- if any exception occurspublic Optional<Project> getOptionalProject(String namespace, String project)
namespace
- the name of the project namespace or groupproject
- the name of the projectpublic Project createProject(Integer groupId, String projectName) throws GitLabApiException
groupId
- the group ID to create the project underprojectName
- the name of the project top createGitLabApiException
- if any exception occurspublic Project createProject(String projectName) throws GitLabApiException
projectName
- the name of the project top createGitLabApiException
- if any exception occurspublic Project createProject(Project project) throws GitLabApiException
project
- the Project instance with the configuration for the new projectGitLabApiException
- if any exception occurspublic Project createProject(Project project, String importUrl) throws GitLabApiException
project
- the Project instance with the configuration for the new projectimportUrl
- the URL to import the repository fromGitLabApiException
- if any exception occurspublic Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, String importUrl) throws GitLabApiException
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility of the project, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise nullGitLabApiException
- if any exception occurspublic Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Visibility visibility, Integer visibilityLevel, Boolean printingMergeRequestLinkEnabled, String importUrl) throws GitLabApiException
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultvisibility
- The visibility of the project, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultprintingMergeRequestLinkEnabled
- Show link to create/view merge request when pushing from the command lineimportUrl
- The Import URL for the project, otherwise nullGitLabApiException
- if any exception occurs@Deprecated public Project createProject(String name, Integer namespaceId, String description, Boolean issuesEnabled, Boolean mergeRequestsEnabled, Boolean wikiEnabled, Boolean snippetsEnabled, Boolean isPublic, Integer visibilityLevel, String importUrl) throws GitLabApiException
createProject(String, Integer, String, Boolean, Boolean,
Boolean, Boolean, Visibility, Integer, String)
name
- The name of the projectnamespaceId
- The Namespace for the new project, otherwise null indicates to use the GitLab default (user)description
- A description for the project, null otherwiseissuesEnabled
- Whether Issues should be enabled, otherwise null indicates to use GitLab defaultmergeRequestsEnabled
- Whether Merge Requests should be enabled, otherwise null indicates to use GitLab defaultwikiEnabled
- Whether a Wiki should be enabled, otherwise null indicates to use GitLab defaultsnippetsEnabled
- Whether Snippets should be enabled, otherwise null indicates to use GitLab defaultisPublic
- Whether the project is public or private, if true same as setting visibilityLevel = 20, otherwise null indicates to use GitLab defaultvisibilityLevel
- The visibility level of the project, otherwise null indicates to use GitLab defaultimportUrl
- The Import URL for the project, otherwise nullGitLabApiException
- if any exception occurspublic Project updateProject(Project project) throws GitLabApiException
project
- the Project instance with the configuration for the new projectGitLabApiException
- if any exception occurspublic void deleteProject(Integer projectId) throws GitLabApiException
projectId
- the project ID to removeGitLabApiException
- if any exception occurspublic void deleteProject(Project project) throws GitLabApiException
project
- the Project instance to removeGitLabApiException
- if any exception occurspublic Project forkProject(Integer id, String namespace) throws GitLabApiException
id
- the ID of the project to forknamespace
- path of the namespace that the project will be forked toGitLabApiException
- if any exception occurspublic Project forkProject(Project project, String namespace) throws GitLabApiException
project
- the project to forknamespace
- path of the namespace that the project will be forked toGitLabApiException
- if any exception occurspublic Project forkProject(Integer id, Integer namespaceId) throws GitLabApiException
id
- the ID of the project to forknamespaceId
- ID of the namespace that the project will be forked toGitLabApiException
- if any exception occurspublic Project forkProject(Project project, Integer namespaceId) throws GitLabApiException
project
- the project to forknamespaceId
- ID of the namespace that the project will be forked toGitLabApiException
- if any exception occurspublic List<Member> getMembers(Integer projectId) throws GitLabApiException
projectId
- the project ID to get team members forGitLabApiException
- if any exception occurspublic List<Member> getMembers(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get team members forpage
- the page to getperPage
- the number of Member instances per pageGitLabApiException
- if any exception occurspublic Pager<Member> getMembers(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId
- the project ID to get team members foritemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic Member getMember(Integer projectId, Integer userId) throws GitLabApiException
projectId
- the project ID to get team member foruserId
- the user ID of the memberGitLabApiException
- if any exception occurspublic Optional<Member> getOptionalMember(Integer projectId, Integer userId) throws GitLabApiException
projectId
- the project ID to get team member foruserId
- the user ID of the memberGitLabApiException
- if any exception occurspublic Member addMember(Integer projectId, Integer userId, Integer accessLevel) throws GitLabApiException
projectId
- the project ID to add the team member to, requireduserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, requiredGitLabApiException
- if any exception occurspublic Member addMember(Integer projectId, Integer userId, AccessLevel accessLevel) throws GitLabApiException
projectId
- the project ID to add the team member to, requireduserId
- the user ID of the member to add, requiredaccessLevel
- the access level for the new member, requiredGitLabApiException
- if any exception occurspublic Member addMember(Integer projectId, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
projectId
- the project ID to add the team member touserId
- the user ID of the member to addaccessLevel
- the access level for the new memberexpiresAt
- the date the membership in the group will expireGitLabApiException
- if any exception occurspublic Member addMember(Integer projectId, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException
projectId
- the project ID to add the team member touserId
- the user ID of the member to addaccessLevel
- the access level for the new memberexpiresAt
- the date the membership in the group will expireGitLabApiException
- if any exception occurspublic Member updateMember(Integer projectId, Integer userId, Integer accessLevel) throws GitLabApiException
projectId
- the project ID the member belongs to, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredGitLabApiException
- if any exception occurspublic Member updateMember(Integer projectId, Integer userId, AccessLevel accessLevel) throws GitLabApiException
projectId
- the project ID the member belongs to, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredGitLabApiException
- if any exception occurspublic Member updateMember(Integer projectId, Integer userId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
projectId
- the project ID the member belongs to, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredexpiresAt
- the date the membership in the group will expire, optionalGitLabApiException
- if any exception occurspublic Member updateMember(Integer projectId, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException
projectId
- the project ID the member belongs to, requireduserId
- the user ID of the member to update, requiredaccessLevel
- the new access level for the member, requiredexpiresAt
- the date the membership in the group will expire, optionalGitLabApiException
- if any exception occurspublic void removeMember(Integer projectId, Integer userId) throws GitLabApiException
projectId
- the project ID to remove the team member fromuserId
- the user ID of the member to removeGitLabApiException
- if any exception occurspublic List<ProjectUser> getProjectUsers(Integer projectId) throws GitLabApiException
projectId
- the project ID to get users forGitLabApiException
- if any exception occurspublic List<ProjectUser> getProjectUsers(Integer projectId, String search) throws GitLabApiException
projectId
- the project ID to get users forsearch
- the string to match specific usersGitLabApiException
- if any exception occurspublic List<Event> getProjectEvents(Integer projectId) throws GitLabApiException
projectId
- the project ID to get events forGitLabApiException
- if any exception occurspublic List<Event> getProjectEvents(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get events forpage
- the page to getperPage
- the number of Event instances per pageGitLabApiException
- if any exception occurspublic Pager<Event> getProjectEvents(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId
- the project ID to get events foritemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic List<ProjectHook> getHooks(Integer projectId) throws GitLabApiException
projectId
- the project ID to get project hooks forGitLabApiException
- if any exception occurspublic List<ProjectHook> getHooks(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get project hooks forpage
- the page to getperPage
- the number of ProjectHook instances per pageGitLabApiException
- if any exception occurspublic Pager<ProjectHook> getHooks(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId
- the project ID to get project hooks foritemsPerPage
- the number of Project instances that will be fetched per pageGitLabApiException
- if any exception occurspublic ProjectHook getHook(Integer projectId, Integer hookId) throws GitLabApiException
projectId
- the project ID to get the hook forhookId
- the ID of the hook to getGitLabApiException
- if any exception occurspublic Optional<ProjectHook> getOptionalHook(Integer projectId, Integer hookId)
projectId
- the project ID to get the hook forhookId
- the ID of the hook to getpublic ProjectHook addHook(String projectName, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) throws GitLabApiException
projectName
- the name of the projecturl
- the callback URL for the hookenabledHooks
- a ProjectHook instance specifying which hooks to enableenableSslVerification
- enable SSL verificationsecretToken
- the secret token to pass back to the hookGitLabApiException
- if any exception occurspublic ProjectHook addHook(Integer projectId, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) throws GitLabApiException
projectId
- the project ID to add the project hook tourl
- the callback URL for the hookenabledHooks
- a ProjectHook instance specifying which hooks to enableenableSslVerification
- enable SSL verificationsecretToken
- the secret token to pass back to the hookGitLabApiException
- if any exception occurspublic ProjectHook addHook(Project project, String url, ProjectHook enabledHooks, boolean enableSslVerification, String secretToken) throws GitLabApiException
project
- the Project instance to add the project hook tourl
- the callback URL for the hookenabledHooks
- a ProjectHook instance specifying which hooks to enableenableSslVerification
- enable SSL verificationsecretToken
- the secret token to pass back to the hookGitLabApiException
- if any exception occurspublic ProjectHook addHook(Project project, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException
project
- the Project instance to add the project hook tourl
- the callback URL for the hookdoPushEvents
- flag specifying whether to do push eventsdoIssuesEvents
- flag specifying whether to do issues eventsdoMergeRequestsEvents
- flag specifying whether to do merge requests eventsGitLabApiException
- if any exception occurspublic ProjectHook addHook(Integer projectId, String url, boolean doPushEvents, boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException
projectId
- the project ID to add the project hook tourl
- the callback URL for the hookdoPushEvents
- flag specifying whether to do push eventsdoIssuesEvents
- flag specifying whether to do issues eventsdoMergeRequestsEvents
- flag specifying whether to do merge requests eventsGitLabApiException
- if any exception occurspublic void deleteHook(Integer projectId, Integer hookId) throws GitLabApiException
projectId
- the project ID to delete the project hook fromhookId
- the project hook ID to deleteGitLabApiException
- if any exception occurspublic void deleteHook(ProjectHook hook) throws GitLabApiException
hook
- the ProjectHook instance to removeGitLabApiException
- if any exception occurspublic ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException
hook
- the ProjectHook instance that contains the project hook info to modifyGitLabApiException
- if any exception occurspublic List<Issue> getIssues(Integer projectId) throws GitLabApiException
IssuesApi.getIssues(Integer)
projectId
- the project ID to get the issues forGitLabApiException
- if any exception occurspublic List<Issue> getIssues(Integer projectId, int page, int perPage) throws GitLabApiException
IssuesApi.getIssues(Integer, int, int)
projectId
- the project ID to get the issues forpage
- the page to getperPage
- the number of issues per pageGitLabApiException
- if any exception occurspublic Pager<Issue> getIssues(Integer projectId, int itemsPerPage) throws GitLabApiException
IssuesApi.getIssues(Integer, int)
projectId
- the project ID to get the issues foritemsPerPage
- the number of issues per pageGitLabApiException
- if any exception occurspublic Issue getIssue(Integer projectId, Integer issueId) throws GitLabApiException
IssuesApi.getIssue(Integer, Integer)
projectId
- the project ID to get the issue forissueId
- the internal ID of a project's issueGitLabApiException
- if any exception occurspublic void deleteIssue(Integer projectId, Integer issueId) throws GitLabApiException
IssuesApi.deleteIssue(Integer, Integer)
projectId
- the project ID to delete the issue fromissueId
- the internal ID of a project's issueGitLabApiException
- if any exception occurspublic List<Snippet> getSnippets(Integer projectId) throws GitLabApiException
projectId
- the project ID to get the snippets forGitLabApiException
- if any exception occurspublic List<Snippet> getSnippets(Integer projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get the snippets forpage
- the page to getperPage
- the number of snippets per pageGitLabApiException
- if any exception occurspublic Pager<Snippet> getSnippets(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId
- the project ID to get the issues foritemsPerPage
- the number of snippets per pageGitLabApiException
- if any exception occurspublic Snippet getSnippet(Integer projectId, Integer snippetId) throws GitLabApiException
projectId
- the project ID to get the snippet forsnippetId
- the ID of the project's snippetGitLabApiException
- if any exception occurspublic Optional<Snippet> getOptionalSnippet(Integer projectId, Integer snippetId)
projectId
- the project ID to get the snippet forsnippetId
- the ID of the project's snippetpublic Snippet createSnippet(Integer projectId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException
projectId
- the ID of the project owned by the authenticated user, requiredtitle
- the title of a snippet, requiredfilename
- the name of a snippet file, requireddescription
- the description of a snippet, optionalcode
- the content of a snippet, requiredvisibility
- the snippet's visibility, requiredGitLabApiException
- if any exception occurspublic Snippet updateSnippet(Integer projectId, Integer snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException
projectId
- the ID of the project owned by the authenticated user, requiredsnippetId
- the ID of a project's snippet, requiredtitle
- the title of a snippet, optionalfilename
- the name of a snippet file, optionaldescription
- the description of a snippet, optioptionalonalcode
- the content of a snippet, optionalvisibility
- the snippet's visibility, reqoptionaluiredGitLabApiException
- if any exception occurspublic void deleteSnippet(Integer projectId, Integer snippetId) throws GitLabApiException
GitLabApiException
public String getRawSnippetContent(Integer projectId, Integer snippetId) throws GitLabApiException
GitLabApiException
public Optional<String> getOptionalRawSnippetContent(Integer projectId, Integer snippetId)
public void shareProject(Integer projectId, Integer groupId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException
projectId
- the ID of the project to share, requiredgroupId
- the ID of the group to share with, requiredaccessLevel
- the permissions level to grant the group, requiredexpiresAt
- the share expiration date, optionalGitLabApiException
- if any exception occurspublic void unshareProject(Integer projectId, Integer groupId) throws GitLabApiException
projectId
- the ID of the project to unshare, requiredgroupId
- the ID of the group to unshare, requiredGitLabApiException
- if any exception occursCopyright © 2018. All rights reserved.