Module: NBA::TeamYearByYearStats
- Defined in:
- lib/nba/team_year_by_year_stats.rb
Overview
Provides methods to retrieve team year-by-year statistics
Constant Summary collapse
- TEAM_STATS =
Result set name for team stats
"TeamStats".freeze
- REGULAR_SEASON =
Season type constant for regular season
"Regular Season".freeze
- PLAYOFFS =
Season type constant for playoffs
"Playoffs".freeze
- PER_GAME =
Per mode constant for per game stats
"PerGame".freeze
- TOTALS =
Per mode constant for totals
"Totals".freeze
Class Method Summary collapse
-
.find(team:, season_type: REGULAR_SEASON, per_mode: PER_GAME, client: CLIENT) ⇒ Collection
Retrieves year-by-year statistics for a team.
Class Method Details
.find(team:, season_type: REGULAR_SEASON, per_mode: PER_GAME, client: CLIENT) ⇒ Collection
Retrieves year-by-year statistics for a team
41 42 43 44 45 46 |
# File 'lib/nba/team_year_by_year_stats.rb', line 41 def self.find(team:, season_type: REGULAR_SEASON, per_mode: PER_GAME, client: CLIENT) team_id = extract_team_id(team) path = build_path(team_id, season_type, per_mode) response = client.get(path) parse_response(response) end |