Commit 5bcf870f authored by Ben Boeckel's avatar Ben Boeckel
Browse files

gitlab: add API for fetching a group by name

Fixes: #9
parent 5d1c2692
......@@ -435,6 +435,18 @@ impl Gitlab {
self.get_paged_with_param("groups", params)
}
/// Find a group by its name.
pub fn group_by_name<N>(&self, name: N) -> GitlabResult<Group>
where
N: AsRef<str>,
{
let param: &[(&str, &str)] = &[];
self.get_with_param(
format!("groups/{}", Self::url_name(name.as_ref())),
param,
)
}
/// Get a project's hooks.
pub fn hooks<I, K, V>(&self, project: ProjectId, params: I) -> GitlabResult<Vec<ProjectHook>>
where
......
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