Module: NBA::TeamGameLog
- Defined in:
- lib/nba/team_game_log.rb
Overview
Provides methods to retrieve team game logs
Constant Summary collapse
- REGULAR_SEASON =
Regular season type
"Regular Season".freeze
- PLAYOFFS =
Playoffs season type
"Playoffs".freeze
Class Method Summary collapse
-
.find(team:, season: Utils.current_season, season_type: REGULAR_SEASON, client: CLIENT) ⇒ Collection
Retrieves game logs for a team.
Class Method Details
.find(team:, season: Utils.current_season, season_type: REGULAR_SEASON, client: CLIENT) ⇒ Collection
Retrieves game logs for a team
30 31 32 33 34 35 36 |
# File 'lib/nba/team_game_log.rb', line 30 def self.find(team:, season: Utils.current_season, season_type: REGULAR_SEASON, client: CLIENT) team_id = extract_team_id(team) season_str = Utils.format_season(season) path = build_path(team_id, season_str, season_type) response = client.get(path) parse_response(response) end |