Class: WowArmory::API
Instance Method Summary collapse
- #getCharacter(realm_name, character_name) ⇒ Object
- #getGuild(realm_name, guild_name) ⇒ Object
- #getItem(item_id) ⇒ Object
-
#initialize(options) ⇒ API
constructor
A new instance of API.
Constructor Details
#initialize(options) ⇒ API
Returns a new instance of API.
9 10 11 |
# File 'lib/wow_armory.rb', line 9 def initialize() return self end |
Instance Method Details
#getCharacter(realm_name, character_name) ⇒ Object
13 14 15 |
# File 'lib/wow_armory.rb', line 13 def getCharacter(realm_name, character_name) Character.new(self.class.get("/api/wow/character/#{URI.escape realm_name}/#{URI.escape character_name}").parsed_response) end |
#getGuild(realm_name, guild_name) ⇒ Object
17 18 19 |
# File 'lib/wow_armory.rb', line 17 def getGuild(realm_name, guild_name) Guild.new(self.class.get("/api/wow/guild/#{URI.escape realm_name}/#{URI.escape guild_name}").parsed_response) end |
#getItem(item_id) ⇒ Object
21 22 23 |
# File 'lib/wow_armory.rb', line 21 def getItem(item_id) Item.new(self.class.get("/api/wow/item/#{item_id}").parsed_response) end |