timols/java-gitlab-api — pull request #13 by zacker330 (2014-04-16 09:51:27+00:00)
Title: add getUser(username) and getProject(projectName) method

// new method
public GitlabProject getProject(String NAMESPACE_PROJECT_NAME) throws IOException {
String tailUrl = GitlabProject.URL + "/" + NAMESPACE_PROJECT_NAME;
return retrieve().to(tailUrl, GitlabProject.class);
}

// new method
public GitlabUser getUser(String username) throws IOException {
String tailUrl = GitlabUser.URL + "?search=" + username;
GitlabUser[] arrays = retrieve().to(tailUrl, GitlabUser[].class);
if (null == arrays || arrays.length == 0) return null;
return arrays[0];
}