Class: Lol::StaticRequest
Defined Under Namespace
Classes: Proxy
Constant Summary collapse
- STANDARD_ENDPOINTS =
%w(champion item mastery rune summoner_spell)
Instance Attribute Summary
Attributes inherited from Request
#api_key, #cache_store, #region
Class Method Summary collapse
Instance Method Summary collapse
-
#api_url(path, params = {}) ⇒ String
Returns a full url for an API call Overrides api_url from Request.
- #get(endpoint, id = nil, params = {}) ⇒ Object
- #realm ⇒ Object
Methods inherited from Request
#cached?, #initialize, #perform_request, #store, #ttl
Constructor Details
This class inherits a constructor from Lol::Request
Class Method Details
.api_version ⇒ Object
5 6 7 |
# File 'lib/lol/static_request.rb', line 5 def self.api_version "v1" end |
Instance Method Details
#api_url(path, params = {}) ⇒ String
Returns a full url for an API call Overrides api_url from Request
13 14 15 |
# File 'lib/lol/static_request.rb', line 13 def api_url path, params = {} super(path,params).gsub(/api\/lol/, "api/lol/static-data") end |
#get(endpoint, id = nil, params = {}) ⇒ Object
25 26 27 |
# File 'lib/lol/static_request.rb', line 25 def get(endpoint, id=nil, params={}) id ? find(endpoint, id, params) : all(endpoint, params) end |