module OverwatchLeague::API
Constants
- BASE_URL
- HTTP_OK
Public Instance Methods
live_match()
click to toggle source
# File lib/overwatch_league/api.rb, line 34 def live_match handle_response(Request.get(URL.new("#{BASE_URL}/live-match"))) end
maps()
click to toggle source
# File lib/overwatch_league/api.rb, line 50 def maps handle_response(Request.get(URL.new("#{BASE_URL}/maps"))) end
match(match_id)
click to toggle source
# File lib/overwatch_league/api.rb, line 30 def match(match_id) handle_response(Request.get(URL.new("#{BASE_URL}/matches/#{match_id}"))) end
matches()
click to toggle source
# File lib/overwatch_league/api.rb, line 26 def matches handle_response(Request.get(URL.new("#{BASE_URL}/matches"))) end
news()
click to toggle source
# File lib/overwatch_league/api.rb, line 54 def news handle_response(Request.get(URL.new("#{BASE_URL}/news"))) end
ranking()
click to toggle source
# File lib/overwatch_league/api.rb, line 18 def ranking handle_response(Request.get(URL.new("#{BASE_URL}/ranking"))) end
schedule()
click to toggle source
# File lib/overwatch_league/api.rb, line 38 def schedule handle_response(Request.get(URL.new("#{BASE_URL}/schedule"))) end
standings()
click to toggle source
# File lib/overwatch_league/api.rb, line 22 def standings handle_response(Request.get(URL.new("#{BASE_URL}/standings"))) end
streams()
click to toggle source
# File lib/overwatch_league/api.rb, line 42 def streams handle_response(Request.get(URL.new("#{BASE_URL}/streams"))) end
team(team_id)
click to toggle source
# File lib/overwatch_league/api.rb, line 14 def team(team_id) handle_response(Request.get(URL.new("#{BASE_URL}/teams/#{team_id}"))) end
teams()
click to toggle source
# File lib/overwatch_league/api.rb, line 10 def teams handle_response(Request.get(URL.new("#{BASE_URL}/teams"))) end
videos()
click to toggle source
# File lib/overwatch_league/api.rb, line 58 def videos handle_response(Request.get(URL.new("#{BASE_URL}/playlist/owl-app-playlist"))) end
vods()
click to toggle source
# File lib/overwatch_league/api.rb, line 46 def vods handle_response(Request.get(URL.new("#{BASE_URL}/vods"))) end
Private Instance Methods
handle_response(response)
click to toggle source
# File lib/overwatch_league/api.rb, line 64 def handle_response(response) raise ResponseError.new(response) unless response.code == HTTP_OK BuildResponse.(response) end