Class: Warcraft::Account::Profile
- Inherits:
-
Warcraft::ApiRequest
- Object
- Warcraft::ApiRequest
- Warcraft::Account::Profile
- Defined in:
- lib/warcraft/account/profile.rb
Overview
Returns Blizzard Battle.net Account ID.
Instance Method Summary collapse
- #all_characters ⇒ Object
- #collections ⇒ Object
-
#id ⇒ Integer
Blizzard Battle.net Account ID.
- #wow_accounts ⇒ Object
Methods inherited from Warcraft::ApiRequest
Constructor Details
This class inherits a constructor from Warcraft::ApiRequest
Instance Method Details
#all_characters ⇒ Object
16 17 18 19 20 |
# File 'lib/warcraft/account/profile.rb', line 16 def all_characters @response[:wow_accounts].map(:characters).flatten.map do |c| Fragments::AccountCharacterFragment.new(@client, c) end end |
#collections ⇒ Object
8 9 10 |
# File 'lib/warcraft/account/profile.rb', line 8 def collections link end |
#id ⇒ Integer
Returns Blizzard Battle.net Account ID.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/warcraft/account/profile.rb', line 7 class Profile < ApiRequest def collections link end def wow_accounts @wow_accounts ||= WowAccount.new(@client, @response[:wow_accounts]) end def all_characters @response[:wow_accounts].map(:characters).flatten.map do |c| Fragments::AccountCharacterFragment.new(@client, c) end end end |
#wow_accounts ⇒ Object
12 13 14 |
# File 'lib/warcraft/account/profile.rb', line 12 def wow_accounts @wow_accounts ||= WowAccount.new(@client, @response[:wow_accounts]) end |