Module: NBA::BoxScoreAdvancedV3
- Defined in:
- lib/nba/box_score_advanced_v3.rb
Overview
Provides methods to retrieve advanced box score statistics using V3 API
Constant Summary collapse
- BOX_SCORE_KEY =
Returns JSON key for advanced box score data.
"boxScoreAdvanced".freeze
- PLAYER_STATS =
Returns JSON key for player statistics.
"PlayerStats".freeze
- TEAM_STATS =
Returns JSON key for team statistics.
"TeamStats".freeze
Class Method Summary collapse
-
.player_stats(game:, start_period: 0, end_period: 0, client: CLIENT) ⇒ Collection
Retrieves advanced player box score stats for a game.
-
.team_stats(game:, start_period: 0, end_period: 0, client: CLIENT) ⇒ Collection
Retrieves advanced team box score stats for a game.
Class Method Details
.player_stats(game:, start_period: 0, end_period: 0, client: CLIENT) ⇒ Collection
Retrieves advanced player box score stats for a game
30 31 32 33 34 |
# File 'lib/nba/box_score_advanced_v3.rb', line 30 def self.player_stats(game:, start_period: 0, end_period: 0, client: CLIENT) game_id = Utils.extract_id(game) response = client.get(build_path(game_id, start_period, end_period)) parse_player_response(response, game_id) end |
.team_stats(game:, start_period: 0, end_period: 0, client: CLIENT) ⇒ Collection
Retrieves advanced team box score stats for a game
47 48 49 50 51 |
# File 'lib/nba/box_score_advanced_v3.rb', line 47 def self.team_stats(game:, start_period: 0, end_period: 0, client: CLIENT) game_id = Utils.extract_id(game) response = client.get(build_path(game_id, start_period, end_period)) parse_team_response(response, game_id) end |