Class: Sightstone::Team

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/team.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Team

Returns a new instance of Team.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/sightstone/team.rb', line 19

def initialize(data)
  @status = data['status']
  @tag = data['tag']
  @roster = Roster.new(data['roster'])
  @lastGameDate = data['lastGameDate']
  @modifyDate = data['modifyDate']
  @teamId = data['fullId']
  @lastJoinDate = data['lastJoinDate']
  @secondLastJoinDate = data['secondLastJoinDate']
  @matchHistory = []
  data['matchHistory'].each do |game|
    matchHistory << TeamHistoryGame.new(game)
  end
  @lastJoinedRankedTeamQueueDate=data['lastJoinedRankedTeamQueueDate']
  @name = data['name']
  @thirdLastJoinDate = data['thirdLastJoinDate']
  @createDate = data['createDate']
  @teamStatSummary = []
  data['teamStatSummary']['teamStatDetails'].each do |detail|
    teamStatSummary << TeamStat.new(detail)
  end

end

Instance Attribute Details

#createDateObject

Returns the value of attribute createDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def createDate
  @createDate
end

#lastGameDateObject

Returns the value of attribute lastGameDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def lastGameDate
  @lastGameDate
end

#lastJoinDateObject

Returns the value of attribute lastJoinDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def lastJoinDate
  @lastJoinDate
end

#lastJoinedRankedTeamQueueDateObject

Returns the value of attribute lastJoinedRankedTeamQueueDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def lastJoinedRankedTeamQueueDate
  @lastJoinedRankedTeamQueueDate
end

#matchHistoryObject

Returns the value of attribute matchHistory.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def matchHistory
  @matchHistory
end

#modifyDateObject

Returns the value of attribute modifyDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def modifyDate
  @modifyDate
end

#nameObject

Returns the value of attribute name.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def name
  @name
end

#rosterObject

Returns the value of attribute roster.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def roster
  @roster
end

#secondLastJoinDateObject

Returns the value of attribute secondLastJoinDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def secondLastJoinDate
  @secondLastJoinDate
end

#statusObject

Returns the value of attribute status.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def status
  @status
end

#tagObject

Returns the value of attribute tag.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def tag
  @tag
end

#teamIdObject

Returns the value of attribute teamId.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def teamId
  @teamId
end

#teamStatSummaryObject

Returns the value of attribute teamStatSummary.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def teamStatSummary
  @teamStatSummary
end

#thirdLastJoinDateObject

Returns the value of attribute thirdLastJoinDate.



18
19
20
# File 'lib/sightstone/team.rb', line 18

def thirdLastJoinDate
  @thirdLastJoinDate
end

#thridLastJoinDateFixnum

UNIX timestamp of third latest join date of a member

Returns:

  • (Fixnum)

    the current value of thridLastJoinDate



17
18
19
# File 'lib/sightstone/team.rb', line 17

def thridLastJoinDate
  @thridLastJoinDate
end