public class GroupApi extends AbstractApi
Modifier and Type | Method and Description |
---|---|
void |
addGroup(String name,
String path)
Creates a new project group.
|
Member |
addMember(Integer groupId,
Integer userId,
Integer accessLevel)
Adds a user to the list of group members.
|
void |
deleteGroup(Group group)
Removes group with all projects inside.
|
void |
deleteGroup(Integer groupId)
Removes group with all projects inside.
|
Group |
getGroup(int groupId)
Get all details of a group.
|
List<Group> |
getGroups()
Get a list of groups.
|
List<Member> |
getMembers(int groupId)
Get a list of group members viewable by the authenticated user.
|
void |
removeMember(Integer projectId,
Integer userId)
Removes member from the group team.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, handle, post, post, post, put, put, validate
public GroupApi(GitLabApi gitLabApi)
public List<Group> getGroups() throws GitLabApiException
GitLabApiException
- if any exception occurspublic Group getGroup(int groupId) throws GitLabApiException
groupId
- the group ID to getGitLabApiException
- if any exception occurspublic void addGroup(String name, String path) throws GitLabApiException
name
- the name of the group to addpath
- the path for the groupGitLabApiException
- if any exception occurspublic void deleteGroup(Integer groupId) throws GitLabApiException
groupId
- the group ID to deleteGitLabApiException
- if any exception occurspublic void deleteGroup(Group group) throws GitLabApiException
group
- the Group instance to deleteGitLabApiException
- if any exception occurspublic List<Member> getMembers(int groupId) throws GitLabApiException
groupId
- the group ID to list the members forGitLabApiException
- if any exception occurspublic Member addMember(Integer groupId, Integer userId, Integer accessLevel) throws GitLabApiException
groupId
- the project ID to add the member touserId
- the user ID of the member to addaccessLevel
- the access level for the new memberGitLabApiException
- if any exception occurspublic void removeMember(Integer projectId, Integer userId) throws GitLabApiException
projectId
- the project ID to remove the member fromuserId
- the user ID of the member to removeGitLabApiException
- if any exception occursCopyright © 2017. All rights reserved.