Class: BlizzardApi::Wow::Pet
- Inherits:
-
GenericDataEndpoint
- Object
- Request
- Request
- GenericDataEndpoint
- BlizzardApi::Wow::Pet
- Defined in:
- lib/blizzard_api/wow/game_data/pet.rb
Overview
This class allows access to World of Warcraft pet data
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Wow.pet
Constant Summary
Constants inherited from Request
Request::CACHE_DAY, Request::CACHE_HOUR, Request::CACHE_TRIMESTER
Constants included from ApiStandards
Instance Attribute Summary
Attributes inherited from Request
Instance Method Summary collapse
-
#abilities(**options) ⇒ Hash
Fetch all pet abilities.
-
#ability(id, **options) ⇒ Hash
Fetch a pet ability.
-
#ability_media(id, **options) ⇒ Hash
Fetch media for one of the pet abilities listed by the #abilities using its id.
-
#media(id, **options) ⇒ Hash
Fetch media for one of the pets listed by the GenericDataEndpoint#index using its id.
Methods inherited from GenericDataEndpoint
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Wow::Request
Instance Method Details
#abilities(**options) ⇒ Hash
Fetch all pet abilities
in the configuration module
33 34 35 |
# File 'lib/blizzard_api/wow/game_data/pet.rb', line 33 def abilities(**) api_request "#{endpoint_uri('ability')}/index", **.merge() end |
#ability(id, **options) ⇒ Hash
Fetch a pet ability
in the configuration module
45 46 47 |
# File 'lib/blizzard_api/wow/game_data/pet.rb', line 45 def ability(id, **) api_request "#{endpoint_uri('ability')}/#{id}", **.merge() end |
#ability_media(id, **options) ⇒ Hash
Fetch media for one of the pet abilities listed by the #abilities using its id
in the configuration module
57 58 59 |
# File 'lib/blizzard_api/wow/game_data/pet.rb', line 57 def ability_media(id, **) api_request "#{base_url(:media)}/pet-ability/#{id}", **.merge() end |
#media(id, **options) ⇒ Hash
Fetch media for one of the pets listed by the GenericDataEndpoint#index using its id
in the configuration module
23 24 25 |
# File 'lib/blizzard_api/wow/game_data/pet.rb', line 23 def media(id, **) api_request "#{base_url(:media)}/pet/#{id}", **.merge() end |