Class: BlizzardApi::Wow::AccountProfile
- Defined in:
- lib/blizzard_api/wow/profile/account_profile.rb
Overview
Simplifies the requests to Blizzard APIS
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
-
#collections(**options) ⇒ Hash
(also: #collection)
Returns the collection index for the account.
-
#get(**options) ⇒ Hash
Returns the account summary for WoW.
-
#heirloom(**options) ⇒ Hash
Returns the heirloom collection index for the account.
-
#initialize(token, **options) ⇒ AccountProfile
constructor
A new instance of AccountProfile.
-
#mounts(**options) ⇒ Hash
Returns the mount collection index for the account.
-
#pets(**options) ⇒ Hash
Returns the pet collection index for the account.
-
#protected_character(realm_id, character_id, **options) ⇒ Hash
Returns data for protected characters.
-
#toys(**options) ⇒ Hash
Returns the toy collection index for the account.
-
#transmogs(**options) ⇒ Hash
Returns the transmogs collection index for the account.
Constructor Details
#initialize(token, **options) ⇒ AccountProfile
Returns a new instance of AccountProfile.
10 11 12 13 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 10 def initialize(token, **) super(**) @token = token end |
Instance Method Details
#collections(**options) ⇒ Hash Also known as: collection
Returns the collection index for the account
in the configuration module
41 42 43 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 41 def collections(**) api_request "#{base_url(:user_profile)}/collections", **.merge() end |
#get(**options) ⇒ Hash
Returns the account summary for WoW
in the configuration module
21 22 23 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 21 def get(**) api_request base_url(:user_profile).to_s, **.merge() end |
#heirloom(**options) ⇒ Hash
Returns the heirloom collection index for the account
in the configuration module
72 73 74 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 72 def heirloom(**) api_request "#{base_url(:user_profile)}/collections/heirloom", **.merge() end |
#mounts(**options) ⇒ Hash
Returns the mount collection index for the account
in the configuration module
52 53 54 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 52 def mounts(**) api_request "#{base_url(:user_profile)}/collections/mounts", **.merge() end |
#pets(**options) ⇒ Hash
Returns the pet collection index for the account
in the configuration module
82 83 84 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 82 def pets(**) api_request "#{base_url(:user_profile)}/collections/pets", **.merge() end |
#protected_character(realm_id, character_id, **options) ⇒ Hash
Returns data for protected characters
in the configuration module
31 32 33 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 31 def protected_character(realm_id, character_id, **) api_request "#{base_url(:user_profile)}/protected-character/#{realm_id}-#{character_id}", **.merge() end |
#toys(**options) ⇒ Hash
Returns the toy collection index for the account
in the configuration module
62 63 64 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 62 def toys(**) api_request "#{base_url(:user_profile)}/collections/toys", **.merge() end |
#transmogs(**options) ⇒ Hash
Returns the transmogs collection index for the account
in the configuration module
92 93 94 |
# File 'lib/blizzard_api/wow/profile/account_profile.rb', line 92 def transmogs(**) api_request "#{base_url(:user_profile)}/collections/transmogs", **.merge() end |