10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/adapters/jumbotron/adapters/espn/nfl_helpers/acquisition_scope.rb', line 10
def call(game)
group = game.schedule_group
return if group.nil? || group.kind != "week" || group.number.nil?
year = Integer(game.season.name)
season_type = SeasonPhase.espn_season_type(game.season_phase&.name)
return if season_type.nil?
{
endpoint: :scoreboard,
acquisition: { dates: year, season_type: season_type, week: group.number }
}
rescue ArgumentError, TypeError
nil
end
|