Class: Warcraft::CharacterRequest

Inherits:
ApiRequest show all
Defined in:
lib/warcraft/character_request.rb

Instance Method Summary collapse

Methods inherited from ApiRequest

#get

Constructor Details

#initialize(client, region, realm, character_name) ⇒ CharacterRequest

Returns a new instance of CharacterRequest.

Parameters:



6
7
8
9
10
# File 'lib/warcraft/character_request.rb', line 6

def initialize(client, region, realm, character_name)
  super(client, region)
  @realm = realm
  @name = character_name
end

Instance Method Details

#achievementsObject



16
17
18
19
# File 'lib/warcraft/character_request.rb', line 16

def achievements
  Character::Achievements.new(@client, get("/profile/wow/character/#{@realm}/#{@name}/achievements",
                                           region: @region))
end

#profileObject



12
13
14
# File 'lib/warcraft/character_request.rb', line 12

def profile
  Character::Profile.new(@client, get("/profile/wow/character/#{@realm}/#{@name}", region: @region))
end