Class: MetaNexus::Wow::Recipe

Inherits:
MetaNexus::Wow show all
Defined in:
lib/meta_nexus/wow/recipe.rb

Class Method Summary collapse

Methods inherited from MetaNexus::Wow

client, #url

Methods inherited from Api

call_api, #url

Class Method Details

.find(id) ⇒ Object

Find recipe info in Battle.net WoW Api Required arguments: id - recipe id

Example:

recipe = MetaNexus::Wow::Recipe
recipe.find('2v2')

Response in Hash:

{"id"=>33994, "name"=>"Precise Strikes", "profession"=>"Enchanting", "icon"=>"spell_holy_greaterheal"}


14
15
16
17
# File 'lib/meta_nexus/wow/recipe.rb', line 14

def self.find(id)
  call_url = "#{client.url}/recipe/#{id}?locale=#{MetaNexus.config.locale}&apikey=#{MetaNexus.config.api_key}"
  MetaNexus::Api.call_api(call_url)
end