Set a new team ID which will be used from now on
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
787399
def get_team_info_by_team_id(self, start_at_team_id=None, **kwargs):
        
        if 'start_at_team_id' not in kwargs:
            kwargs['start_at_team_id'] = start_at_team_id
        url = self.__build_url(urls.GET_TEAM_INFO_BY_TEAM_ID, **kwargs)
        req = self.executor(url)
        if self.logger:
            self.logger.info('URL: {0}'.format(url))
        if not self.__check_http_err(req.status_code):
            return response.build(req, url, self.raw_mode)
1244253
public function renameTeam($teamUuid, $name)
    {
        $options = [
            'form_params' => [
                'name' => $name,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('put', "/teams/${teamUuid}", $options)
        );
    }
346711
function(teamIds, vars, cb) {
        app.talk('api/lol/' + app.settings.region + '/v2.4/team/' + teamIds, vars, cb, app.settings.region)
    }
295176
function addPlayerInTeam($login, $teamId)
	{
		switch($teamId)
		{
			case 0:
				if(array_search($login, $this->team2))
				{
					throw new \InvalidArgumentException();
				}
				if(!array_search($login, $this->team1))
				{
					$this->team1[] = $login;
				}
				break;
			case 1:
				if(array_search($login, $this->team1))
				{
					throw new \InvalidArgumentException();
				}
				if(!array_search($login, $this->team2))
				{
					$this->team2[] = $login;
				}
				break;
			default:
				throw new \InvalidArgumentException();
		}
	}
655487
def team_settings_edit_event(self, value=None):
        
        sender = self.sender()
        if value is None:
            value = sender.text()

        if sender is self.blue_name_lineedit:
            self.overall_config.set_value(TEAM_CONFIGURATION_HEADER, "Team Blue Name", value)
        elif sender is self.orange_name_lineedit:
            self.overall_config.set_value(TEAM_CONFIGURATION_HEADER, "Team Orange Name", value)
        elif sender is self.blue_color_spinbox:
            self.overall_config.set_value(TEAM_CONFIGURATION_HEADER, "Team Blue Color", value)
        elif sender is self.orange_color_spinbox:
            self.overall_config.set_value(TEAM_CONFIGURATION_HEADER, "Team Orange Color", value)

        if self.cfg_autosave_checkbutton.isChecked() and os.path.isfile(self.overall_config_path):
            self.save_overall_config(10)
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
997955
def requestTeam(self, team_name):
        
        if not team_name in self.requested:
            self.requested.append(team_name)
666123
def create_mypassword(self, data):
        """"""
        # http://teampasswordmanager.com/docs/api-my-passwords/#create_password
        log.info('Create MyPassword with %s' % data)
        NewID = self.post('my_passwords.json', data).get('id')
        log.info('MyPassword has been created with %s' % NewID)
        return NewID
1300456
def update(
            self, request, pk=None, parent_lookup_seedteam=None,
            parent_lookup_seedteam__organization=None):
        ''''''
        user = get_object_or_404(User, pk=pk)
        team = self.check_team_permissions(
            request, parent_lookup_seedteam,
            parent_lookup_seedteam__organization)
        team.users.add(user)
        return Response(status=status.HTTP_204_NO_CONTENT)
1216725
function setRequestId(id, cb) {
  var ns = getLoggerNamespace();
  ns.run(function() {
    ns.set('requestId', id);
    cb();
  });
}
296382
private void removeInactiveScopeOwnerByTeamId(String teamId) {
		if (!StringUtils.isEmpty(teamId)
				&& teamRepo.findByTeamId(teamId) != null) {
			ObjectId inactiveTeamId = teamRepo.findByTeamId(teamId).getId();
			if (inactiveTeamId != null) {
				teamRepo.delete(inactiveTeamId);
			}
		}
	}
885903
def refresh(self):
        """"""
        self._update_id_list()
        for _id in self.history[:]:
            if _id not in self.id_list:
                self.history.remove(_id)
464951
def update_team(self, slug):
        
        if self._org:
            if not self._org.has_team(slug):
                return self._org.update()
            return self._org.update_team(slug)
        # self._org is created during Trac startup, so there should never
        # be a case where we try to update an org before it's created; this
        # is a sanity check only.
        return False
874554
def set_id(self,my_id):
        
        if self.type == 'NAF':
            self.node.set('id',my_id)
        elif self.type == 'KAF':
            self.node.set('oid',my_id)
1170681
def start
      # Clear RTM connections
      storage.delete_all(teams_key)

      # Start a new connection for each team
      storage.get_all(tokens_key).each do |id, token|
        create(id, token)
      end
    end
698209
def team(self):
        """"""
        team_dict = self._json_data.get('team')
        if team_dict and team_dict.get('id'):
            return self._client.team(id=team_dict.get('id'))
        else:
            return None