Calls the playergamelog API and returns a PlayerGameLog resource.

 @param league_id [String]
 @param player_id [Integer]
 @param season [String]
 @param season_type [String]
 @return [NbaStats::Resources::PlayerGameLog]
493780
def player_game_log(
        player_id,
        season,
        season_type=NbaStats::Constants::SEASON_TYPE_REGULAR,
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::PlayerGameLog.new(
        get(PLAYER_GAME_LOG_PATH, {
            :Season => season,
            :LeagueID => league_id,
            :PlayerID => player_id,
            :SeasonType => season_type
        })
    )
    end
1101987
def football_data(season='1617', data_set='football_data'):
    
    league_dict = {'E0':0, 'E1':1, 'E2': 2, 'E3': 3, 'EC':4}
    def league2num(string):
        if isinstance(string, bytes):
            string = string.decode('utf-8')
        return league_dict[string]

    def football2num(string):
        if isinstance(string, bytes):
            string = string.decode('utf-8')
        if string in football_dict:
            return football_dict[string]
        else:
            football_dict[string] = len(football_dict)+1
            return len(football_dict)+1

    def datestr2num(s):
        import datetime
        from matplotlib.dates import date2num
        return date2num(datetime.datetime.strptime(s.decode('utf-8'),'%d/%m/%y'))
    data_set_season = data_set + '_' + season
    data_resources[data_set_season] = copy.deepcopy(data_resources[data_set])
    data_resources[data_set_season]['urls'][0]+=season + '/'
    start_year = int(season[0:2])
    end_year = int(season[2:4])
    files = ['E0.csv', 'E1.csv', 'E2.csv', 'E3.csv']
    if start_year>4 and start_year < 93:
        files += ['EC.csv']
    data_resources[data_set_season]['files'] = [files]
    if not data_available(data_set_season):
        download_data(data_set_season)
    start = True
    for file in reversed(files):
        filename = os.path.join(data_path, data_set_season, file)
        # rewrite files removing blank rows.
        writename = os.path.join(data_path, data_set_season, 'temp.csv')
        input = open(filename, encoding='ISO-8859-1')
        output = open(writename, 'w')
        writer = csv.writer(output)
        for row in csv.reader(input):
            if any(field.strip() for field in row):
                writer.writerow(row)
        input.close()
        output.close()
        table = np.loadtxt(writename,skiprows=1, usecols=(0, 1, 2, 3, 4, 5), converters = {0: league2num, 1: datestr2num, 2:football2num, 3:football2num}, delimiter=',')
        if start:
            X = table[:, :4]
            Y = table[:, 4:]
            start=False
        else:
            X = np.append(X, table[:, :4], axis=0)
            Y = np.append(Y, table[:, 4:], axis=0)
    return data_details_return({'X': X, 'Y': Y, 'covariates': [discrete(league_dict, 'league'), datenum('match_day'), discrete(football_dict, 'home team'), discrete(football_dict, 'away team')], 'response': [integer('home score'), integer('away score')]}, data_set)
745295
def draft_combine_non_stationary_shooting(
        season_year,
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::DraftCombineNonStationaryShooting.new(
          get(DRAFT_COMBINE_NON_STATIONARY_SHOOTING_PATH, {
              :LeagueID => league_id,
              :SeasonYear => season_year
          })
      )
    end
1030947
function getPlayerTopKills(playerId, opts, cb) {
  // https://gameinfo.albiononline.com/api/gameinfo/players/Nubya8P6QWGhI6hDLQHIQQ
  opts = opts || {};
  query = "?";
  if(opts.limit) {
    query += `limit=${opts.limit}`;
  }
  if(opts.offset) {
    query += `offset=${opts.offset}`;
  }
  if(opts.range) { // week, lastWeek, month, lastMonth
    query += `range=${opts.range}`;
  }
  baseRequest(`/players/${playerId}/topkills${query}`, cb);
}
892972
def report_player(player)
      result = {}
      plugins.each {|each| result.merge!(each.report(player))}
      result
    end
663083
def team_info_common(
        team_id,
        season,
        season_type=NbaStats::Constants::SEASON_TYPE_REGULAR,
        league_id=NbaStats::Constants::LEAGUE_ID_NBA
    )
      NbaStats::Resources::TeamInfoCommon.new(
          get(TEAM_INFO_COMMON_PATH, {
              :Season => season,
              :SeasonType => season_type,
              :LeagueID => league_id,
              :TeamID => team_id
          })
      )
    end
221235
public AggregatedStats getAggregatedStats(long id, GameMode gameMode, Season season) {
        return client.sendRpcAndWait(SERVICE, "getAggregatedStats", id, gameMode, season.numeric);
    }
700190
def ladderPlayerInfo(cfg, playerName, getMatchHistory=False):
    """"""
    payload = json.dumps([playerName, getMatchHistory]) # if playerName == None, info on all players is retrieved
    ladder = cfg.ladder
    return requests.post(
        url  = c.URL_BASE%(ladder.ipAddress, ladder.serverPort, "playerstats"),
        data = payload,
        #headers=headers,
    )
1239214
def get_projected_player_game_stats_by_team(self, season, week, team_id):
        
        result = self._method_call("PlayerGameProjectionStatsByTeam/{season}/{week}/{team_id}", "projections", season=season, week=week, team_id=team_id)
        return result
596487
def get_projected_fantasy_defense_game_stats_by_week(self, season, week):
        
        result = self._method_call("FantasyDefenseProjectionsByGame/{season}/{week}", "projections", season=season, week=week)
        return result
966012
public EndOfGameStats getTeamEndOfGameStats(TeamId teamId, long gameId) {
        return client.sendRpcAndWait(SERVICE, "getTeamEndOfGameStats", teamId, gameId);
    }
952641
def player_mode_stats(self, player_handle, game_mode=constants.GAME_MODE_WILDCARD, game_region=constants.GAME_REGION_WILDCARD):
        
        if game_mode not in constants.GAME_MODES:
            raise APIException("game_mode must be one of: solo, duo, squad, all")
        if game_region not in constants.GAME_REGIONS:
            raise APIException("game_region must be one of: as, na, agg, sea, eu, oc, sa, all")
        try:
            data = self._get_player_profile(player_handle)
            data = self._filter_gameplay_stats(data, game_mode, game_region)
            return data
        except BaseException as error:
            print('Unhandled exception: ' + str(error))
            raise
152050
def get_games_by_season(self, season):
        
        try:
            season = int(season)
        except ValueError:
            raise FantasyDataError('Error: Invalid method parameters')

        result = self._method_call("Games/{season}", "stats", season=season)
        return result
1101487
function YahooFantasy() {
  this.GET = 'get';
  this.POST = 'post';

  this.game = new GameResource(this);
  this.games = new GamesCollection(this);
  this.league = new LeagueResource(this);
  this.leagues = new LeaguesCollection(this);
  this.player = new PlayerResource(this);
  this.players = new PlayersCollection(this);
  this.team = new TeamResource(this);
  this.teams = new TeamsCollection(this);
  this.transaction = new TransactionResource(this);
  this.transactions = new TransactionsCollection(this);
  this.roster = new RosterResource(this);
  this.user = new UserResource(this);
  // this.users = new UsersCollection(); // TODO
  
  this.yuser = {
    token: null
  };
}
1340950
def standings(self, league_table, league):
        """"""
        headers = ['Position', 'Team Name', 'Games Played', 'Goal For',
                   'Goals Against', 'Goal Difference', 'Points']
        result = [headers]
        result.extend([team['position'],
                       team['team']['name'],
                       team['playedGames'],
                       team['goalsFor'],
                       team['goalsAgainst'],
                       team['goalDifference'],
                       team['points']]
                       for team in league_table['standings'][0]['table'])
        self.generate_output(result)
526999
def standings(self, league_table, league):
        """"""
        data = []
        for team in league_table['standings'][0]['table']:
            item = {'position': team['position'],
                    'teamName': team['team'],
                    'playedGames': team['playedGames'],
                    'goalsFor': team['goalsFor'],
                    'goalsAgainst': team['goalsAgainst'],
                    'goalDifference': team['goalDifference'],
                    'points': team['points']}
            data.append(item)
        self.generate_output({'standings': data})
1038189
def _log_players(self, players):
        
        self._logln('players: {0}'.format(len(players)))
        for p in self._players:
            self._logln('name: {0}, color: {1}, seat: {2}'.format(p.name, p.color, p.seat))