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