Class: WowCommunityApi::BattleNet
- Inherits:
-
Object
- Object
- WowCommunityApi::BattleNet
- Includes:
- HTTParty
- Defined in:
- lib/wow_community_api/battle_net.rb
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.build_query(options) ⇒ Object
19 20 21 22 23 |
# File 'lib/wow_community_api/battle_net.rb', line 19 def self.build_query() query = { :query => } query[:query].merge!(:locale => locale) if locale query end |
.get(path, options = nil) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/wow_community_api/battle_net.rb', line 12 def self.get(path, = nil) base_uri "http://#{self.region}/api/wow" results = super(URI.encode(path), build_query()) results.parsed_response if results.response.code == "200" end |
.reset! ⇒ Object
25 26 27 28 |
# File 'lib/wow_community_api/battle_net.rb', line 25 def self.reset! self.region = DEFAULT_REGION self.locale = DEFAULT_LOCALE end |