10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/adapters/jumbotron/adapters/espn/nfl_helpers/line_acquisition_scope.rb', line 10
def call(game)
identities = Array(game.provider_identities)
event = identities.find { |identity| identity.object_namespace == "event" }
competition = identities.find { |identity| identity.object_namespace == "competition" }
return if event.nil? || event.provider_id.blank?
competition_id = competition&.provider_id.presence || event.provider_id
{
endpoint: :competition_odds,
acquisition: { event_id: event.provider_id, competition_id: competition_id }
}
end
|