class BlizzardApi::Wow::CharacterProfile

This class allows access to World of Warcraft character profile data

@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

achievement_statistics(realm, character, **options) click to toggle source

Return character achievements statistics

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 53
def achievement_statistics(realm, character, **options)
  character_request realm, character, 'achievements/statistics', **options
end
achievements(realm, character, **options) click to toggle source

Return character achievements

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 39
def achievements(realm, character, **options)
  character_request realm, character, 'achievements', **options
end
appearance(realm, character, **options) click to toggle source

Return character appearance

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 67
def appearance(realm, character, **options)
  character_request realm, character, 'appearance', **options
end
collections(realm, character, **options) click to toggle source

Return a character's collections

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 81
def collections(realm, character, **options)
  character_request realm, character, 'collections', **options
end
dungeons(realm, character, **options) click to toggle source

Return a character's dungeon progress

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 137
def dungeons(realm, character, **options)
  character_request realm, character, 'encounters/dungeons', **options
end
encounters(realm, character, **options) click to toggle source

Return a character's encounter summary

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 123
def encounters(realm, character, **options)
  character_request realm, character, 'encounters', **options
end
equipment(realm, character, **options) click to toggle source

Return character equipment

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 165
def equipment(realm, character, **options)
  character_request realm, character, 'equipment', **options
end
get(realm, character, **options) click to toggle source

Return character achievements

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 25
def get(realm, character, **options)
  character_request realm, character, **options
end
hunter_pets(realm, character, **options) click to toggle source

Return a character's hunter pets

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 179
def hunter_pets(realm, character, **options)
  character_request realm, character, 'hunter-pets', **options
end
media(realm, character, **options) click to toggle source

Return character media

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 193
def media(realm, character, **options)
  character_request realm, character, 'character-media', **options
end
mounts(realm, character, **options) click to toggle source

Return a character's mount collection

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 109
def mounts(realm, character, **options)
  character_request realm, character, 'collections/mounts', **options
end
mythic_keystone_profile(realm, character, **options) click to toggle source

Return the mythic keystone profile of a character

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 207
def mythic_keystone_profile(realm, character, **options)
  character_request realm, character, 'mythic-keystone-profile', **options
end
mythic_keystone_seasons(realm, character, season = nil, **options) click to toggle source

Return the mythic keystone profile of a character

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

@param realm [String] The character realm's slug @param character [String] The character name @param season [Integer] Season ID if you want only a specific season or nil to include all. @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 222
def mythic_keystone_seasons(realm, character, season = nil, **options)
  character_request realm, character, "mythic-keystone-profile/season/#{season}", **options
end
pets(realm, character, **options) click to toggle source

Return a character's pet collection

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 95
def pets(realm, character, **options)
  character_request realm, character, 'collections/pets', **options
end
professions(realm, character, **options) click to toggle source

Return professions from a character

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 236
def professions(realm, character, **options)
  character_request realm, character, 'professions', **options
end
pvp_bracket(realm, character, bracket, **options) click to toggle source

Return the pvp bracket of a character

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

@param realm [String] The character realm's slug @param character [String] The character name @param bracket [String] Pvp bracket @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 266
def pvp_bracket(realm, character, bracket, **options)
  character_request realm, character, "pvp-bracket/#{bracket}", **options
end
pvp_summary(realm, character, **options) click to toggle source

Return the pvp summary of a character

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 280
def pvp_summary(realm, character, **options)
  character_request realm, character, 'pvp-summary', **options
end
quests(realm, character, **options) click to toggle source

Return a character's quests

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@option options [Boolean] :completed Should return completed quests

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 295
def quests(realm, character, **options)
  completed = options.delete(:completed) || false
  return character_request realm, character, 'quests/completed', **options if completed

  character_request realm, character, 'quests', **options
end
raids(realm, character, **options) click to toggle source

Return a character's raid progress

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 151
def raids(realm, character, **options)
  character_request realm, character, 'encounters/raids', **options
end
reputation(realm, character, **options) click to toggle source

Return a character's reputations

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 312
def reputation(realm, character, **options)
  character_request realm, character, 'reputations', **options
end
soulbinds(realm, character, **options) click to toggle source

Return a character's soulbinds

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 326
def soulbinds(realm, character, **options)
  character_request realm, character, 'soulbinds', **options
end
specializations(realm, character, **options) click to toggle source

Return a character's specialization

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 340
def specializations(realm, character, **options)
  character_request realm, character, 'specializations', **options
end
statistics(realm, character, **options) click to toggle source

Return a character's statistics

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 354
def statistics(realm, character, **options)
  character_request realm, character, 'statistics', **options
end
status(realm, character, **options) click to toggle source

Return character status

@see develop.battle.net/documentation/api-reference/world-of-warcraft-profile-api @see us.forums.blizzard.com/en/blizzard/t/data-protection-notice-and-faq/609

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 251
def status(realm, character, **options)
  character_request realm, character, 'status', **options
end
titles(realm, character, **options) click to toggle source

Return a character's titles

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

@param realm [String] The character realm's slug @param character [String] The character name @!macro request_options

@!macro response

# File lib/blizzard_api/wow/profile/character_profile.rb, line 368
def titles(realm, character, **options)
  character_request realm, character, 'titles', **options
end

Private Instance Methods

character_request(realm, character, variant = nil, **options) click to toggle source
# File lib/blizzard_api/wow/profile/character_profile.rb, line 380
def character_request(realm, character, variant = nil, **options)
  uri = "#{base_url(:profile)}/character/#{string_to_slug(realm)}/#{string_to_slug(character)}"
  uri += "/#{variant}" if variant
  api_request uri, **default_options.merge(options)
end
default_options(user_token = nil) click to toggle source
# File lib/blizzard_api/wow/profile/character_profile.rb, line 374
def default_options(user_token = nil)
  opts = { ttl: CACHE_HOUR, namespace: :profile }
  opts.merge access_token: user_token if user_token
  opts
end