Class: WoW::BattlePet::Stats
- Defined in:
- lib/wow/features/battle_pet.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, params = {}) ⇒ Stats
constructor
This API accepts optional parameters.
Methods inherited from WoW::Base
Constructor Details
#initialize(id, params = {}) ⇒ Stats
This API accepts optional parameters.
:level (default 1) :breedId (default 3) :qualityId (default 1)
For example:
WoW::BattlePet::Stats.new(132, level: 10)
47 48 49 |
# File 'lib/wow/features/battle_pet.rb', line 47 def initialize(id, params = {}) super(self.class.data(id, params)) end |
Class Method Details
.data(id, params = {}) ⇒ Object
52 53 54 55 |
# File 'lib/wow/features/battle_pet.rb', line 52 def data(id, params = {}) params.merge!({locale: WoW.locale}) get("/#{id}", query: params).parsed_response end |