Module: NBA::CumeStatsPlayer
- Defined in:
- lib/nba/cume_stats_player.rb
Overview
Provides methods to retrieve cumulative player statistics
Defined Under Namespace
Modules: GameAttributes, TotalAttributes
Constant Summary collapse
- GAME_BY_GAME_STATS =
Result set name for game-by-game stats
"GameByGameStats".freeze
- TOTAL_PLAYER_STATS =
Result set name for total player stats
"TotalPlayerStats".freeze
Class Method Summary collapse
-
.find(player:, game_ids:, season:, season_type: "Regular Season", league: League::NBA, client: CLIENT) ⇒ Hash?
Retrieves cumulative player statistics for specific games.
Class Method Details
.find(player:, game_ids:, season:, season_type: "Regular Season", league: League::NBA, client: CLIENT) ⇒ Hash?
Retrieves cumulative player statistics for specific games
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nba/cume_stats_player.rb', line 39 def self.find(player:, game_ids:, season:, season_type: "Regular Season", league: League::NBA, client: CLIENT) player_id = Utils.extract_id(player) league_id = Utils.extract_league_id(league) game_ids_param = format_game_ids(game_ids) path = "cumestatsplayer?PlayerID=#{player_id}&GameIDs=#{game_ids_param}" \ "&LeagueID=#{league_id}&Season=#{season}&SeasonType=#{season_type}" response = client.get(path) parse_response(response) end |