Class: NBA::TeamSeasonRank

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/nba/team_season_rank.rb

Overview

Represents team season rankings from the TeamInfoCommon endpoint

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ast_pgFloat?

Returns the assists per game

Examples:

rank.ast_pg #=> 28.7


82
# File 'lib/nba/team_season_rank.rb', line 82

attribute :ast_pg, Shale::Type::Float

#ast_rankInteger?

Returns the assists per game rank

Examples:

rank.ast_rank #=> 3


74
# File 'lib/nba/team_season_rank.rb', line 74

attribute :ast_rank, Shale::Type::Integer

#league_idString?

Returns the league ID

Examples:

rank.league_id #=> "00"


18
# File 'lib/nba/team_season_rank.rb', line 18

attribute :league_id, Shale::Type::String

#opp_pts_pgFloat?

Returns the opponent points per game

Examples:

rank.opp_pts_pg #=> 115.2


98
# File 'lib/nba/team_season_rank.rb', line 98

attribute :opp_pts_pg, Shale::Type::Float

#opp_pts_rankInteger?

Returns the opponent points per game rank

Examples:

rank.opp_pts_rank #=> 15


90
# File 'lib/nba/team_season_rank.rb', line 90

attribute :opp_pts_rank, Shale::Type::Integer

#pts_pgFloat?

Returns the points per game

Examples:

rank.pts_pg #=> 118.9


50
# File 'lib/nba/team_season_rank.rb', line 50

attribute :pts_pg, Shale::Type::Float

#pts_rankInteger?

Returns the points per game rank

Examples:

rank.pts_rank #=> 5


42
# File 'lib/nba/team_season_rank.rb', line 42

attribute :pts_rank, Shale::Type::Integer

#reb_pgFloat?

Returns the rebounds per game

Examples:

rank.reb_pg #=> 44.2


66
# File 'lib/nba/team_season_rank.rb', line 66

attribute :reb_pg, Shale::Type::Float

#reb_rankInteger?

Returns the rebounds per game rank

Examples:

rank.reb_rank #=> 12


58
# File 'lib/nba/team_season_rank.rb', line 58

attribute :reb_rank, Shale::Type::Integer

#season_idString?

Returns the season ID

Examples:

rank.season_id #=> "2024-25"


26
# File 'lib/nba/team_season_rank.rb', line 26

attribute :season_id, Shale::Type::String

#team_idInteger?

Returns the team ID

Examples:

rank.team_id #=> 1610612744


34
# File 'lib/nba/team_season_rank.rb', line 34

attribute :team_id, Shale::Type::Integer

Instance Method Details

#teamTeam?

Returns the team associated with this rank

Examples:

rank.team #=> #<NBA::Team ...>


106
107
108
# File 'lib/nba/team_season_rank.rb', line 106

def team
  Teams.find(team_id)
end