Module: NBA::BoxScoreDefensiveV2
- Defined in:
- lib/nba/box_score_defensive_v2.rb
Overview
Provides methods to retrieve defensive statistics for a game
Constant Summary collapse
- PLAYER_STATS =
Result set name for player stats
"PlayerStats".freeze
- TEAM_STATS =
Result set name for team stats
"TeamStats".freeze
Class Method Summary collapse
-
.player_stats(game:, client: CLIENT) ⇒ Collection
Retrieves defensive statistics for players in a game.
-
.team_stats(game:, client: CLIENT) ⇒ Collection
Retrieves defensive statistics for teams in a game.
Class Method Details
.player_stats(game:, client: CLIENT) ⇒ Collection
Retrieves defensive statistics for players in a game
28 29 30 31 32 33 |
# File 'lib/nba/box_score_defensive_v2.rb', line 28 def self.player_stats(game:, client: CLIENT) game_id = Utils.extract_id(game) path = "boxscoredefensivev2?GameID=#{game_id}" response = client.get(path) parse_player_response(response, game_id) end |
.team_stats(game:, client: CLIENT) ⇒ Collection
Retrieves defensive statistics for teams in a game
44 45 46 47 48 49 |
# File 'lib/nba/box_score_defensive_v2.rb', line 44 def self.team_stats(game:, client: CLIENT) game_id = Utils.extract_id(game) path = "boxscoredefensivev2?GameID=#{game_id}" response = client.get(path) parse_team_response(response, game_id) end |