Class: BlizzardApi::Wow::CharacterProfile

Inherits:
Request show all
Includes:
Slug
Defined in:
lib/blizzard_api_rb/wow/profile/character_profile.rb

Overview

This class allows access to World of Warcraft character profile data

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

ApiStandards::BASE_URLS

Instance Attribute Summary

Attributes inherited from Request

#mode, #region

Instance Method Summary collapse

Methods included from Slug

#string_to_slug

Methods inherited from Request

#initialize

Methods inherited from Request

#initialize

Constructor Details

This class inherits a constructor from BlizzardApi::Wow::Request

Instance Method Details

#achievement_statistics(realm, character, **options) ⇒ Hash

Return character achievements statistics

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



53
54
55
# File 'lib/blizzard_api_rb/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) ⇒ Hash

Return character achievements

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



39
40
41
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 39

def achievements(realm, character, **options)
  character_request realm, character, 'achievements', **options
end

#appearance(realm, character, **options) ⇒ Hash

Return character appearance

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



67
68
69
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 67

def appearance(realm, character, **options)
  character_request realm, character, 'appearance', **options
end

#collections(realm, character, **options) ⇒ Hash

Return a character’s collections

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



81
82
83
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 81

def collections(realm, character, **options)
  character_request realm, character, 'collections', **options
end

#dungeons(realm, character, **options) ⇒ Hash

Return a character’s dungeon progress

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



165
166
167
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 165

def dungeons(realm, character, **options)
  character_request realm, character, 'encounters/dungeons', **options
end

#encounters(realm, character, **options) ⇒ Hash

Return a character’s encounter summary

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



151
152
153
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 151

def encounters(realm, character, **options)
  character_request realm, character, 'encounters', **options
end

#equipment(realm, character, **options) ⇒ Hash

Return character equipment

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



193
194
195
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 193

def equipment(realm, character, **options)
  character_request realm, character, 'equipment', **options
end

#get(realm, character, **options) ⇒ Hash

Return character basic data

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



25
26
27
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 25

def get(realm, character, **options)
  character_request realm, character, **options
end

#heirlooms(realm, character, **options) ⇒ Hash

Return a character’s heirloom collection

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



137
138
139
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 137

def heirlooms(realm, character, **options)
  character_request realm, character, 'collections/heirlooms', **options
end

#hunter_pets(realm, character, **options) ⇒ Hash

Return a character’s hunter pets

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



207
208
209
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 207

def hunter_pets(realm, character, **options)
  character_request realm, character, 'hunter-pets', **options
end

#media(realm, character, **options) ⇒ Hash

Return character media

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



221
222
223
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 221

def media(realm, character, **options)
  character_request realm, character, 'character-media', **options
end

#mounts(realm, character, **options) ⇒ Hash

Return a character’s mount collection

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



109
110
111
# File 'lib/blizzard_api_rb/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) ⇒ Hash

Return the mythic keystone profile of a character

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



235
236
237
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 235

def mythic_keystone_profile(realm, character, **options)
  character_request realm, character, 'mythic-keystone-profile', **options
end

#mythic_keystone_seasons(realm, character, season = nil, **options) ⇒ Hash

Return the mythic keystone profile of a character

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • season (Integer) (defaults to: nil)

    Season ID if you want only a specific season or nil to include all.

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



250
251
252
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 250

def mythic_keystone_seasons(realm, character, season = nil, **options)
  character_request realm, character, "mythic-keystone-profile/season/#{season}", **options
end

#pets(realm, character, **options) ⇒ Hash

Return a character’s pet collection

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



95
96
97
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 95

def pets(realm, character, **options)
  character_request realm, character, 'collections/pets', **options
end

#professions(realm, character, **options) ⇒ Hash

Return professions from a character

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



264
265
266
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 264

def professions(realm, character, **options)
  character_request realm, character, 'professions', **options
end

#pvp_bracket(realm, character, bracket, **options) ⇒ Hash

Return the pvp bracket of a character

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • bracket (String)

    Pvp bracket

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



294
295
296
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 294

def pvp_bracket(realm, character, bracket, **options)
  character_request realm, character, "pvp-bracket/#{bracket}", **options
end

#pvp_summary(realm, character, **options) ⇒ Hash

Return the pvp summary of a character

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



308
309
310
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 308

def pvp_summary(realm, character, **options)
  character_request realm, character, 'pvp-summary', **options
end

#quests(realm, character, **options) ⇒ Hash

Return a character’s quests

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :completed (Boolean)

    Should return completed quests

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



323
324
325
326
327
328
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 323

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) ⇒ Hash

Return a character’s raid progress

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



179
180
181
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 179

def raids(realm, character, **options)
  character_request realm, character, 'encounters/raids', **options
end

#reputation(realm, character, **options) ⇒ Hash

Return a character’s reputations

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :completed (Boolean)

    Should return completed quests

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



340
341
342
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 340

def reputation(realm, character, **options)
  character_request realm, character, 'reputations', **options
end

#soulbinds(realm, character, **options) ⇒ Hash

Return a character’s soulbinds

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :completed (Boolean)

    Should return completed quests

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



354
355
356
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 354

def soulbinds(realm, character, **options)
  character_request realm, character, 'soulbinds', **options
end

#specializations(realm, character, **options) ⇒ Hash

Return a character’s specialization

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :completed (Boolean)

    Should return completed quests

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



368
369
370
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 368

def specializations(realm, character, **options)
  character_request realm, character, 'specializations', **options
end

#statistics(realm, character, **options) ⇒ Hash

Return a character’s statistics

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :completed (Boolean)

    Should return completed quests

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



382
383
384
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 382

def statistics(realm, character, **options)
  character_request realm, character, 'statistics', **options
end

#status(realm, character, **options) ⇒ Hash

Return character status

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



279
280
281
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 279

def status(realm, character, **options)
  character_request realm, character, 'status', **options
end

#titles(realm, character, **options) ⇒ Hash

Return a character’s titles

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :completed (Boolean)

    Should return completed quests

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



396
397
398
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 396

def titles(realm, character, **options)
  character_request realm, character, 'titles', **options
end

#toys(realm, character, **options) ⇒ Hash

Return a character’s toy collection

in the configuration module

Parameters:

  • realm (String)

    The character realm’s slug

  • character (String)

    The character name

  • options (Hash)

    You can specify some options

Options Hash (**options):

  • :locale (String)

    Overrides the default locale for a single call

  • :namespace (String)

    Overrides the default namespace for a single call

  • :access_token (String)

    Overrides the access_token for a single call

  • :ignore_cache (Boolean)

    If set to true the request will not use the cache

  • :ttl (Integer)

    Override the default time (in seconds) a request should be cached

  • :since (DateTime)

    Adds the If-modified-since headers. Will always ignore cache when set.

Returns:

  • (Hash)

    API Response. The actual type of the returned object depends on the format option

See Also:



123
124
125
# File 'lib/blizzard_api_rb/wow/profile/character_profile.rb', line 123

def toys(realm, character, **options)
  character_request realm, character, 'collections/toys', **options
end