class Lol::ChampionMasteryRequest
Bindings for the Champion Mastery API.
See: developer.riotgames.com/api-methods/#champion-mastery-v3
Public Instance Methods
Get all champion mastery entries sorted by number of champion points descending
See: developer.riotgames.com/api-methods/#champion-mastery-v3/GET_getAllChampionMasteries @param [Integer] summoner_id Summoner ID associated with the player @return [Array<Lol::DynamicModel>] Champion Masteries
# File lib/lol/champion_mastery_request.rb, line 25 def all summoner_id: result = perform_request api_url "champion-masteries/by-summoner/#{summoner_id}" result.map { |c| DynamicModel.new c } end
@!visibility private
# File lib/lol/champion_mastery_request.rb, line 7 def api_base_path "/lol/champion-mastery/#{api_version}" end
Get a champion mastery by player ID and champion ID
See: developer.riotgames.com/api-methods/#champion-mastery-v3/GET_getDynamicModel @param [Integer] summoner_id Summoner ID associated with the player @return [Lol::DynamicModel] Champion Mastery
# File lib/lol/champion_mastery_request.rb, line 35 def find champion_id, summoner_id: result = perform_request api_url "champion-masteries/by-summoner/#{summoner_id}/by-champion/#{champion_id}" DynamicModel.new result end
Get a player's total champion mastery score, which is the sum of individual champion mastery levels
See: developer.riotgames.com/api-methods/#champion-mastery-v3/GET_getDynamicModelScore @param [Integer] summoner_id Summoner ID associated with the player @return [Integer] Player's total champion master score
# File lib/lol/champion_mastery_request.rb, line 16 def total_score summoner_id: perform_request api_url "scores/by-summoner/#{summoner_id}" end