Serializes team to id string
        :param team: object to serialize
        :return: string id
502950
def to_team(team):
        
        from sevenbridges.models.team import Team
        if not team:
            raise SbgError('Team is required!')
        elif isinstance(team, Team):
            return team.id
        elif isinstance(team, six.string_types):
            return team
        else:
            raise SbgError('Invalid team parameter!')
181424
def team_info():
    """"""
    teams = __get_league_object().find('teams').findall('team')
    output = []
    for team in teams:
        info = {}
        for x in team.attrib:
            info[x] = team.attrib[x]
        output.append(info)
    return output
154708
def to_id(self):
        
        return "%s%s%s%s%s" % (TraceId.VERSION, TraceId.DELIMITER,
                               format(self.start_time, 'x'),
                               TraceId.DELIMITER, self.__number)
663768
def team_status(self, team, event):
        
        return Status(self._get('team/%s/event/%s/status' % (self.team_key(team), event)))
925467
def write_id (self):
        """"""
        self.writeln(u"<tr>")
        self.writeln(u'<td>%s</td>' % self.part("id"))
        self.write(u"<td>%d</td></tr>" % self.stats.number)
901425
def add_team(team)
      team = Team.new(team.to_s) unless team.is_a? Team
      raise "a team with a name similar to '#{team.name}' already exists" if self.get_team(team.name)
      @teams << team
      team
    end
114969
def users(self, team, params={}, **options): 
        
        path = "/teams/%s/users" % (team)
        return self.client.get_collection(path, params, **options)
51452
def select_team(team_id: nil, team_name: nil)
      t_id = (team_id || ENV['FASTLANE_ITC_TEAM_ID'] || '').strip
      t_name = (team_name || ENV['FASTLANE_ITC_TEAM_NAME'] || '').strip

      if t_name.length > 0 && t_id.length.zero? # we prefer IDs over names, they are unique
        puts("Looking for App Store Connect Team with name #{t_name}") if Spaceship::Globals.verbose?

        teams.each do |t|
          t_id = t['contentProvider']['contentProviderId'].to_s if t['contentProvider']['name'].casecmp(t_name).zero?
        end

        puts("Could not find team with name '#{t_name}', trying to fallback to default team") if t_id.length.zero?
      end

      t_id = teams.first['contentProvider']['contentProviderId'].to_s if teams.count == 1

      if t_id.length > 0
        puts("Looking for App Store Connect Team with ID #{t_id}") if Spaceship::Globals.verbose?

        # actually set the team id here
        self.team_id = t_id
        return self.team_id
      end

      # user didn't specify a team... #thisiswhywecanthavenicethings
      loop do
        puts("Multiple #{'App Store Connect teams'.yellow} found, please enter the number of the team you want to use: ")
        if ENV["FASTLANE_HIDE_TEAM_INFORMATION"].to_s.length == 0
          puts("Note: to automatically choose the team, provide either the App Store Connect Team ID, or the Team Name in your fastlane/Appfile:")
          puts("Alternatively you can pass the team name or team ID using the `FASTLANE_ITC_TEAM_ID` or `FASTLANE_ITC_TEAM_NAME` environment variable")
          first_team = teams.first["contentProvider"]
          puts("")
          puts("  itc_team_id \"#{first_team['contentProviderId']}\"")
          puts("")
          puts("or")
          puts("")
          puts("  itc_team_name \"#{first_team['name']}\"")
          puts("")
        end

        # We're not using highline here, as spaceship doesn't have a dependency to fastlane_core or highline
        teams.each_with_index do |team, i|
          puts("#{i + 1}) \"#{team['contentProvider']['name']}\" (#{team['contentProvider']['contentProviderId']})")
        end

        unless Spaceship::Client::UserInterface.interactive?
          puts("Multiple teams found on App Store Connect, Your Terminal is running in non-interactive mode! Cannot continue from here.")
          puts("Please check that you set FASTLANE_ITC_TEAM_ID or FASTLANE_ITC_TEAM_NAME to the right value.")
          raise "Multiple App Store Connect Teams found; unable to choose, terminal not interactive!"
        end

        selected = ($stdin.gets || '').strip.to_i - 1
        team_to_use = teams[selected] if selected >= 0

        if team_to_use
          self.team_id = team_to_use['contentProvider']['contentProviderId'].to_s # actually set the team id here
          return self.team_id
        end
      end
    end
1125916
def team_totals(self):
        
        if self.__team_tots is None:
            self.__team_tots = self.__comp_tot()
        
        return {
            t: self.__team_tots[t]['all']
            for t in [ 'home', 'away' ]
        }
997955
def requestTeam(self, team_name):
        
        if not team_name in self.requested:
            self.requested.append(team_name)
624019
def get_event_team(self, id, team_id, **data):
        
        
        return self.get("/events/{0}/teams/{0}/".format(id,team_id), data=data)
45702
def team(self, team, simple=False):
        
        return Team(self._get('team/%s%s' % (self.team_key(team), '/simple' if simple else '')))
1172577
public function team($teamId)
	{
		$team = $this->info['teams'];
		if (isset($team[$teamId]))
		{
			return $team[$teamId];
		}

		return null;
	}
830261
private static TeamInfo randomTeam(ArrayList<TeamInfo> list) {
    int index = random.nextInt(list.size());
    TeamInfo team = list.get(index);
    // If the selected team is expired, remove it and return a new team.
    long currTime = System.currentTimeMillis();
    if ((team.getEndTimeInMillis() < currTime) || team.numMembers() == 0) {
      System.out.println("\nteam " + team + " is too old; replacing.");
      System.out.println("start time: " + team.getStartTimeInMillis()
        + ", end time: " + team.getEndTimeInMillis()
        + ", current time:" + currTime);
      removeTeam(index);
      // Add a new team in its stead.
      return (addLiveTeam());
    } else {
      return team;
    }
  }
201790
def id_to_name(id):
    
    name = pdgid_names.get(id)
    if not name:
        name = repr(id)
    return name
738359
def get_team_players(self, team):
        
        team_id = self.team_names.get(team, None)
        try:
            req = self._get('teams/{}/'.format(team_id))
            team_players = req.json()['squad']
            if not team_players:
                click.secho("No players found for this team", fg="red", bold=True)
            else:
                self.writer.team_players(team_players)
        except APIErrorException:
            click.secho("No data for the team. Please check the team code.",
                        fg="red", bold=True)
564102
def update_group(self, group_id, name):
        
        parameters = {
            'name': name
        }

        url = self.TEAM_GROUPS_ID_URL % group_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)
        connection.add_header('Content-Type', 'application/json')
        connection.add_params(parameters)

        return connection.patch_request()