class BlizzardApi::Wow::Item
This class allows access to World of Warcraft item data
@see develop.battle.net/documentation/world-of-warcraft/game-data-apis
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Wow.item
Public Instance Methods
Return data about an item class
@param id [Integer] Item
class id @!macro request_options @option options [Boolean] :classic If set to true, this method will call the classic version @option options [Boolean] :classic1x If set to true, this method will call the classic era version
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 52 def class(id, **options) api_request "#{endpoint_uri('class')}/#{id}", **default_options.merge(options) end
Return a list of item classes
@!macro request_options @option options [Boolean] :classic If set to true, this method will call the classic version @option options [Boolean] :classic1x If set to true, this method will call the classic era version
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 39 def classes(**options) api_request "#{endpoint_uri('class')}/index", **default_options.merge(options) end
This method overrides the inherited default behavior to prevent high server load and fetch time
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 27 def complete raise BlizzardApi::ApiException, 'This endpoint does not have a complete method' end
This method overrides the inherited default behavior to prevent high server load and fetch time
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 19 def index raise BlizzardApi::ApiException, 'This endpoint does not have a index method' end
Fetch media for an item using its id
@param id [Integer] Item
id
@!macro request_options @option options [Boolean] :classic If set to true, this method will call the classic version @option options [Boolean] :classic1x If set to true, this method will call the classic era version
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 80 def media(id, **options) api_request "#{base_url(:media)}/item/#{id}", **default_options.merge(options) end
Return data about an item set
@param id [Integer] Item
set id @!macro request_options
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 101 def set(id, **options) api_request "#{endpoint_uri('set')}/#{id}", **default_options.merge(options) end
Return a list of item sets
@!macro request_options
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 90 def sets(**options) api_request "#{endpoint_uri('set')}/index", **default_options.merge(options) end
Return all subclasses of a given class
@param id [Integer] Item
class id @param subclass_id [Integer] Item
subclass id @!macro request_options @option options [Boolean] :classic If set to true, this method will call the classic version @option options [Boolean] :classic1x If set to true, this method will call the classic era version
@!macro response
# File lib/blizzard_api/wow/game_data/item.rb, line 66 def subclass(id, subclass_id, **options) api_request "#{endpoint_uri('class')}/#{id}/item-subclass/#{subclass_id}", **default_options.merge(options) end
Protected Instance Methods
# File lib/blizzard_api/wow/game_data/item.rb, line 107 def endpoint_setup @endpoint = 'item' @namespace = :static @collection = 'items' @ttl = CACHE_TRIMESTER end