Commit b927d288 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

gitlab: add methods for group membership

parent 429ad8d7
......@@ -134,6 +134,16 @@ impl Gitlab {
self._get(&format!("projects/{}/hooks/{}", project, hook))
}
/// Get the team members of a group.
pub fn group_members(&self, group: GroupId) -> GitlabResult<Vec<Member>> {
self._get_paged(&format!("groups/{}/members", group))
}
/// Get a team member of a group.
pub fn group_member(&self, group: GroupId, user: UserId) -> GitlabResult<Option<Member>> {
self._get(&format!("groups/{}/members/{}", group, user))
}
/// Get the team members of a project.
pub fn members(&self, project: ProjectId) -> GitlabResult<Vec<Member>> {
self._get_paged(&format!("projects/{}/members", project))
......
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