From d4e2cd6c618d137df645c182271f67c5ae7e8ff5 Mon Sep 17 00:00:00 2001 From: Kris Gambirazzi Date: Wed, 27 Apr 2016 11:56:33 +1200 Subject: list projects under group --- gitlab/objects.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gitlab/objects.py') diff --git a/gitlab/objects.py b/gitlab/objects.py index 2ceb37f..15799e3 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -717,6 +717,19 @@ class GroupManager(BaseManager): url = '/groups?search=' + query return self.gitlab._raw_list(url, self.obj_cls, **kwargs) + def list_projects(self, gid, **kwargs): + """List all projects in a group + + Attrs: + gid (int): ID of the group + + Raises: + GitlabConnectionError: if the server cannot be reached. + GitlabListError: If the server fails to perform the request. + """ + url = '/groups/%d/projects' % gid + return self.gitlab._raw_list(url, self.obj_cls, **kwargs) + class Hook(GitlabObject): _url = '/hooks' -- cgit v1.2.1