Class: Lol::MasteriesRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/lol/masteries_request.rb

Overview

Bindings for the Masteries API.

See: developer.riotgames.com/api-methods/#masteries-v3

Instance Attribute Summary

Attributes inherited from Request

#api_key, #cache_store, #rate_limiter, #region

Instance Method Summary collapse

Methods inherited from Request

#api_base_path, #api_base_url, #api_query_string, #api_url, api_version, #api_version, #cached?, #clean_url, #initialize, #perform_rate_limited_request, #perform_request, #perform_uncached_request, #platform, platforms, #store, #ttl

Constructor Details

This class inherits a constructor from Lol::Request

Instance Method Details

#by_summoner_id(summoner_id) ⇒ Array<DynamicModel>

Get mastery pages for a given summoner ID


9
10
11
12
# File 'lib/lol/masteries_request.rb', line 9

def by_summoner_id summoner_id
  result = perform_request api_url "masteries/by-summoner/#{summoner_id}"
  result["pages"].map { |p| DynamicModel.new p }
end