Class: Outrageous::League

Inherits:
Base
  • Object
show all
Defined in:
lib/outrageous/league.rb

Constant Summary

Constants inherited from Base

Base::CHAMPION_VERSION, Base::GAME_VERSION, Base::LEAGUE_VERSION, Base::STATIC_DATA_VERSION, Base::STATS_VERSION, Base::SUMMONER_VERSION, Base::TEAM_VERSION

Instance Attribute Summary

Attributes inherited from Base

#api_key, #region, #response, #status, #version

Instance Method Summary collapse

Methods inherited from Base

#get, #initialize

Constructor Details

This class inherits a constructor from Outrageous::Base

Instance Method Details

#get_challenger_info(options = { type: 'RANKED_SOLO_5x5' }) ⇒ Object



20
21
22
# File 'lib/outrageous/league.rb', line 20

def get_challenger_info(options = { type: 'RANKED_SOLO_5x5' })
  get("/api/lol/#{region}/#{version || LEAGUE_VERSION}/league/challenger", options)
end

#get_challenger_solo_qObject

Premade methods



25
26
27
28
# File 'lib/outrageous/league.rb', line 25

def get_challenger_solo_q
                             RANKED_SOLO_5x5
  get_challenger_info(type: 'RANKED_SOLO_5x5')
end

#get_challenger_team_3_vs_3Object



30
31
32
# File 'lib/outrageous/league.rb', line 30

def get_challenger_team_3_vs_3
  get_challenger_info(type: 'RANKED_TEAM_3x3')
end

#get_challenger_team_5_vs_5Object



34
35
36
# File 'lib/outrageous/league.rb', line 34

def get_challenger_team_5_vs_5
  get_challenger_info(type: 'RANKED_TEAM_5x5')      
end

#get_leagues_by_team_id(team_id, options = {}) ⇒ Object



12
13
14
# File 'lib/outrageous/league.rb', line 12

def get_leagues_by_team_id(team_id, options = {})
  get("/api/lol/#{region}/#{version || LEAGUE_VERSION}/league/by-team/#{team_id}", options)
end

#get_leagues_entry_by_summoner_id(summoner_id, options = {}) ⇒ Object



8
9
10
# File 'lib/outrageous/league.rb', line 8

def get_leagues_entry_by_summoner_id(summoner_id, options = {})
  get("/api/lol/#{region}/#{version || LEAGUE_VERSION}/league/by-summoner/#{summoner_id}/entry", options)
end

#get_leagues_entry_by_team_id(team_id, options = {}) ⇒ Object



16
17
18
# File 'lib/outrageous/league.rb', line 16

def get_leagues_entry_by_team_id(team_id, options = {})
  get("/api/lol/#{region}/#{version || LEAGUE_VERSION}/league/by-team/#{team_id}/entry", options)
end

#get_leagues_with_team_by_summoner_id(summoner_id, options = {}) ⇒ Object



4
5
6
# File 'lib/outrageous/league.rb', line 4

def get_leagues_with_team_by_summoner_id(summoner_id, options = {})
  get("/api/lol/#{region}/#{version || LEAGUE_VERSION}/league/by-summoner/#{summoner_id}", options)
end