// List returns a list of all Projects within the given org.
512493
func (p *ProjectsClient) List(ctx context.Context, orgID *identity.ID) ([]envelope.Project, error) {
	orgs := []identity.ID{*orgID}
	return p.Search(ctx, orgs, nil)
}
292795
func (s *ProjectService) ListProjects(p *ListProjectsParams) (*ListProjectsResponse, error) {
	resp, err := s.cs.newRequest("listProjects", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListProjectsResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
833390
func (s *workflowLister) List(selector labels.Selector) (ret []*v1alpha1.Workflow, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.Workflow))
	})
	return ret, err
}
854707
func (s *statefulSetLister) List(selector labels.Selector) (ret []*v1.StatefulSet, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.StatefulSet))
	})
	return ret, err
}
1365163
func (e *events) List(opts api.ListOptions) (*api.EventList, error) {
	result := &api.EventList{}
	err := e.client.Get().
		NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
		Resource("events").
		VersionedParams(&opts, api.Scheme).
		Do().
		Into(result)
	return result, err
}
647766
func (s *applicationLister) List(selector labels.Selector) (ret []*v1alpha1.Application, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.Application))
	})
	return ret, err
}
210609
func (s *TokensService) List(ctx context.Context, opt *TokensListOpts) (*token.TokenList, error) {
	tokenList := &token.TokenList{}
	return tokenList, s.client.List(ctx, tokensUrl, opt, tokenList)
}
487073
func (o *OrgInvitesClient) List(ctx context.Context, orgID *identity.ID, states []string, email string) ([]envelope.OrgInvite, error) {
	v := &url.Values{}
	v.Set("org_id", orgID.String())

	for _, state := range states {
		v.Add("state", state)
	}

	if email != "" {
		v.Add("email", email)
	}

	var invites []envelope.OrgInvite
	err := o.client.RoundTrip(ctx, "GET", "/org-invites", v, nil, &invites)
	return invites, err
}
77655
func (f *Folder) list(prefix string, maxDepth, curDepth int) []string {
	out := make([]string, 0, 10)
	if maxDepth > 0 && curDepth > maxDepth {
		return out
	}

	if !f.Root {
		if prefix != "" {
			prefix += sep
		}
		prefix += f.Name
	}
	for _, key := range sortedFolders(f.Folders) {
		out = append(out, f.Folders[key].list(prefix, maxDepth, curDepth+1)...)
	}
	for _, key := range sortedFiles(f.Files) {
		out = append(out, path.Join(prefix, f.Files[key].Name))
	}
	return out
}
191426
func (d *driver) List(ctx context.Context, path string) ([]string, error) {
	var files []string

	prefix := d.swiftPath(path)
	if prefix != "" {
		prefix += "/"
	}

	opts := &swift.ObjectsOpts{
		Prefix:    prefix,
		Delimiter: '/',
	}

	objects, err := d.Conn.ObjectsAll(d.Container, opts)
	for _, obj := range objects {
		files = append(files, strings.TrimPrefix(strings.TrimSuffix(obj.Name, "/"), d.swiftPath("/")))
	}

	if err == swift.ContainerNotFound || (len(objects) == 0 && path != "/") {
		return files, storagedriver.PathNotFoundError{Path: path}
	}
	return files, err
}
266406
func (r *TeamResource) List() ([]*Team, error) {
	
	// we'll get the data in a key/value struct
	data := struct {
		Teams map[string]string
	}{ }

	data.Teams = map[string]string{}
	teams := []*Team{}

	if err := r.client.do("GET", "/user/privileges", nil, nil, &data); err != nil {
		return nil, err
	}

	for k,v := range data.Teams {
		team := &Team{ k, v }
		teams = append(teams, team)
	}

	return teams, nil
}
1226855
func (s *podLister) List(selector labels.Selector) (ret []*v1.Pod, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.Pod))
	})
	return ret, err
}
1023136
func (s *eventLister) List(selector labels.Selector) (ret []*v1beta1.Event, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1beta1.Event))
	})
	return ret, err
}
529882
func (s *middlewareLister) List(selector labels.Selector) (ret []*v1alpha1.Middleware, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1alpha1.Middleware))
	})
	return ret, err
}
756749
func (c *Client) ListProjects(p *ListProjectsParameter) ([]*Project, error) {
	obj, err := c.Request("listProjects", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*Project), err
}
300598
func (w *WorklogClient) List(ctx context.Context, orgID *identity.ID) ([]apitypes.WorklogItem, error) {
	v := &url.Values{}
	if orgID != nil {
		v.Set("org_id", orgID.String())
	}

	var resp []rawWorklogItem
	err := w.client.DaemonRoundTrip(ctx, "GET", "/worklog", v, nil, &resp, nil)
	if err != nil {
		return nil, err
	}

	out := make([]apitypes.WorklogItem, 0, len(resp))
	for _, w := range resp {
		err := w.setDetails()
		if err != nil {
			return nil, err
		}

		out = append(out, *w.WorklogItem)
	}
	return out, err
}
639728
func (c *Client) List(prefix string) (*KVMeta, KVPairs, error) {
	return c.getRecurse(prefix, true, 0)
}