Class: BlizzardApi::Wow::AccountProfile
- Defined in:
- lib/blizzard_api_rb/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
-
#collection(**options) ⇒ Hash
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.
Constructor Details
#initialize(token, **options) ⇒ AccountProfile
Returns a new instance of AccountProfile.
10 11 12 13 |
# File 'lib/blizzard_api_rb/wow/profile/account_profile.rb', line 10 def initialize(token, **) super(**) @token = token end |
Instance Method Details
#collection(**options) ⇒ Hash
Returns the collection index for the account
in the configuration module
41 42 43 |
# File 'lib/blizzard_api_rb/wow/profile/account_profile.rb', line 41 def collection(**) 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_rb/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
71 72 73 |
# File 'lib/blizzard_api_rb/wow/profile/account_profile.rb', line 71 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
51 52 53 |
# File 'lib/blizzard_api_rb/wow/profile/account_profile.rb', line 51 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
81 82 83 |
# File 'lib/blizzard_api_rb/wow/profile/account_profile.rb', line 81 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_rb/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
61 62 63 |
# File 'lib/blizzard_api_rb/wow/profile/account_profile.rb', line 61 def toys(**) api_request "#{base_url(:user_profile)}/collections/toys", **.merge() end |