Class: Outrageous::StaticData::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/outrageous/static_data/base.rb

Direct Known Subclasses

Champion, Item, Mastery, Realm, Rune, SummonerSpell

Constant Summary

Constants inherited from Base

Base::CHAMPION_VERSION, Base::GAME_VERSION, Base::LEAGUE_VERSION, Base::STATIC_DATA_VERSION, Base::STATS_VERSION, Base::SUMMONER_VERSION, Base::TEAM_VERSION

Instance Attribute Summary

Attributes inherited from Base

#api_key, #region, #response, #status, #version

Instance Method Summary collapse

Methods inherited from Base

#get, #initialize

Constructor Details

This class inherits a constructor from Outrageous::Base

Instance Method Details

#all(options = {}) ⇒ Object

List elements



16
17
18
# File 'lib/outrageous/static_data/base.rb', line 16

def all(options = {})
  get("/api/lol/static-data/#{region}/#{version || STATIC_DATA_VERSION}/#{self.class.api_model}", options)
end

#find(id, options = {}) ⇒ Object

Show a specific element



21
22
23
# File 'lib/outrageous/static_data/base.rb', line 21

def find(id, options = {})
  get("/api/lol/static-data/#{region}/#{version || STATIC_DATA_VERSION}/#{self.class.api_model}/#{id}", options)
end