Module: Api::StaticSportEventInformation

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

Instance Method Summary collapse

Instance Method Details

#leagues(sport:) ⇒ Object

Currently available leagues. GET /sport/leagues



13
14
15
# File 'lib/rts/api/static_sport_event_information.rb', line 13

def leagues(sport:)
  get("#{sport}/leagues")
end

#market_close_times(sport:) ⇒ Object

CLOSE TIMES List all market close times. It is in match time. GET/sport/market/close_times



116
117
118
# File 'lib/rts/api/static_sport_event_information.rb', line 116

def market_close_times(sport:)
  get("#{sport}/market/close_times")
end

#market_resolve_times(sport:) ⇒ Object

RESOLVE TIMES List all market resolve times. It is in match time. GET/sport/market/resolve_times



124
125
126
# File 'lib/rts/api/static_sport_event_information.rb', line 124

def market_resolve_times(sport:)
  get("#{sport}/market/resolve_times")
end

#market_selections(sport:) ⇒ Object

SELECTIONS List all selections types GET/sport/market/selections



108
109
110
# File 'lib/rts/api/static_sport_event_information.rb', line 108

def market_selections(sport:)
  get("#{sport}/market/selections")
end

#market_states(sport:) ⇒ Object

MARKET STATES List all market states. GET /sport/market/states



132
133
134
# File 'lib/rts/api/static_sport_event_information.rb', line 132

def market_states(sport:)
  get("#{sport}/market/states")
end

#markets(sport:) ⇒ Object

Markets List all markets. Selection array is sorted by order of selections.



101
102
103
# File 'lib/rts/api/static_sport_event_information.rb', line 101

def markets(sport:)
  get("#{sport}/markets")
end

#match_positions(sport:) ⇒ Object

MATCH POSITIONS Possible match positions e.g. for LOL it can be Top,Mid,Jungles… GET/sport/match/positions



88
89
90
# File 'lib/rts/api/static_sport_event_information.rb', line 88

def match_positions(sport:)
  get("#{sport}/match/positions")
end

#match_states(sport:) ⇒ Object

MATCH STATES List all possible match states. GET/sport/match/states



95
96
97
# File 'lib/rts/api/static_sport_event_information.rb', line 95

def match_states(sport:)
  get("#{sport}/match/states")
end

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

MATCHES Matches for series. Shows only closed and resolved matches. List All Matches in Series GET/sport/matches?tournament_id,series_id,league_id



81
82
83
# File 'lib/rts/api/static_sport_event_information.rb', line 81

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

#players(sport:, team_id: nil) ⇒ Object

PLAYERS GET /sport/players?team_id List Available players team_id: number (optional), Example: 1, Filter players by team id sport: string (required), Example: lol



27
28
29
# File 'lib/rts/api/static_sport_event_information.rb', line 27

def players(sport:, team_id: nil)
  get("#{sport}/players?team_id=#{team_id}")
end

#series(sport:, tournament_id: nil) ⇒ Object

Series GET/sport/series?tournament_id



59
60
61
# File 'lib/rts/api/static_sport_event_information.rb', line 59

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

#series_states(sport:, id: nil) ⇒ Object

SERIES STATES List all possible series states. GET/sport/series/states



73
74
75
# File 'lib/rts/api/static_sport_event_information.rb', line 73

def series_states(sport:, id: nil)
  get("#{sport}/series/states/#{id}")
end

#series_types(sport:) ⇒ Object

Series types List All Series types GET/sport/series/types



66
67
68
# File 'lib/rts/api/static_sport_event_information.rb', line 66

def series_types(sport:)
  get("#{sport}/series/types")
end

#sportsObject

Currently available sports. GET /sports



7
8
9
# File 'lib/rts/api/static_sport_event_information.rb', line 7

def sports
  get('sports')
end

#teams(sport:) ⇒ Object

List Available teams GET /sport/teams



19
20
21
# File 'lib/rts/api/static_sport_event_information.rb', line 19

def teams(sport:)
  get("#{sport}/teams")
end

#tournament_tiers(sport:, id: nil) ⇒ Object

TOURNAMENT TIERS List all possible tournament tiers. GET/sport/tournament/tiers Tournament tiers by tier id GET/sport/tournament/tiers/id



53
54
55
# File 'lib/rts/api/static_sport_event_information.rb', line 53

def tournament_tiers(sport:, id: nil)
  get("#{sport}/tournament/tiers/#{id}")
end

#tournaments(sport:, date_from: nil, date_to: nil) ⇒ Object

TOURNAMENTS Currently available tournaments. GET/sport/tournaments?date_from,date_to Example URI GET /lol/tournaments?date_from=2016-01-16 00:00:00Z &date_to=2016-01-1600:00:00Z URI ParametersHide date_from date (optional) Example: 2016-01-16 00:00:00Z date_to date (optional) Example: 2016-01-16 00:00:00Z sport string (required) Example: lol



44
45
46
# File 'lib/rts/api/static_sport_event_information.rb', line 44

def tournaments(sport:, date_from: nil, date_to: nil)
  get("#{sport}/tournaments?date_from=#{date_from}&date_to=#{date_to}")
end