Class: MetaNexus::Wow::Spell
- Inherits:
-
MetaNexus::Wow
- Object
- Api
- MetaNexus::Wow
- MetaNexus::Wow::Spell
- Defined in:
- lib/meta_nexus/wow/spell.rb
Class Method Summary collapse
-
.find(id) ⇒ Object
Find Spell info in Battle.net WoW Api Required arguments: id - spell id.
Methods inherited from MetaNexus::Wow
Methods inherited from Api
Class Method Details
.find(id) ⇒ Object
Find Spell info in Battle.net WoW Api Required arguments: id - spell id
Example:
spell = MetaNexus::Wow::Spell
spell.find(8056)
Response in Hash:
{"id"=>8056, "name"=>"Frost Shock", "icon"=>"spell_frost_frostshock", "description"=>"Instantly shocks an enemy with frost, dealing 2,631 Frost damage and reducing the target's movement speed by 50%. Lasts 8 sec.", "range"=>"25 yd range", "powerCost"=>"1.25% of base mana", "castTime"=>"Instant", "cooldown"=>"6 sec cooldown"}
14 15 16 17 |
# File 'lib/meta_nexus/wow/spell.rb', line 14 def self.find(id) call_url = "#{client.url}/spell/#{id}?locale=#{MetaNexus.config.locale}&apikey=#{MetaNexus.config.api_key}" MetaNexus::Api.call_api(call_url) end |