Class: Lol::ChampionRequest

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

Instance Attribute Summary

Attributes inherited from Request

#api_key, #region

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

#api_url, #initialize, #perform_request

Constructor Details

This class inherits a constructor from Lol::Request

Class Method Details

.api_versionString

Returns the supported API Version

Returns:

  • (String)

    the supported api version



5
6
7
# File 'lib/lol/champion_request.rb', line 5

def self.api_version
  "v1.1"
end

Instance Method Details

#getArray

Retrieve all champions, v1.1

Returns:

  • (Array)

    an array of champions



11
12
13
# File 'lib/lol/champion_request.rb', line 11

def get
  perform_request(api_url("champion"))["champions"].map {|c| Champion.new(c)}
end