Class: BlizzardApi::Diablo::Profile
- Defined in:
- lib/blizzard_api/diablo/community/profile.rb
Overview
This class allows access to Diablo III profile data
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Diablo.profile
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
-
#hero(battletag, oauth_token, hero_id, **options) ⇒ Hash
Return more data about a hero.
-
#hero_follower_items(battletag, oauth_token, hero_id, **options) ⇒ Hash
Return more data about a hero’s followers.
-
#hero_items(battletag, oauth_token, hero_id, **options) ⇒ Hash
Return more data about a hero’s items.
-
#index(battletag, oauth_token, **options) ⇒ Hash
Return an user’s profile data with a list of heroes.
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Diablo::Request
Instance Method Details
#hero(battletag, oauth_token, hero_id, **options) ⇒ Hash
Return more data about a hero
in the configuration module
39 40 41 42 |
# File 'lib/blizzard_api/diablo/community/profile.rb', line 39 def hero(battletag, oauth_token, hero_id, **) opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge() api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}", **opts end |
#hero_follower_items(battletag, oauth_token, hero_id, **options) ⇒ Hash
Return more data about a hero’s followers
in the configuration module
71 72 73 74 |
# File 'lib/blizzard_api/diablo/community/profile.rb', line 71 def hero_follower_items(battletag, oauth_token, hero_id, **) opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge() api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/follower-items", **opts end |
#hero_items(battletag, oauth_token, hero_id, **options) ⇒ Hash
Return more data about a hero’s items
in the configuration module
55 56 57 58 |
# File 'lib/blizzard_api/diablo/community/profile.rb', line 55 def hero_items(battletag, oauth_token, hero_id, **) opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge() api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/hero/#{hero_id}/items", **opts end |
#index(battletag, oauth_token, **options) ⇒ Hash
Return an user’s profile data with a list of heroes
in the configuration module
23 24 25 26 |
# File 'lib/blizzard_api/diablo/community/profile.rb', line 23 def index(battletag, oauth_token, **) opts = { access_token: oauth_token, ttl: CACHE_TRIMESTER }.merge() api_request "#{base_url(:community)}/profile/#{parse_battle_tag(battletag)}/", **opts end |