Commit 302c6cf5 authored by Greg Messner's avatar Greg Messner
Browse files

Added getGroups(String search) #30.

parent 5373879f
...@@ -34,6 +34,20 @@ public class GroupApi extends AbstractApi { ...@@ -34,6 +34,20 @@ public class GroupApi extends AbstractApi {
})); }));
} }
/**
* Get all groups that match your string in their name or path.
*
* @param search the group name or path search criteria
* @return a List containing matching Group instances
* @throws GitLabApiException if any exception occurs
*/
public List<Group> getGroups(String search) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("search", search).withParam("per_page", getDefaultPerPage());
Response response = get(Response.Status.OK, formData.asMap(), "groups");
return (response.readEntity(new GenericType<List<Group>>() {
}));
}
/** /**
* Get a list of projects belonging to the specified group ID. * Get a list of projects belonging to the specified group ID.
* *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment