Module: AhlScraper::Games

Defined in:
lib/ahl_scraper/games.rb,
lib/ahl_scraper/games/events.rb,
lib/ahl_scraper/resources/games/goal.rb,
lib/ahl_scraper/resources/games/info.rb,
lib/ahl_scraper/resources/games/star.rb,
lib/ahl_scraper/resources/games/team.rb,
lib/ahl_scraper/resources/games/coach.rb,
lib/ahl_scraper/resources/games/goalie.rb,
lib/ahl_scraper/resources/games/period.rb,
lib/ahl_scraper/resources/games/skater.rb,
lib/ahl_scraper/resources/games/penalty.rb,
lib/ahl_scraper/resources/games/referee.rb,
lib/ahl_scraper/resources/games/overtime.rb,
lib/ahl_scraper/resources/games/events/shot.rb,
lib/ahl_scraper/resources/games/penalty_shot.rb,
lib/ahl_scraper/resources/games/on_ice_skater.rb,
lib/ahl_scraper/resources/games/shootout_attempt.rb,
lib/ahl_scraper/services/games/time_splits_service.rb,
lib/ahl_scraper/services/games/penalty_shots_service.rb,
lib/ahl_scraper/services/games/create_skaters_service.rb,
lib/ahl_scraper/services/games/on_ice_statlines_service.rb,
lib/ahl_scraper/services/games/penalty_statlines_service.rb,
lib/ahl_scraper/services/games/scoring_statlines_service.rb,
lib/ahl_scraper/services/games/team_on_ice_goals_service.rb,
lib/ahl_scraper/services/games/shootout_statlines_service.rb,
lib/ahl_scraper/services/games/penalty_shot_statlines_service.rb

Defined Under Namespace

Modules: Events Classes: Coach, CreateSkatersService, Goal, Goalie, Info, OnIceSkater, OnIceStatlinesService, Overtime, Penalty, PenaltyShot, PenaltyShotStatlinesService, PenaltyShotsService, PenaltyStatlinesService, Period, Referee, ScoringStatlinesService, ShootoutAttempt, ShootoutStatlinesService, Skater, Star, Team, TeamOnIceGoalsService, TimeSplitsService

Class Method Summary collapse

Class Method Details

.list(season_id) ⇒ Object



41
42
43
# File 'lib/ahl_scraper/games.rb', line 41

def list(season_id)
  @season_games[season_id.to_s] ||= SeasonGameIdsFetcher.new(season_id).call&.map { |game_data| GameListItem.new(game_data) }
end

.retrieve(game_id, season_type = nil) ⇒ Object



37
38
39
# File 'lib/ahl_scraper/games.rb', line 37

def retrieve(game_id, season_type = nil)
  Game.new(game_id, season_type: season_type)
end