Class: FortniteApi::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/fortnite_api/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Player

Returns a new instance of Player.



5
6
7
# File 'lib/fortnite_api/player.rb', line 5

def initialize(opts={})
    opts.each { |k,v| instance_variable_set("@#{k.downcase}", v) }
end

Instance Attribute Details

#epicuserhandleObject (readonly)

Returns the value of attribute epicuserhandle.



3
4
5
# File 'lib/fortnite_api/player.rb', line 3

def epicuserhandle
  @epicuserhandle
end

#lifetimestatsObject (readonly)

Returns the value of attribute lifetimestats.



3
4
5
# File 'lib/fortnite_api/player.rb', line 3

def lifetimestats
  @lifetimestats
end

#platformnamelongObject (readonly)

Returns the value of attribute platformnamelong.



3
4
5
# File 'lib/fortnite_api/player.rb', line 3

def platformnamelong
  @platformnamelong
end

#recentmatchesObject (readonly)

Returns the value of attribute recentmatches.



3
4
5
# File 'lib/fortnite_api/player.rb', line 3

def recentmatches
  @recentmatches
end

#statsObject (readonly)

Returns the value of attribute stats.



3
4
5
# File 'lib/fortnite_api/player.rb', line 3

def stats
  @stats
end

Instance Method Details

#currentduoObject



25
26
27
# File 'lib/fortnite_api/player.rb', line 25

def currentduo
    CurrentDuo.new(self.stats)
end

#currentsoloObject



21
22
23
# File 'lib/fortnite_api/player.rb', line 21

def currentsolo
    CurrentSolo.new(self.stats)
end

#currentsquadObject



29
30
31
# File 'lib/fortnite_api/player.rb', line 29

def currentsquad
    CurrentSquad.new(self.stats)
end

#globalduoObject



13
14
15
# File 'lib/fortnite_api/player.rb', line 13

def globalduo
    GlobalDuo.new(self.stats)
end

#globalsoloObject



9
10
11
# File 'lib/fortnite_api/player.rb', line 9

def globalsolo
    GlobalSolo.new(self.stats)
end

#globalsquadObject



17
18
19
# File 'lib/fortnite_api/player.rb', line 17

def globalsquad
    GlobalSquad.new(self.stats)
end