// List returns liked Tweets from the specified user.
// https://dev.twitter.com/rest/reference/get/favorites/list
966809
func (s *FavoriteService) List(params *FavoriteListParams) ([]Tweet, *http.Response, error) {
	favorites := new([]Tweet)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("list.json").QueryStruct(params).Receive(favorites, apiError)
	return *favorites, resp, relevantError(err, *apiError)
}
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)
}
958056
func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1beta1.MutatingWebhookConfiguration))
	})
	return ret, err
}
988538
func (s *UsersService) ListFollowers(ctx context.Context, user string, opt *ListOptions) ([]*User, *Response, error) {
	var u string
	if user != "" {
		u = fmt.Sprintf("users/%v/followers", user)
	} else {
		u = "user/followers"
	}
	u, err := addOptions(u, opt)
	if err != nil {
		return nil, nil, err
	}

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

	var users []*User
	resp, err := s.client.Do(ctx, req, &users)
	if err != nil {
		return nil, resp, err
	}

	return users, resp, nil
}
485210
func (s *FeedService) list(req *restful.Request, resp *restful.Response) {
	// TODO (m0sth8): check if this user has access to feed items
	mgr := s.Manager()
	defer mgr.Close()

	query, err := fltr.FromRequest(req, manager.FeedItemFltr{})
	if err != nil {
		resp.WriteServiceError(http.StatusBadRequest, services.NewBadReq(err.Error()))
		return
	}
	skip := 0
	if p := req.QueryParameter("skip"); p != "" {
		if val, err := strconv.Atoi(p); err != nil {
			resp.WriteServiceError(http.StatusBadRequest, services.NewBadReq(fmt.Sprintf("skip: %s", err.Error())))
			return
		} else {
			skip = val
		}
	}
	limit := 20
	if p := req.QueryParameter("limit"); p != "" {
		if val, err := strconv.Atoi(p); err != nil {
			resp.WriteServiceError(http.StatusBadRequest, services.NewBadReq(fmt.Sprintf("limit: %s", err.Error())))
			return
		} else {
			limit = val
		}
	}
	sort := []string{"-updated"}
	results, count, err := mgr.Feed.FilterByQuery(query, mgr.Opts(skip, limit, sort))
	if err != nil {
		logrus.Error(stackerr.Wrap(err))
		resp.WriteServiceError(http.StatusInternalServerError, services.DbErr)
		return
	}

	result := &feed.Feed{
		Meta:    pagination.Meta{Count: count},
		Results: results,
	}
	resp.WriteEntity(result)
}
547063
func (c *APIClient) UsersList() ([]*User, error) {
	dest := UsersList{}
	if err := c.slackMethodAndParse("users.list", &dest); err != nil {
		return nil, err
	}

	return dest.Users, nil
}
263229
func (r *RepoResource) List() ([]*Repo, error) {
	repos := []*Repo{}
	const path = "/user/repositories"

	if err := r.client.do("GET", path, nil, nil, &repos); err != nil {
		return nil, err
	}

	return repos, nil
}
1147431
func (k *KBPKIClient) FavoriteList(ctx context.Context) (
	keybase1.FavoritesResult, error) {
	const sessionID = 0
	return k.serviceOwner.KeybaseService().FavoriteList(ctx, sessionID)
}
479961
func (c *Client) List() ([]*Note, error) {
	var res []*Note
	var mark string
	for {
		curr, err := c.listRaw(mark)
		if err != nil {
			return nil, err
		}
		for _, nd := range curr.Notes {
			updateNoteData(nd)
			n := nd.Note
			if n.ID == "" {
				log.Fatalf("n.ID is empty on %v\n", n)
			}
			res = append(res, n)
		}
		mark = curr.Mark
		if mark == "" {
			break
		}
	}
	return res, nil
}
913279
func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*v1.SelfSubjectRulesReview, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.SelfSubjectRulesReview))
	})
	return ret, err
}
1331501
func (a *ACLTokens) List(q *QueryOptions) ([]*ACLTokenListStub, *QueryMeta, error) {
	var resp []*ACLTokenListStub
	qm, err := a.client.query("/v1/acl/tokens", &resp, q)
	if err != nil {
		return nil, nil, err
	}
	return resp, qm, nil
}
625846
func (cs *UserService) List() ([]UsersResponse, error) {

	req, err := cs.client.NewRequest("GET", "/users", nil)
	if err != nil {
		return nil, err
	}

	resp, err := cs.client.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	if err := validateResponse(resp); err != nil {
		return nil, err
	}

	bodyBytes, _ := ioutil.ReadAll(resp.Body)
	bodyString := string(bodyBytes)

	u := &listUsersJSONResponse{}
	err = json.Unmarshal([]byte(bodyString), &u)

	return u.Users, err
}
663069
func (f *fs) List(ctx context.Context, arg keybase1.ListArg) (keybase1.ListResult, error) {
	f.log.CDebugf(ctx, "Listing %q", arg.Path)

	kbfsPath, err := NewPath(arg.Path)
	if err != nil {
		return keybase1.ListResult{}, err
	}

	var result keybase1.ListResult
	switch kbfsPath.PathType {
	case RootPathType:
		result, err = f.root(ctx)
	case KeybasePathType:
		result, err = f.keybase(ctx)
	case KeybaseChildPathType:
		result, err = f.favorites(ctx, kbfsPath)
	default:
		result, err = f.tlf(ctx, kbfsPath)
	}
	if err != nil {
		f.log.CErrorf(ctx, "Error listing path %q: %s", arg.Path, err)
	}
	return result, err
}
417783
func (c *FakeClusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewListAction(clustersResource, clustersKind, c.ns, opts), &v1alpha1.ClusterList{})

	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &v1alpha1.ClusterList{ListMeta: obj.(*v1alpha1.ClusterList).ListMeta}
	for _, item := range obj.(*v1alpha1.ClusterList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}
577614
func (s *Intention) List(
	args *structs.DCSpecificRequest,
	reply *structs.IndexedIntentions) error {
	// Forward if necessary
	if done, err := s.srv.forward("Intention.List", args, args, reply); done {
		return err
	}

	return s.srv.blockingQuery(
		&args.QueryOptions, &reply.QueryMeta,
		func(ws memdb.WatchSet, state *state.Store) error {
			index, ixns, err := state.Intentions(ws)
			if err != nil {
				return err
			}

			reply.Index, reply.Intentions = index, ixns
			if reply.Intentions == nil {
				reply.Intentions = make(structs.Intentions, 0)
			}

			return s.srv.filterACL(args.Token, reply)
		},
	)
}
1146525
func (s *SizesService) List() ([]Size, *http.Response, error) {
	u := "v2/sizes"

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

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

	return sr.Sizes, resp, err
}
947477
func (c *FakeUsers) List(opts v1.ListOptions) (result *user.UserList, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootListAction(usersResource, usersKind, opts), &user.UserList{})
	if obj == nil {
		return nil, err
	}

	label, _, _ := testing.ExtractFromListOptions(opts)
	if label == nil {
		label = labels.Everything()
	}
	list := &user.UserList{ListMeta: obj.(*user.UserList).ListMeta}
	for _, item := range obj.(*user.UserList).Items {
		if label.Matches(labels.Set(item.Labels)) {
			list.Items = append(list.Items, item)
		}
	}
	return list, err
}