Module: NBA::PlayerGameLog
- Defined in:
- lib/nba/player_game_log.rb
Overview
Provides methods to retrieve player game logs
Constant Summary collapse
- REGULAR_SEASON =
Regular season type
"Regular Season".freeze
- PLAYOFFS =
Playoffs season type
"Playoffs".freeze
Class Method Summary collapse
-
.find(player:, season: Utils.current_season, season_type: REGULAR_SEASON, client: CLIENT) ⇒ Collection
Retrieves game logs for a player.
Class Method Details
.find(player:, season: Utils.current_season, season_type: REGULAR_SEASON, client: CLIENT) ⇒ Collection
Retrieves game logs for a player
28 29 30 31 32 |
# File 'lib/nba/player_game_log.rb', line 28 def self.find(player:, season: Utils.current_season, season_type: REGULAR_SEASON, client: CLIENT) path = "playergamelog?PlayerID=#{Utils.extract_id(player)}&Season=#{Utils.format_season(season)}" \ "&SeasonType=#{season_type}" ResponseParser.parse(client.get(path)) { |data| build_game_log(data) } end |