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