Commit a688802c authored by Ulrich Schreiner's avatar Ulrich Schreiner Committed by Sander van Harmelen

add paging for group-projects (#129)

parent abd6d800
......@@ -235,18 +235,27 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO
return g, resp, err
}
// ListGroupProjectsOptions represents the available ListGroupProjects()
// options.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-a-group-s-projects
type ListGroupProjectsOptions struct {
ListOptions
}
// 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) {
func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProjectsOptions) ([]*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)
req, err := s.client.NewRequest("GET", u, opt)
if err != nil {
return nil, nil, err
}
......
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