Commit 7cd9f262 authored by Alexandre Vanhecke's avatar Alexandre Vanhecke Committed by Greg Messner
Browse files

Add a way to get only one member of a group (#96)

parent 995c7aac
......@@ -339,6 +339,21 @@ public class GroupApi extends AbstractApi {
return (new Pager<Member>(this, Member.class, itemsPerPage, null, "groups", groupId, "members"));
}
/**
* Get a group member viewable by the authenticated user.
*
* GET /groups/:id/members/:id
*
* @param groupId the group ID to get the member for
* @param userId the member ID of the member to get
* @return a member viewable by the authenticated user
* @throws GitLabApiException if any exception occurs
*/
public Member getMember(int groupId, int userId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(), "groups", groupId, "members", userId);
return (response.readEntity(new GenericType<Member>() {}));
}
/**
* Adds a user to the list of group members.
*
......
Supports Markdown
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