Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.messners.gitlab.api;
 
 import java.util.List;
 
public class GroupApi extends AbstractApi {
	GroupApi (GitLabApi gitLabApi) {
		super(gitLabApi);
	}


GET /groups

Returns:
Throws:
java.io.IOException
	public List<GroupgetGroups () throws IOException {	
		 ClientResponse response = get(null"groups");
		 return (response.getEntity(new GenericType<List<Group>>() {}));
	}


GET /groups/:id

Parameters:
groupId
Returns:
Throws:
java.io.IOException
	public Group getGroup (int groupIdthrows IOException {
		ClientResponse response = get(null"groups"groupId);
		return (response.getEntity(Group.class));
	}


DELETE /groups/:id

Parameters:
groupId
Returns:
Throws:
java.io.IOException
	public boolean deleteGroup (Integer groupId)  throws IOException {
		if (groupId == null) {
			throw new RuntimeException("groupId cannot be null");
		}
		ClientResponse response = delete(null"groups"groupId);
		return (response.getStatus() == ...getStatusCode());		
	}


Parameters:
group
Returns:
Throws:
java.io.IOException
	public boolean deleteGroup (Group group)  throws IOException {
		return (deleteGroup(group.getId()));
	}


GET /groups/:id/members

Returns:
Throws:
java.io.IOException
	public List<MembergetMembers (int groupIdthrows IOException {	
		 ClientResponse response = get(null"groups"groupId"members");
		 return (response.getEntity(new GenericType<List<Member>>() {}));
	}
New to GrepCode? Check out our FAQ X