Class: RitoPlz::API::ChampionMastery
- Defined in:
- lib/RitoPlz/API/champion_mastery.rb
Instance Method Summary collapse
- #all_champions ⇒ Object
- #by_champion_id(champion_id) ⇒ Object
-
#initialize(region, player_id) ⇒ ChampionMastery
constructor
A new instance of ChampionMastery.
- #score ⇒ Object
- #top(query_params = {}) ⇒ Object
Constructor Details
#initialize(region, player_id) ⇒ ChampionMastery
Returns a new instance of ChampionMastery.
7 8 9 10 |
# File 'lib/RitoPlz/API/champion_mastery.rb', line 7 def initialize(region, player_id) @region = region @player_id = player_id end |
Instance Method Details
#all_champions ⇒ Object
12 13 14 15 |
# File 'lib/RitoPlz/API/champion_mastery.rb', line 12 def all_champions request = Request.new(@region, api_path("/champions")) request.get end |
#by_champion_id(champion_id) ⇒ Object
17 18 19 20 |
# File 'lib/RitoPlz/API/champion_mastery.rb', line 17 def by_champion_id(champion_id) request = Request.new(@region, api_path("/champion/#{champion_id}")) request.get end |
#score ⇒ Object
22 23 24 25 |
# File 'lib/RitoPlz/API/champion_mastery.rb', line 22 def score request = Request.new(@region, api_path("/score")) request.get end |
#top(query_params = {}) ⇒ Object
27 28 29 30 |
# File 'lib/RitoPlz/API/champion_mastery.rb', line 27 def top(query_params = {}) request = Request.new(@region, api_path("/topchampions")) request.get(query_params) end |