Commit 10a867b0 authored by Adam Retter's avatar Adam Retter

Support for getting details of a Gitlab Group

parent 6f177d84
...@@ -10,17 +10,7 @@ import java.util.List; ...@@ -10,17 +10,7 @@ import java.util.List;
import org.codehaus.jackson.map.DeserializationConfig; import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.ObjectMapper;
import org.gitlab.api.http.GitlabHTTPRequestor; import org.gitlab.api.http.GitlabHTTPRequestor;
import org.gitlab.api.models.GitlabBranch; import org.gitlab.api.models.*;
import org.gitlab.api.models.GitlabCommit;
import org.gitlab.api.models.GitlabIssue;
import org.gitlab.api.models.GitlabMergeRequest;
import org.gitlab.api.models.GitlabMilestone;
import org.gitlab.api.models.GitlabNamespace;
import org.gitlab.api.models.GitlabNote;
import org.gitlab.api.models.GitlabProject;
import org.gitlab.api.models.GitlabProjectHook;
import org.gitlab.api.models.GitlabProjectMember;
import org.gitlab.api.models.GitlabSession;
/** /**
* Gitlab API Wrapper class * Gitlab API Wrapper class
...@@ -86,6 +76,11 @@ public class GitlabAPI { ...@@ -86,6 +76,11 @@ public class GitlabAPI {
return new URL(_hostUrl + tailAPIUrl); return new URL(_hostUrl + tailAPIUrl);
} }
public GitlabGroup getGroup(Integer groupId) throws IOException {
String tailUrl = GitlabGroup.URL + "/" + groupId;
return retrieve().to(tailUrl, GitlabGroup.class);
}
public GitlabProject getProject(Integer projectId) throws IOException { public GitlabProject getProject(Integer projectId) throws IOException {
String tailUrl = GitlabProject.URL + "/" + projectId; String tailUrl = GitlabProject.URL + "/" + projectId;
return retrieve().to(tailUrl, GitlabProject.class); return retrieve().to(tailUrl, GitlabProject.class);
......
package org.gitlab.api.models;
import org.codehaus.jackson.annotate.JsonProperty;
public class GitlabGroup {
public static final String URL = "/groups";
private Integer _id;
private String _name;
private String _path;
@JsonProperty("ldap_cn")
private String _ldapCn;
@JsonProperty("ldap_access")
private Integer _ldapAccess;
public Integer getId() {
return _id;
}
public void setId(Integer id) {
_id = id;
}
public String getName() {
return _name;
}
public void setName(String name) {
_name = name;
}
public String getPath() {
return _path;
}
public void setPath(String path) {
_path = path;
}
public String getLdapCn() {
return _ldapCn;
}
public void setLdapCn(String ldapCn) {
this._ldapCn = ldapCn;
}
public Integer getLdapAccess() {
return _ldapAccess;
}
public void setLdapAccess(Integer ldapAccess) {
this._ldapAccess = ldapAccess;
}
}
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