Commit a1c611d1 authored by biancalana's avatar biancalana Committed by Sander van Harmelen

ListGroupProjects implementation (#110)

parent 581aea42
......@@ -226,6 +226,31 @@ func (s *GroupsService) ListGroupMembers(gid interface{}) ([]*GroupMember, *Resp
return g, resp, err
}
// ListGroupProjects get a list of group projects
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-a-group-s-projects
func (s *GroupsService) ListGroupProjects(gid interface{}) ([]*Project, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/projects", group)
req, err := s.client.NewRequest("GET", u, nil)
if err != nil {
return nil, nil, err
}
var p []*Project
resp, err := s.client.Do(req, &p)
if err != nil {
return nil, resp, err
}
return p, resp, err
}
// AddGroupMemberOptions represents the available AddGroupMember() options.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#add-group-member
......
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