Commit 45f63e74 authored by Tim Olshansky's avatar Tim Olshansky

Merge pull request #131 from rockwotj/master

Added ability to get other user's groups
parents 56534cff 75a7c204
......@@ -348,8 +348,20 @@ public class GitlabAPI {
}
public List<GitlabGroup> getGroups() throws IOException {
return getGroupsViaSudo(null, null);
}
public List<GitlabGroup> getGroupsViaSudo(String username, Pagination pagination) throws IOException {
String tailUrl = GitlabGroup.URL;
return retrieve().getAll(tailUrl, GitlabGroup[].class);
Query query = new Query()
.appendIf(PARAM_SUDO, username);
if (pagination != null) {
query.mergeWith(pagination.asQuery());
}
return retrieve().getAll(tailUrl + query.toString(), GitlabGroup[].class);
}
/**
......
Markdown is supported
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