Class: Battlenet::WOW::Guild

Inherits:
APIResponse show all
Defined in:
lib/battlenet/modules/wow/guild.rb

Instance Attribute Summary

Attributes inherited from APIResponse

#data

Instance Method Summary collapse

Methods inherited from APIResponse

#get_data

Constructor Details

#initialize(options = {}) ⇒ Guild

Returns a new instance of Guild.



5
6
7
8
9
10
11
12
# File 'lib/battlenet/modules/wow/guild.rb', line 5

def initialize(options={})
  @realm          = options.delete(:realm)
  @guild_name     = options.delete(:guild_name)

  @endpoint       = "/guild/#{@realm}/#{@guild_name}"

  super(options)
end

Instance Method Details

#achievementsObject



22
23
24
# File 'lib/battlenet/modules/wow/guild.rb', line 22

def achievements
  get_data(@endpoint, {:fields => 'achievements'})
end

#challengeObject



30
31
32
# File 'lib/battlenet/modules/wow/guild.rb', line 30

def challenge
  get_data(@endpoint, {:fields => 'challenge'})
end

#membersObject



18
19
20
# File 'lib/battlenet/modules/wow/guild.rb', line 18

def members
  get_data(@endpoint, {:fields => 'members'})
end

#newsObject



26
27
28
# File 'lib/battlenet/modules/wow/guild.rb', line 26

def news
  get_data(@endpoint, {:fields => 'news'})
end

#profileObject



14
15
16
# File 'lib/battlenet/modules/wow/guild.rb', line 14

def profile
  get_data(@endpoint, {})
end