Commit 75a7c204 authored by Tyler Rockwood's avatar Tyler Rockwood

Added ability to get other user's groups

parent 215076f6
......@@ -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