Class: WowCommunityApi::Realm

Inherits:
BattleNet show all
Defined in:
lib/wow_community_api/realm.rb

Constant Summary

Constants inherited from BattleNet

BattleNet::DEFAULT_LOCALE, BattleNet::DEFAULT_REGION

Class Method Summary collapse

Methods inherited from BattleNet

build_query, get, reset!

Class Method Details

.find_allObject



9
10
11
# File 'lib/wow_community_api/realm.rb', line 9

def self.find_all()
  find_by_name
end

.find_by_name(*name) ⇒ Object



3
4
5
6
7
# File 'lib/wow_community_api/realm.rb', line 3

def self.find_by_name(*name)
  names = { :realms => name.join(",") } unless name.empty?
  results = get("/realm/status", names).to_ostruct
  (name.size == 1) ? results.realms.first : results.realms
end