// https://github.com/gogs/go-gogs-client/wiki/Users-Followers#list-followers-of-a-user
519365
func ListFollowers(c *context.APIContext) {
	u := GetUserByParams(c)
	if c.Written() {
		return
	}
	listUserFollowers(c, u)
}
241776
func (c oauthClient) List(listID uint) (wl.List, error) {
	url := fmt.Sprintf(
		"%s/lists/%d",
		c.apiURL,
		listID,
	)

	req, err := c.newGetRequest(url)
	if err != nil {
		return wl.List{}, err
	}

	resp, err := c.do(req)
	if err != nil {
		return wl.List{}, err
	}

	if resp.StatusCode != http.StatusOK {
		return wl.List{}, fmt.Errorf("Unexpected response code %d - expected %d", resp.StatusCode, http.StatusOK)
	}

	list := wl.List{}
	err = json.NewDecoder(resp.Body).Decode(&list)
	if err != nil {
		return wl.List{}, err
	}
	return list, nil
}
875752
func (s *DeviceEKStorage) ListAllForUser(mctx libkb.MetaContext) (all []string, err error) {
	defer mctx.TraceTimed("DeviceEKStorage#ListAllForUser", func() error { return err })()

	s.Lock()
	defer s.Unlock()

	return s.listAllForUser(mctx, mctx.ActiveDevice().Username(mctx))
}
1096693
func (u *UserService) List(opt *UserListOptions) ([]User, *http.Response, error) {
	req, err := u.client.NewRequest("GET", "user", opt, nil)

	users := new(Users)
	resp, err := u.client.Do(req, &users)
	if err != nil {
		return nil, resp, err
	}
	return users.Items, resp, nil
}
24320
func (c *Client) ListMyRepos() ([]*Repository, error) {
	repos := make([]*Repository, 0, 10)
	return repos, c.getParsedResponse("GET", "/user/repos", nil, nil, &repos)
}
140679
func (c *client) UserList() ([]*User, error) {
	var out []*User
	uri := fmt.Sprintf(pathUsers, c.addr)
	err := c.get(uri, &out)
	return out, err
}
1116767
func (b *BlogRef) GetFollowers() (*FollowerList, error) {
	return GetFollowers(b.client, b.Name, 0, 0)
}
952019
func (user *User) ListAllUserOpenIDs() ([]string, error) {
	nextOpenid := ""
	openids := []string{}
	count := 0
	for {
		ul, err := user.ListUserOpenIDs(nextOpenid)
		if err != nil {
			return nil, err
		}
		openids = append(openids, ul.Data.OpenIDs...)
		count += ul.Count
		if ul.Total > count {
			nextOpenid = ul.NextOpenID
		} else {
			return openids, nil
		}
	}
}
555707
func (c oauthClient) Lists() ([]wl.List, error) {
	url := fmt.Sprintf(
		"%s/lists",
		c.apiURL,
	)

	req, err := c.newGetRequest(url)
	if err != nil {
		return nil, err
	}

	resp, err := c.do(req)
	if err != nil {
		return nil, err
	}

	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("Unexpected response code %d - expected %d", resp.StatusCode, http.StatusOK)
	}

	lists := []wl.List{}
	err = json.NewDecoder(resp.Body).Decode(&lists)
	if err != nil {
		return lists, err
	}
	return lists, nil
}
1283340
func (f *FollowersService) All(uri *Hyperlink, uriParams M) (followers []User, result *Result) {
	url, err := ExpandWithDefault(uri, &CurrentFollowerUrl, uriParams)
	if err != nil {
		return nil, &Result{Err: err}
	}

	result = f.client.get(url, &followers)
	return
}
11061
func ListUserOrgs(c *context.APIContext) {
	u := user.GetUserByParams(c)
	if c.Written() {
		return
	}
	listUserOrgs(c, u, false)
}
109158
func (s *UsersService) Unfollow(ctx context.Context, user string) (*Response, error) {
	u := fmt.Sprintf("user/following/%v", user)
	req, err := s.client.NewRequest("DELETE", u, nil)
	if err != nil {
		return nil, err
	}

	return s.client.Do(ctx, req, nil)
}
650297
func (s *OrganizationsService) List(ctx context.Context, user string, opt *ListOptions) ([]*Organization, *Response, error) {
	var u string
	if user != "" {
		u = fmt.Sprintf("users/%v/orgs", user)
	} else {
		u = "user/orgs"
	}
	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 orgs []*Organization
	resp, err := s.client.Do(ctx, req, &orgs)
	if err != nil {
		return nil, resp, err
	}

	return orgs, resp, nil
}
1012590
func (auth *Auth) ListUsers(maxResults int64) *ListAccountCursor {
	return &ListAccountCursor{MaxResults: maxResults, auth: auth}
}
520362
func (c *TeamController) List(ctx *app.ListTeamContext) error {
	currentUser, err := manager.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewUnauthorizedError(err.Error()))
	}

	if currentUser == nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewUnauthorizedError("error finding the current user"))
	}

	teams, err := c.app.TeamService().ListTeamsForIdentity(ctx, *currentUser)

	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err": err,
		}, "failed to list teams")
		return jsonapi.JSONErrorResponse(ctx, errors.NewInternalError(ctx, err))
	}

	return ctx.OK(&app.IdentityTeamArray{
		Data: convertToIdentityTeamData(teams),
	})
}
1006327
func (c *Client) RequestUserList() {
	packet := MumbleProto.UserList{}
	c.Conn.WriteProto(&packet)
}
64758
func (s *Service) AddOnListByUser(ctx context.Context, accountIdentity string, lr *ListRange) (AddOnListByUserResult, error) {
	var addOn AddOnListByUserResult
	return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/users/%v/addons", accountIdentity), nil, lr)
}