Class: Diablo3Api::Player

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/diablo3_api/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username) ⇒ Player

Returns a new instance of Player.



12
13
14
# File 'lib/diablo3_api/player.rb', line 12

def initialize(username)
  self.username = username
end

Instance Attribute Details

#usernameObject

Returns the value of attribute username.



7
8
9
# File 'lib/diablo3_api/player.rb', line 7

def username
  @username
end

Instance Method Details

#profileObject



16
17
18
# File 'lib/diablo3_api/player.rb', line 16

def profile
  self.class.get "/profile/#{self.username}/"
end