Class: BlizzardApi::Diablo::CharacterClass
- Defined in:
- lib/blizzard_api_rb/diablo/community/character_class.rb
Overview
This class allows access to Diablo III character data
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Diablo.character
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
-
#get(class_slug, **options) ⇒ Hash
Return information about a class.
-
#skill(class_slug, skill_slug, **options) ⇒ Hash
Return information about a class’ skill.
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Diablo::Request
Instance Method Details
#get(class_slug, **options) ⇒ Hash
Return information about a class
in the configuration module
20 21 22 |
# File 'lib/blizzard_api_rb/diablo/community/character_class.rb', line 20 def get(class_slug, **) api_request "#{base_url(:community)}/data/hero/#{class_slug}", **{ ttl: CACHE_TRIMESTER }.merge() end |
#skill(class_slug, skill_slug, **options) ⇒ Hash
Return information about a class’ skill
in the configuration module
32 33 34 35 |
# File 'lib/blizzard_api_rb/diablo/community/character_class.rb', line 32 def skill(class_slug, skill_slug, **) opts = { ttl: CACHE_TRIMESTER }.merge() api_request "#{base_url(:community)}/data/hero/#{class_slug}/skill/#{skill_slug}", **opts end |