// List members of the team.
438833
func (s *Service) TeamMemberList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamMemberListResult, error) {
	var teamMember TeamMemberListResult
	return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), nil, lr)
}
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
}
344241
func (s *Service) TeamInvitationList(ctx context.Context, teamName string, lr *ListRange) (TeamInvitationListResult, error) {
	var teamInvitation TeamInvitationListResult
	return teamInvitation, s.Get(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations", teamName), nil, lr)
}
1201384
func (s *UsergroupsUsersService) List(usergroup string) *UsergroupsUsersListCall {
	var call UsergroupsUsersListCall
	call.service = s
	call.usergroup = usergroup
	return &call
}
49066
func (s *AgentsService) List(ctx context.Context, opt *AgentsListOpts) (*agent.AgentList, error) {
	agentList := &agent.AgentList{}
	return agentList, s.client.List(ctx, agentsUrl, opt, agentList)
}
1075181
func formatTeamName(org string, team string) string {
	return fmt.Sprintf("%s:%s", org, team)
}
1209075
func List(c *client.Client, results int) (api.Users, int, error) {
	body, count, err := c.LimitedRequest("/v1/users/", results)

	if err != nil {
		return []api.User{}, -1, err
	}

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

	return users, count, nil
}
518067
func (c *SpaceController) ListTeams(ctx *app.ListTeamsSpaceContext) 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().ListTeamsInSpace(ctx, *currentUser, ctx.SpaceID)

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

	return ctx.OK(&app.TeamArray{
		Data: convertToTeamData(teams),
	})
}
258350
func (c *Client) GetAllTeams(leagueKey string) ([]Team, error) {
	content, err := c.GetFantasyContent(
		fmt.Sprintf("%s/league/%s/teams", YahooBaseURL, leagueKey))
	if err != nil {
		return nil, err
	}
	return content.League.Teams, nil
}
1222320
func filterTeams(userTeams, configTeams []string) (teams []string) {
	teamFilter := make(map[string]struct{})
	for _, team := range configTeams {
		if _, ok := teamFilter[team]; !ok {
			teamFilter[team] = struct{}{}
		}
	}
	for _, team := range userTeams {
		if _, ok := teamFilter[team]; ok {
			teams = append(teams, team)
		}
	}
	return
}
964897
func (r *GroupService) List(appId string) *GroupListCall {
	c := &GroupListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.appId = appId
	return c
}
1199282
func (c *CollaboratorsController) List(ctx *app.ListCollaboratorsContext) error {
	return proxy.RouteHTTP(ctx, c.config.GetAuthShortServiceHostName())
}
991614
func (s *TeamsService) ListComments(ctx context.Context, teamID int64, discussionNumber int, options *DiscussionCommentListOptions) ([]*DiscussionComment, *Response, error) {
	u := fmt.Sprintf("teams/%v/discussions/%v/comments", teamID, discussionNumber)
	u, err := addOptions(u, options)
	if err != nil {
		return nil, nil, err
	}

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

	// TODO: remove custom Accept header when this API fully launches.
	req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview)

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

	return comments, resp, nil
}
341658
func (d *DismissalRestrictionsRequest) GetTeams() []string {
	if d == nil || d.Teams == nil {
		return nil
	}
	return *d.Teams
}
854963
func (s *TeamsService) ListDiscussions(ctx context.Context, teamID int64, options *DiscussionListOptions) ([]*TeamDiscussion, *Response, error) {
	u := fmt.Sprintf("teams/%v/discussions", teamID)
	u, err := addOptions(u, options)
	if err != nil {
		return nil, nil, err
	}

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

	// TODO: remove custom Accept header when this API fully launches.
	req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview)

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

	return teamDiscussions, resp, nil
}
456437
func (c *cluster) membersList(status memberStatus) []string {
	c.RLock()
	defer c.RUnlock()
	var list []string
	for _, m := range c.members {
		if m.status == status {
			list = append(list, m.endpoint)
		}
	}

	return list
}
892742
func (s *Service) TeamMemberListByMember(ctx context.Context, teamIdentity string, teamMemberIdentity string, lr *ListRange) (TeamMemberListByMemberResult, error) {
	var teamMember TeamMemberListByMemberResult
	return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v/apps", teamIdentity, teamMemberIdentity), nil, lr)
}