// GetList gets all priorities from JIRA
//
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-priority-get
169601
func (s *PriorityService) GetList() ([]Priority, *Response, error) {
	apiEndpoint := "rest/api/2/priority"
	req, err := s.client.NewRequest("GET", apiEndpoint, nil)
	if err != nil {
		return nil, nil, err
	}

	priorityList := []Priority{}
	resp, err := s.client.Do(req, &priorityList)
	if err != nil {
		return nil, resp, NewJiraError(resp, err)
	}
	return priorityList, resp, nil
}
754712
func (c *componentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) {
	result = &api.ComponentStatusList{}
	err = c.client.Get().
		Resource("componentstatuses").
		VersionedParams(&opts, api.ParameterCodec).
		Do().
		Into(result)
	return
}
664186
func (s *DropletsService) List() ([]Droplet, *http.Response, error) {
	u := "v2/droplets"

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	sr := new(DropletsListResponse)
	resp, err := s.client.Do(req, sr)
	if err != nil {
		return nil, resp, err
	}

	return sr.Droplets, resp, err
}
1226988
func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) {
	result = &api.PodList{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("pods").
		VersionedParams(&opts, api.ParameterCodec).
		Do().
		Into(result)
	return
}
518397
func (m *Helper) List(namespace, apiVersion string, selector labels.Selector) (runtime.Object, error) {
	return m.RESTClient.Get().
		NamespaceIfScoped(namespace, m.NamespaceScoped).
		Resource(m.Resource).
		LabelsSelectorParam(selector).
		Do().
		Get()
}
1226696
func (client *Client) List(g Listable) ([]interface{}, error) {
	ctx, cancel := context.WithTimeout(context.Background(), client.Timeout)
	defer cancel()

	return client.ListWithContext(ctx, g)
}
394060
func (a *Allocations) List(q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) {
	var resp []*AllocationListStub
	qm, err := a.client.query("/v1/allocations", &resp, q)
	if err != nil {
		return nil, nil, err
	}
	sort.Sort(AllocIndexSort(resp))
	return resp, qm, nil
}
78407
func (rd *requireDirectory) GetList(extInfo *types.ExtensionInfo) (requiredFiles []string, lastModified int64, err error) {
	finalPath := rd.Path
	if !filepath.IsAbs(finalPath) {
		finalPath = filepath.Join(rd.BaseDir, rd.Path)
		if newPath, err := filepath.EvalSymlinks(finalPath); err == nil {
			finalPath = newPath
		}
	}
	f, err := os.Stat(finalPath)
	if err != nil {
		return nil, 0, err
	}
	if modified := f.ModTime().Unix(); lastModified < modified {
		lastModified = modified
	}
	alterExts := extInfo.AlterExts
	if alterExts.Len() == 0 {
		return nil, 0, errors.New("Extension Format unknown for require:" + extInfo.CurrentExtension)
	}
	for e := alterExts.Front(); e != nil; e = e.Next() {
		files, err := filepath.Glob(filepath.Join(finalPath, "*"+e.Value))
		if err != nil {
			return nil, 0, err
		}
		for _, file := range files {
			f, err := os.Stat(file)
			if err != nil {
				return nil, 0, err
			}
			if modified := f.ModTime().Unix(); lastModified < modified {
				lastModified = modified
			}
		}

		requiredFiles = append(requiredFiles, files...)
	}
	sort.Strings(requiredFiles)
	return

}
1181973
func (s *SpacesService) List(opt *SpaceListOptions) ([]Space, *http.Response, error) {
	u, err := urlWithOptions("spaces", opt)
	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	var spacesResp listSpacesResponse
	resp, err := s.client.Do(req, &spacesResp)
	if err != nil {
		return nil, resp, err
	}

	return spacesResp.Spaces, resp, nil
}
286706
func List(baseURL string, resourceType string) (*jsh.Document, *http.Response, error) {
	request, err := ListRequest(baseURL, resourceType)
	if err != nil {
		return nil, nil, err
	}

	return Do(request, jsh.ListMode)
}
805635
func GetList(client *flickr.FlickrClient, authenticate bool, userId string, page int) (*PhotosetsListResponse, error) {
	client.Init()
	client.Args.Set("method", "flickr.photosets.getList")
	if userId != "" {
		client.Args.Set("user_id", userId)
	}
	// if not provided, flickr defaults this argument to 1
	if page > 1 {
		client.Args.Set("page", strconv.Itoa(page))
	}
	// perform authentication if requested
	if authenticate {
		client.OAuthSign()
	} else {
		client.ApiSign()
	}

	response := &PhotosetsListResponse{}
	err := flickr.DoGet(client, response)
	return response, err
}
1041265
func (b *Board) GetLists(args Arguments) (lists []*List, err error) {
	path := fmt.Sprintf("boards/%s/lists", b.ID)
	err = b.client.Get(path, args, &lists)
	for i := range lists {
		lists[i].client = b.client
		for j := range lists[i].Cards {
			lists[i].Cards[j].client = b.client
		}
	}
	return
}
342674
func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error {
	pagingEnabled := utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking)
	hasContinuation := pagingEnabled && len(pred.Continue) > 0
	hasLimit := pagingEnabled && pred.Limit > 0 && resourceVersion != "0"
	if resourceVersion == "" || hasContinuation || hasLimit {
		// If resourceVersion is not specified, serve it from underlying
		// storage (for backward compatibility). If a continuation is
		// requested, serve it from the underlying storage as well.
		// Limits are only sent to storage when resourceVersion is non-zero
		// since the watch cache isn't able to perform continuations, and
		// limits are ignored when resource version is zero
		return c.storage.GetToList(ctx, key, resourceVersion, pred, listObj)
	}

	// If resourceVersion is specified, serve it from cache.
	// It's guaranteed that the returned value is at least that
	// fresh as the given resourceVersion.
	listRV, err := c.versioner.ParseResourceVersion(resourceVersion)
	if err != nil {
		return err
	}

	if listRV == 0 && !c.ready.check() {
		// If Cacher is not yet initialized and we don't require any specific
		// minimal resource version, simply forward the request to storage.
		return c.storage.GetToList(ctx, key, resourceVersion, pred, listObj)
	}

	trace := utiltrace.New(fmt.Sprintf("cacher %v: List", c.objectType.String()))
	defer trace.LogIfLong(500 * time.Millisecond)

	c.ready.wait()
	trace.Step("Ready")

	// List elements with at least 'listRV' from cache.
	listPtr, err := meta.GetItemsPtr(listObj)
	if err != nil {
		return err
	}
	listVal, err := conversion.EnforcePtr(listPtr)
	if err != nil || listVal.Kind() != reflect.Slice {
		return fmt.Errorf("need a pointer to slice, got %v", listVal.Kind())
	}
	filter := filterWithAttrsFunction(key, pred)

	obj, exists, readResourceVersion, err := c.watchCache.WaitUntilFreshAndGet(listRV, key, trace)
	if err != nil {
		return err
	}
	trace.Step("Got from cache")

	if exists {
		elem, ok := obj.(*storeElement)
		if !ok {
			return fmt.Errorf("non *storeElement returned from storage: %v", obj)
		}
		if filter(elem.Key, elem.Labels, elem.Fields) {
			listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem()))
		}
	}
	if c.versioner != nil {
		if err := c.versioner.UpdateList(listObj, readResourceVersion, ""); err != nil {
			return err
		}
	}
	return nil
}
48505
func (r *AutoVXLANCfgResource) GetList() (uint, string) {
	cfg := &AutoVXLANCfgResource{}
	cfg.StateDriver = r.StateDriver
	if err := cfg.Read(r.ID); err != nil {
		log.Errorf("Error reading resource %s: %s", r.ID, err)
		return 0, ""
	}

	oper := &AutoVXLANOperResource{}
	oper.StateDriver = r.StateDriver
	if err := oper.Read(r.ID); err != nil {
		log.Errorf("Error reading resource %s: %s", r.ID, err)
		return 0, ""
	}
	oper.FreeVXLANs.InPlaceSymmetricDifference(cfg.VXLANs)

	numVlans := uint(0)
	idx := uint(0)
	startIdx := idx
	list := []string{}
	inRange := false

	for {
		foundValue, found := oper.FreeVXLANs.NextSet(idx)
		if !found {
			break
		}
		numVlans++

		if !inRange { // begin of range
			startIdx = foundValue
			inRange = true
		} else if foundValue > idx { // end of range
			thisRange := rangePrint(startIdx+cfg.FreeVXLANsStart, idx-1+cfg.FreeVXLANsStart)
			list = append(list, thisRange)
			startIdx = foundValue
		}
		idx = foundValue + 1
	}

	// list end with allocated value
	if inRange {
		thisRange := rangePrint(startIdx+cfg.FreeVXLANsStart, idx-1+cfg.FreeVXLANsStart)
		list = append(list, thisRange)
	}

	return numVlans, strings.Join(list, ", ")
}
380778
func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *schedulingv1.PriorityClassList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &schedulingv1.PriorityClassList{})
	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &schedulingv1.PriorityClassList{ListMeta: obj.(*schedulingv1.PriorityClassList).ListMeta}
	for _, item := range obj.(*schedulingv1.PriorityClassList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
199206
func List(c *deis.Client, results int) ([]api.Cert, int, error) {
	body, count, reqErr := c.LimitedRequest("/v2/certs/", results)

	if reqErr != nil && !deis.IsErrAPIMismatch(reqErr) {
		return []api.Cert{}, -1, reqErr
	}

	var res []api.Cert
	if err := json.Unmarshal([]byte(body), &res); err != nil {
		return []api.Cert{}, -1, err
	}

	return res, count, reqErr
}
1005690
func (a *API) List() (params.BlockResults, error) {
	if err := a.checkCanRead(); err != nil {
		return params.BlockResults{}, err
	}

	all, err := a.access.AllBlocks()
	if err != nil {
		return params.BlockResults{}, common.ServerError(err)
	}
	found := make([]params.BlockResult, len(all))
	for i, one := range all {
		found[i] = convertBlock(one)
	}
	return params.BlockResults{Results: found}, nil
}