Skip to content

Commit

Permalink
list projects under group
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Gambirazzi authored and Kris Gambirazzi committed Apr 26, 2016
1 parent 61bc24f commit d4e2cd6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gitlab/objects.py
Expand Up @@ -717,6 +717,19 @@ def search(self, query, **kwargs):
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'
Expand Down

0 comments on commit d4e2cd6

Please sign in to comment.