Get team ID using a real team name
        @return: id
19554
def team_id(self,team):
        '''
        
        '''
        #UTF-8 comparison
        headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain",'Referer': 'http://'+self.domain+'/',"User-Agent": user_agent}
        req = self.session.get('http://'+self.domain,headers=headers).content
        soup = BeautifulSoup(req)
        for i in soup.find('table',cellpadding=2).find_all('tr'):
            #Get teamid from the bets
            team1 = i.find('a')['title']
            team2 = i.find_all('a')[1]['title']
            if (team == team1):
                return i.find('a')['href'].split('cid=')[1]
            elif (team == team2):
                return i.find_all('a')[1]['href'].split('cid=')[1]
        return None
1298298
def get_teams(self):
        
        return self.make_request(host="erikberg.com", sport='nba',
                                 method="teams", id=None,
                                 format="json",
                                 parameters={})
696306
def _get_team_attribute(cls, soup, team_type, name):
        
        if soup.find('team'):
            return soup.find("team", type=team_type)[name]
        return MlbamConst.UNKNOWN_FULL
692720
def current(self):
        
        rankings_dict = {}

        for team in self.current_extended:
            rankings_dict[team['abbreviation']] = team['rank']
        return rankings_dict
428831
public function getPersonTeamLinkIds()
    {
        if (null === $this->person_team_link_ids_unserialized) {
            $this->person_team_link_ids_unserialized = array();
        }
        if (!$this->person_team_link_ids_unserialized && null !== $this->person_team_link_ids) {
            $person_team_link_ids_unserialized = substr($this->person_team_link_ids, 2, -2);
            $this->person_team_link_ids_unserialized = $person_team_link_ids_unserialized ? explode(' | ', $person_team_link_ids_unserialized) : array();
        }

        return $this->person_team_link_ids_unserialized;
    }
271396
def get_identity(identity):
    """"""
    return flask.Response(
        json.dumps(
            {
                'identity': {
                    'id': identity.id,
                    'etag': identity.etag,
                    'name': identity.name,
                    'fullname': identity.fullname,
                    'email': identity.email,
                    'timezone': identity.timezone,
                    'teams': _encode_dict(identity.teams)
                }
            }
        ), 200,
        headers={'ETag': identity.etag},
        content_type='application/json'
    )
1290541
def id(self):
        
        if self._id is None:
            self._id = int(self._element.get('id'))
        return self._id
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
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!')
1058982
def members(self):
        
        resp = self._rtm_client.get('v1/current_team.members?all=true')
        if resp.is_fail():
            raise RTMServiceError(
                'Failed to get members of current team',
                resp
            )
        return resp.data['result']
624019
def get_event_team(self, id, team_id, **data):
        
        
        return self.get("/events/{0}/teams/{0}/".format(id,team_id), data=data)
765284
def team_id=(team_id)
      # First, we verify the team actually exists, because otherwise iTC would return the
      # following confusing error message
      #
      #     invalid content provider id
      #
      available_teams = teams.collect do |team|
        {
          team_id: (team["contentProvider"] || {})["contentProviderId"],
          team_name: (team["contentProvider"] || {})["name"]
        }
      end

      result = available_teams.find do |available_team|
        team_id.to_s == available_team[:team_id].to_s
      end

      unless result
        error_string = "Could not set team ID to '#{team_id}', only found the following available teams:\n\n#{available_teams.map { |team| "- #{team[:team_id]} (#{team[:team_name]})" }.join("\n")}\n"
        raise Tunes::Error.new, error_string
      end

      response = request(:post) do |req|
        req.url("ra/v1/session/webSession")
        req.body = {
          contentProviderId: team_id,
          dsId: user_detail_data.ds_id # https://github.com/fastlane/fastlane/issues/6711
        }.to_json
        req.headers['Content-Type'] = 'application/json'
      end

      handle_itc_response(response.body)

      @current_team_id = team_id
    end
365233
private static synchronized TeamInfo addLiveTeam() {
    String teamName = randomElement(COLORS) + randomElement(ANIMALS);
    String robot = null;
    // Decide if we want to add a robot to the team.
    if (random.nextInt(ROBOT_PROBABILITY) == 0) {
      robot = "Robot-" + random.nextInt(NUM_ROBOTS);
    }
    // Create the new team.
    TeamInfo newTeam = new TeamInfo(teamName, System.currentTimeMillis(), robot);
    liveTeams.add(newTeam);
    System.out.println("[+" + newTeam + "]");
    return newTeam;
  }
596162
def update_team_name(self, name):
        ''' 

        '''
        request = self._get_request()
        return request.post(self.TEAM_UPDATE_URL, {"name": name})
670172
def _get_name(self):
        
        if self._name is None:
            self._name = self._generate_name()
        return self._name
160738
def forum_id(self):
        """"""
        html = self.request(self.team_url).text
        soup = BeautifulSoup(html)
        return soup.find(id='forum_id').attrs['value']
1132536
def teams(self):
        """"""
        teams = {}
        default_team = 1
        for i in range(1, self._header.replay.num_players):
            attributes = self._header.initial.players[i].attributes
            team = self._header.lobby.teams[i - 1]
            if team == 1:
                team = default_team
                default_team += 1
            if team not in teams:
                teams[team] = {'player_numbers': []}
            teams[team]['player_numbers'].append(attributes.player_color + 1)
        return list(teams.values())