Class: BlizzardApi::Wow::Achievement
- Inherits:
-
GenericDataEndpoint
- Object
- Request
- Request
- GenericDataEndpoint
- BlizzardApi::Wow::Achievement
- Defined in:
- lib/blizzard_api_rb/wow/game_data/achievement.rb
Overview
This class allows access to World of Warcraft achievements
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Wow.achievement
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
-
#categories(**options) ⇒ Hash
Return a list of possible achievement categories.
-
#category(id, **options) ⇒ Hash
Return a achievement category.
-
#media(id, **options) ⇒ Hash
Fetch media assets for the specified achievement.
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
#categories(**options) ⇒ Hash
Return a list of possible achievement categories.
in the configuration module
21 22 23 |
# File 'lib/blizzard_api_rb/wow/game_data/achievement.rb', line 21 def categories(**) api_request "#{endpoint_uri('category')}/index", **.merge() end |
#category(id, **options) ⇒ Hash
Return a achievement category.
in the configuration module
31 32 33 |
# File 'lib/blizzard_api_rb/wow/game_data/achievement.rb', line 31 def category(id, **) api_request "#{endpoint_uri('category')}/#{id}", **.merge() end |
#media(id, **options) ⇒ Hash
Fetch media assets for the specified achievement
in the configuration module
41 42 43 |
# File 'lib/blizzard_api_rb/wow/game_data/achievement.rb', line 41 def media(id, **) api_request "#{base_url(:media)}/achievement/#{id}", **.merge() end |