Module: NBA::BoxScoreHustle
- Defined in:
- lib/nba/box_score_hustle.rb
Overview
Provides methods to retrieve hustle 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 hustle statistics for players in a game.
-
.team_stats(game:, client: CLIENT) ⇒ Collection
Retrieves hustle statistics for teams in a game.
Class Method Details
.player_stats(game:, client: CLIENT) ⇒ Collection
Retrieves hustle statistics for players in a game
28 29 30 31 32 33 |
# File 'lib/nba/box_score_hustle.rb', line 28 def self.player_stats(game:, client: CLIENT) game_id = Utils.extract_id(game) path = "boxscorehustlev2?GameID=#{game_id}" response = client.get(path) parse_player_response(response, game_id) end |
.team_stats(game:, client: CLIENT) ⇒ Collection
Retrieves hustle statistics for teams in a game
44 45 46 47 48 49 |
# File 'lib/nba/box_score_hustle.rb', line 44 def self.team_stats(game:, client: CLIENT) game_id = Utils.extract_id(game) path = "boxscorehustlev2?GameID=#{game_id}" response = client.get(path) parse_team_response(response, game_id) end |