Skip to content

add getUser(username) and getProject(projectName) method#13

Closed
zacker330 wants to merge 3 commits intotimols:masterfrom
zacker330:master
Closed

add getUser(username) and getProject(projectName) method#13
zacker330 wants to merge 3 commits intotimols:masterfrom
zacker330:master

Conversation

@zacker330
Copy link
Copy Markdown

 // 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];
}

@timols
Copy link
Copy Markdown
Owner

timols commented May 13, 2014

@zacker330 I'd like to merge this in but it seems that it won't merge cleanly. Would you mind resolving the merge issues and update your pull request?

@bitsofinfo
Copy link
Copy Markdown
Contributor

Can this get merged please?

@timols
Copy link
Copy Markdown
Owner

timols commented Aug 14, 2014

@bitsofinfo happy to but I'm hoping @zacker330 would mind resolving the merge conflicts so I can merge it in.

@gustavolira
Copy link
Copy Markdown

I'd make a contribution to add createUser(GitlabUser user, String password) and createProject(GitlabProject project) but I see this pull requests and it is exactly what I would do.
There is any prevision when this pull request will be add to this project?

@zacker330
Copy link
Copy Markdown
Author

@timols I'm sorry for missing this message for long time. And I forget the logic of this project cause by I have long time not work on it.

I just added two methods, maybe you can add those by yourself straightly.

@timols timols closed this Nov 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants