Class: Lol::TeamRequest
Instance Attribute Summary
Attributes inherited from Request
Class Method Summary collapse
Instance Method Summary collapse
-
#get(summoner_id) ⇒ Array
Retrieves the list of Teams for the given summoner.
Methods inherited from Request
#api_url, #initialize, #perform_request
Constructor Details
This class inherits a constructor from Lol::Request
Class Method Details
.api_version ⇒ Object
3 4 5 |
# File 'lib/lol/team_request.rb', line 3 def self.api_version "v2.2" end |
Instance Method Details
#get(summoner_id) ⇒ Array
Retrieves the list of Teams for the given summoner
9 10 11 12 13 |
# File 'lib/lol/team_request.rb', line 9 def get summoner_id perform_request(api_url "team/by-summoner/#{summoner_id}").map do |team_data| Team.new team_data end end |