Retrieve post-game stats for a team
@param teamId The id of the team
@param gameId The if of the game
@return Post-game stats
966012
public EndOfGameStats getTeamEndOfGameStats(TeamId teamId, long gameId) {
        return client.sendRpcAndWait(SERVICE, "getTeamEndOfGameStats", teamId, gameId);
    }
243851
def play_by_play(
        game_id,
        start_period=0,
        end_period=0
    )
      NbaStats::Resources::PlayByPlay.new(
          get(PLAY_BY_PLAY_PATH, {
              :GameID => game_id,
              :StartPeriod => start_period,
              :EndPeriod => end_period
          })
      )
    end
1206921
public function index($teamId)
    {
        $team = Team::findOrFail($teamId);
        $this->authorize('view', $team);
        return $this->respondRelatedPhones($teamId, 'team');
    }
753967
def team_id(team, org)
      /^\d+$/.match(team.to_s) ? team : team_id_by_slug(team, org)
    end
323131
def roster(team_id):
    """"""
    data = mlbgame.data.get_roster(team_id)
    parsed = json.loads(data.read().decode('utf-8'))
    players = parsed['roster_40']['queryResults']['row']
    return {'players': players, 'team_id': team_id}
366179
public function getTeamMembers($teamId)
    {
        $team = $this->sugarBean->getBean('Teams', $teamId);
        $users = $team->get_team_members();

        foreach ($users as $key => $user) {
            $users[$key] = $user->fetched_row;
        }

        return $users;
    }
889344
public function player($playerId)
	{
		if ( ! isset($this->info['fellowPlayers']))
		{
			// no players
			return null;
		}
		$players = $this->info['fellowPlayers'];
		if (isset($players[$playerId]))
		{
			return $players[$playerId];
		}

		return null;
	}
1242809
def parse_standings(opt={})
      begin
        url = ParamsBuilder.build_link(opt)
        xml = fetch(url,"standings")
        data = []
        xml.xpath("//team").each do |inf|
        c = ScheduleLine.new

        inf.children.each do |child|
          if(child.is_a?(Nokogiri::XML::Element))
            #puts "#{child.name} - #{child.text}"
            #c.create_line({:name => child.name, :text => child.text})
            c.send("create_#{child.name}", child.text)

          end

          #c.send("#{child.name.to_s}=",child['data'])
        end
        data << c

        end
        return data
      rescue => e
        raise e
      end
    end
644554
public List<ChampionStatInfo> retrieveTopPlayedChampions(long accId, GameMode mode) {
        return client.sendRpcAndWait(SERVICE, "retrieveTopPlayedChampions", accId, mode);
    }
465584
def player_career_stats(
        player_id,
        per_mode=NbaStats::Constants::PER_MODE_TOTALS,
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::PlayerCareerStats.new(
          get(PLAYER_CAREER_STATS_PATH, {
              :PlayerID => player_id,
              :LeagueID => league_id,
              :PerMode => per_mode
          })
      )
    end
1099128
public function getEndStats($region, $gameId)
    {
        $filePath = $this->getReplayDirPath($region, $gameId) . '/endstats';

        if (!is_file($filePath)) {
            throw new ReplayEndStatsNotFoundException('The endstats for game #' . $gameId . ' is not found');
        }

        return $filePath;
    }
404537
def roster(team_id):
    """"""
    data = mlbgame.info.roster(team_id)
    return mlbgame.info.Roster(data)
42704
@RequestMapping(value = "/team/{teamId}", method = GET, produces = APPLICATION_JSON_VALUE)
    public DataResponse<Team> team(
            @RequestParam(value = "component", required = true) String cId,
            @PathVariable String teamId) {
        ObjectId componentId = new ObjectId(cId);
        return this.teamService.getTeam(componentId, teamId);
    }
977265
public Future<Map<String, List<LeagueList>>> getLeagues(String... teamIds) {
        return new ApiFuture<>(() -> handler.getLeagues(teamIds));
    }
596059
public Team kickPlayer(long summonerId, TeamId teamId) {
        return client.sendRpcAndWait(SERVICE, "kickPlayer", summonerId, teamId);
    }
59562
def player_stats(game_id):
    """"""
    # get information for that game
    data = mlbgame.stats.player_stats(game_id)
    return mlbgame.stats.Stats(data, game_id, True)
1077789
function(){
            // Compute team Wins, Losts, Draws and Goal-Sum
            /*
                // Uses the key as the teamId
                {
                         1: {P: x, S: y, [...]},
                    teamId: {P: x, S: y, [...]}
                 }
            */
            var rawTable = {};
            var _default = {rank: 0, teamId: 0, P: 0, goalsMade: 0, goalsTaken: 0, S: 0, W: 0, D: 0, L: 0, score: 0};

            for(var k in this.matches){
                var match = this.matches[k];

                // Compute game points for both teams
                computeGame(match, match.teamAId, match.teamAScore, match.teamBScore);
                computeGame(match, match.teamBId, match.teamBScore, match.teamAScore);
            }

            // Adds game to the teamId. Should be runned twice for each
            // side of match (teamA and teamB).
            function computeGame(match, teamId, goalsMade, goalsTaken){
                // Skip empty id's
                if(!teamId)
                    return;

                // Generate default template if NOT in array yet
                if(!rawTable[teamId]){
                    var teamRow = _.clone(_default);
                    // Keeps team id under team
                    teamRow.teamId = teamId;
                    // Inserts team in rawTable
                    rawTable[teamId] = teamRow;
                }

                // Get teamRow (it is supposed to exist)
                var teamRow = rawTable[teamId];

                // Compute points ONLY if match is not 'scheduled'
                // logycaly, it's 'ended' or 'playing', so we compute it
                if(match.state == 'scheduled')
                    return;

                // Increment Plays
                teamRow.P++;

                // Compute goals made/taken
                teamRow.goalsMade += goalsMade*1;
                teamRow.goalsTaken += goalsTaken*1;

                // Win
                if(goalsMade > goalsTaken)
                    teamRow.W ++;
                // Loose
                else if(goalsMade < goalsTaken)
                    teamRow.L ++;
                // Drew
                else
                    teamRow.D ++;
            }

            // Compute 'final score' and add column S (goalsMade:goalsTaken)
            // Transfer data to final table array
            var finalTable = [];
            _.forEach(rawTable, function(row){
                row.score = row.W*3 + row.D*1;
                row.S = row.goalsMade*1 + ':' + row.goalsTaken*1;
                row.GD = row.goalsMade*1 - row.goalsTaken*1;

                finalTable.push(row);
            });

            // Sort by 'score' field
            finalTable = _.sortBy(finalTable, 'score').reverse();

            // Rank Table
            var pos = 0;
            var lastScore = -1;

            _.forEach(finalTable, function(row){
                // Keeps the same ranking if scores is the same
                if(lastScore != row.score){
                    pos++;
                    lastScore = row.score;
                }

                row.rank = pos;
            });


            return finalTable;


        }