Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
302c6cf5
Commit
302c6cf5
authored
Jun 14, 2017
by
Greg Messner
Browse files
Added getGroups(String search) #30.
parent
5373879f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/GroupApi.java
View file @
302c6cf5
...
...
@@ -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.
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment