Class: WowCommunityApi::Character
- Defined in:
- lib/wow_community_api/character.rb
Constant Summary
Constants inherited from BattleNet
BattleNet::DEFAULT_LOCALE, BattleNet::DEFAULT_REGION
Class Method Summary collapse
Methods inherited from BattleNet
Class Method Details
.find_by_realm_and_name(realm, name, *field) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/wow_community_api/character.rb', line 3 def self.find_by_realm_and_name(realm, name, *field) fields = { :fields => field.join(",") } unless field.empty? results = get("/character/#{realm}/#{name}", fields) results['class_id'] = results.delete('class') # handle reserved word "class" results.to_ostruct end |