Module: Api::LiveSportEventInformation

Included in:
RTS::Client
Defined in:
lib/rts/api/live_sport_event_information.rb

Instance Method Summary collapse

Instance Method Details

#live_match_feed(sport:, id:, sequence: nil) ⇒ Object

MATCH FEED Current live match feed. Resource always shows last sequence delta against previous one, if you don’t request specific one. Delta sequence represents changed markets and match info. GET/sport/live/matches/id/feed?sequence



25
26
27
# File 'lib/rts/api/live_sport_event_information.rb', line 25

def live_match_feed(sport:, id:, sequence: nil)
  get("#{sport}/live/matches/#{id}/feed?sequence=#{sequence}")
end

#live_match_state(sport:, id:, sequence: nil, expand: nil) ⇒ Object

MATCH STATE Current live match state. Resource always shows last sequence state, if you don’t set it. It provides complete match state for sequence, so you can reconstruct your data, when you miss a lot of sequences. GET/sport/live/matches/id/state?sequence,expand



17
18
19
# File 'lib/rts/api/live_sport_event_information.rb', line 17

def live_match_state(sport:, id:, sequence: nil, expand: nil)
  get("#{sport}/live/matches/#{id}/state?sequence=#{sequence}&expand=#{expand}")
end

#live_match_statistics_feed(sport:, id:, sequence: nil) ⇒ Object

MATCH STATISTICS FEED Current live match statistics feed. Resource always shows last sequence delta against previous one, if you don’t request specific one. Delta sequence represents changed markets and match info. GET/sport/live/matches/id/statistics/feed?sequence



43
44
45
# File 'lib/rts/api/live_sport_event_information.rb', line 43

def live_match_statistics_feed(sport:, id:, sequence: nil)
  get("#{sport}/live/matches/#{id}/statistics/feed?sequence=#{sequence}")
end

#live_match_statistics_state(sport:, id:, sequence: nil, expand: nil) ⇒ Object

MATCH STATISTICS Current live match statistics. Resource always shows last sequence state, if you don’t set it. It provides complete match state for sequence, so you can reconstruct your data, when you miss a lot of sequences. GET/sport/live/matches/id/statistics/state?sequence,expand



35
36
37
# File 'lib/rts/api/live_sport_event_information.rb', line 35

def live_match_statistics_state(sport:, id:, sequence: nil, expand: nil)
  get("#{sport}/live/matches/#{id}/statistics/state?sequence=#{sequence}?expand=#{expand}")
end

#live_matches(sport:, league_id: nil, tournament_id: nil, series_id: nil) ⇒ Object

LIVE MATCHES Currently available matches. GET/sport/live/matches?league_id,tournament_id,series_id



8
9
10
# File 'lib/rts/api/live_sport_event_information.rb', line 8

def live_matches(sport:, league_id: nil, tournament_id: nil, series_id: nil)
  get("#{sport}/live/matches?league_id=#{league_id}&tournament_id=#{tournament_id}&series_id=#{series_id}")
end

#live_series(sport:, league_id: nil, tournament_id: nil) ⇒ Object

LIVE SERIES Currently available live series. GET/sport/live/series?league_id,tournament_id



57
58
59
# File 'lib/rts/api/live_sport_event_information.rb', line 57

def live_series(sport:, league_id: nil, tournament_id: nil)
  get("#{sport}/live/series?league_id=#{league_id}&tournament_id=#{tournament_id}")
end

#live_series_feed(sport:, id:, sequence: nil) ⇒ Object

SERIES FEED Current live series feed. Resource always shows last sequence delta against previous one, if you don’t request specific one. Delta sequence represents changed markets. GET/sport/live/series/id/feed?sequence



72
73
74
# File 'lib/rts/api/live_sport_event_information.rb', line 72

def live_series_feed(sport:, id:, sequence: nil)
  get("#{sport}/live/series/#{id}/feed?sequence=#{sequence}")
end

#live_series_state(sport:, id:, sequence: nil, expand: nil) ⇒ Object

SERIES STATE Current live series state. Resource always shows last sequence state, if you don’t set it. GET/sport/live/series/id/state?sequence,expand



64
65
66
# File 'lib/rts/api/live_sport_event_information.rb', line 64

def live_series_state(sport:, id:, sequence: nil, expand: nil)
  get("#{sport}/live/series/#{id}/state?sequence=#{sequence}&expand=#{expand}")
end

#statistics_states(sport:) ⇒ Object

STATISTICS STATES List all statistics states. GET/sport/statistics/states



50
51
52
# File 'lib/rts/api/live_sport_event_information.rb', line 50

def statistics_states(sport:)
  get("#{sport}/statistics/states")
end