class BlizzardApi::Wow::Achievement

This class allows access to World of Warcraft achievements

@see develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api

You can get an instance of this class using the default region as follows:

api_instance = BlizzardApi::Wow.achievement

Public Instance Methods

categories(**options) click to toggle source

Return a list of possible achievement categories.

@!macro request_options

@!macro response

# File lib/blizzard_api/wow/game_data/achievement.rb, line 27
def categories(**options)
  api_request "#{endpoint_uri('category')}/index", **default_options.merge(options)
end
category(id, **options) click to toggle source

Return a achievement category.

@!macro request_options

@!macro response

# File lib/blizzard_api/wow/game_data/achievement.rb, line 37
def category(id, **options)
  api_request "#{endpoint_uri('category')}/#{id}", **default_options.merge(options)
end
complete() click to toggle source

This method overrides the inherited default behavior to prevent high server load and fetch time

@!macro response

# File lib/blizzard_api/wow/game_data/achievement.rb, line 17
def complete
  raise BlizzardApi::ApiException, 'There are too many achievements to fetch complete data'
end
media(id, **options) click to toggle source

Fetch media assets for the specified achievement

@!macro request_options

@!macro response

# File lib/blizzard_api/wow/game_data/achievement.rb, line 47
def media(id, **options)
  api_request "#{base_url(:media)}/achievement/#{id}", **default_options.merge(options)
end

Protected Instance Methods

endpoint_setup() click to toggle source
# File lib/blizzard_api/wow/game_data/achievement.rb, line 53
def endpoint_setup
  @endpoint = 'achievement'
  @namespace = :static
  @collection = 'achievements'
  @ttl = CACHE_TRIMESTER
end