class BlizzardApi::Wow::Pet
This class allows access to World of Warcraft pet 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.pet
Public Instance Methods
abilities(**options)
click to toggle source
Fetch all pet abilities
@!macro request_options
@!macro response
# File lib/blizzard_api/wow/game_data/pet.rb, line 31 def abilities(**options) api_request "#{endpoint_uri('ability')}/index", **default_options.merge(options) end
ability(id, **options)
click to toggle source
Fetch a pet ability
@param id [Integer] Pet
id
@!macro request_options
@!macro response
# File lib/blizzard_api/wow/game_data/pet.rb, line 43 def ability(id, **options) api_request "#{endpoint_uri('ability')}/#{id}", **default_options.merge(options) end
ability_media(id, **options)
click to toggle source
Fetch media for one of the pet abilities listed by the {#abilities} using its id
@param id [Integer] Pet
ability id
@!macro request_options
@!macro response
# File lib/blizzard_api/wow/game_data/pet.rb, line 55 def ability_media(id, **options) api_request "#{base_url(:media)}/pet-ability/#{id}", **default_options.merge(options) end
media(id, **options)
click to toggle source
Fetch media for one of the pets listed by the {#index} using its id
@param id [Integer] Pet
id
@!macro request_options
@!macro response
# File lib/blizzard_api/wow/game_data/pet.rb, line 21 def media(id, **options) api_request "#{base_url(:media)}/pet/#{id}", **default_options.merge(options) end
Protected Instance Methods
endpoint_setup()
click to toggle source
# File lib/blizzard_api/wow/game_data/pet.rb, line 61 def endpoint_setup @endpoint = 'pet' @namespace = :static @collection = 'pets' @ttl = CACHE_TRIMESTER end