Class: BlizzardApi::Wow::Auction
- Defined in:
- lib/blizzard_api/wow/game_data/auction.rb
Overview
This class allows access to World of Warcraft auctions
You can get an instance of this class using the default region as follows:
api_instance = BlizzardApi::Wow.auction
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
- #commodities(**options) ⇒ Object
-
#get(connected_realm_id, auction_house_id = nil, **options) ⇒ Hash
Return all active auctions for the specified connected realm.
-
#index(connected_realm_id, **options) ⇒ Hash
Return all auction houses for the specified connected realm.
Methods inherited from Request
Methods inherited from Request
Constructor Details
This class inherits a constructor from BlizzardApi::Wow::Request
Instance Method Details
#commodities(**options) ⇒ Object
43 44 45 46 47 |
# File 'lib/blizzard_api/wow/game_data/auction.rb', line 43 def commodities(**) opts = { ttl: CACHE_HOUR, namespace: :dynamic }.merge() api_request "#{base_url(:game_data)}/auctions/commodities", **opts end |
#get(connected_realm_id, auction_house_id = nil, **options) ⇒ Hash
Return all active auctions for the specified connected realm
in the configuration module
33 34 35 36 37 38 39 40 41 |
# File 'lib/blizzard_api/wow/game_data/auction.rb', line 33 def get(connected_realm_id, auction_house_id = nil, **) opts = { ttl: CACHE_HOUR, namespace: :dynamic }.merge() unless auction_house_id.nil? return api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions/#{auction_house_id}", **opts end api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions", **opts end |
#index(connected_realm_id, **options) ⇒ Hash
Return all auction houses for the specified connected realm. Classic only.
in the configuration module
20 21 22 23 |
# File 'lib/blizzard_api/wow/game_data/auction.rb', line 20 def index(connected_realm_id, **) opts = { ttl: CACHE_HOUR, namespace: :dynamic }.merge() api_request "#{base_url(:game_data)}/connected-realm/#{connected_realm_id}/auctions/index", **opts end |