Module: SymbolDefaults

Defined in:
lib/espnscrape/SymbolDefaults.rb

Overview

Field Symbol Defaults for Array Type Conversion

Constant Summary collapse

S_BOX_P =
Note:
Team ID, ESPN Player ID, Player Name (short), Position, Minutes, Field Goals Made, Field Goals Attempted, 3P Made, 3P Attempted, Free Throws Made, Free Throws Attempted, Offensive Rebounds, Defensive Rebounds, Total Rebounds, Assists, Steals, Blocks, Turnovers, Personal Fouls, Plus/Minus, Points, Starter?
[:team, :id, :name, :position, :minutes, :fgm, :fga, :tpm, :tpa, :ftm, :fta, :oreb, :dreb, :rebounds, :assists, :steals, :blocks, :turnovers, :fouls, :plusminus, :points, :starter]
S_BOX_T =
Note:
Team ID, Field Goals Made, Field Goals Attempted, 3P Made, 3P Attempted, Free Throws Made, Free Throws Attempted, Offensive Rebounds, Defensive Rebounds, Total Rebounds, Assists, Steals, Blocks, Turnovers, Personal Fouls, Plus/Minus, Points, Starter?
[:team, :fgm, :fga, :tpm, :tpa, :ftm, :fta, :oreb, :dreb, :rebounds, :assists, :steals, :blocks, :turnovers, :fouls, :points]
S_GAME_F =
Note:

Field Symbols for NbaSchedule#futureGames

Team ID, Game #, Game Date, Home Game?, Opponent ID, Game Time, Televised?, Game DateTime, Season Type
[:team, :game_num, :date, :home, :opponent, :time,  :tv, :datetime, :season_type]
S_GAME_P =
Note:

Field Symbols for NbaSchedule#pastGames

Team ID, Game #, Game Date, Home Game?, Opponent ID, Win?, Team Score, Opp Score, Boxscore ID, Wins, Losses, Game DateTime, Season Type
[:team, :game_num, :date, :home, :opponent, :win, :team_score, :opp_score, :boxscore_id, :wins, :losses, :datetime, :season_type]
S_ROSTER =
Note:

Field Symbols for NbaRoster#players

Team ID, Jersey #, Player Name, ESPN Player ID, Position, Age, Height ft, Height in, Weight, College, Salary
[:team, :jersey, :name, :id, :position, :age, :height_ft, :height_in, :weight, :college, :salary]
S_TEAM =
Note:

Field Symbols for NbaTeamList#teamList

Team ID, Team Name, Division, Conference
[:team, :name, :division, :conference]

Instance Method Summary collapse

Instance Method Details

#defaultFormat(f_mat) ⇒ Object

Returns a default structure format



28
29
30
# File 'lib/espnscrape/SymbolDefaults.rb', line 28

def defaultFormat(f_mat)
  return f_mat if [:to_structs, :to_hashes].any? { |x| x.eql?(f_mat) }
end