Class: BlizzardApi::Diablo::ItemType
- Defined in:
- lib/blizzard_api/diablo/community/item_type.rb
Overview
This class allows access to Diablo III item type data
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Diablo.item_type
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(item_type_slug, **options) ⇒ Hash
Return more information about an item type.
-
#index(**options) ⇒ Hash
Return a list of item types.
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Diablo::Request
Instance Method Details
#get(item_type_slug, **options) ⇒ Hash
Return more information about an item type
in the configuration module
30 31 32 |
# File 'lib/blizzard_api/diablo/community/item_type.rb', line 30 def get(item_type_slug, **) api_request "#{base_url(:community)}/data/item-type/#{item_type_slug}", **{ ttl: CACHE_TRIMESTER }.merge() end |
#index(**options) ⇒ Hash
Return a list of item types
in the configuration module
19 20 21 |
# File 'lib/blizzard_api/diablo/community/item_type.rb', line 19 def index(**) api_request "#{base_url(:community)}/data/item-type", **{ ttl: CACHE_TRIMESTER }.merge() end |