Module: Api::StaticSportEventInformation

Included in:
Betradar::Client
Defined in:
lib/betradar/api/static_sport_event_information.rb

Instance Method Summary collapse

Instance Method Details

#fixture(event_id, event_type = 'sr:match') ⇒ Object

Fixture for a specified sport event



4
5
6
# File 'lib/betradar/api/static_sport_event_information.rb', line 4

def fixture(event_id, event_type = 'sr:match')
  get("sports/en/sport_events/#{event_type}:#{event_id}/fixture.xml")
end

#fixture_changesObject

Lists the IDs of all fixtures that have changed in the last 24 hours.



26
27
28
# File 'lib/betradar/api/static_sport_event_information.rb', line 26

def fixture_changes
  get('sports/en/fixtures/changes.xml')
end

#live_scheduleObject

Currently live sport events



16
17
18
# File 'lib/betradar/api/static_sport_event_information.rb', line 16

def live_schedule
  get('sports/en/schedules/live/schedule.xml')
end

#schedules(schedule_date = nil) ⇒ Object

All sport events for a specific date



9
10
11
12
13
# File 'lib/betradar/api/static_sport_event_information.rb', line 9

def schedules(schedule_date = nil)
  schedule_date ||= Time.zone.today
  schedule_date = Time.zone.parse(schedule_date.to_s).to_date.to_s
  get("sports/en/schedules/#{schedule_date}/schedule.xml")
end

#tournament_schedule(tournament_uid) ⇒ Object

Schedule for a tournament



21
22
23
# File 'lib/betradar/api/static_sport_event_information.rb', line 21

def tournament_schedule(tournament_uid)
  get("sports/en/tournaments/#{tournament_uid}/schedule.xml")
end