Class: LolApi::ParticipantStats
- Inherits:
-
Object
- Object
- LolApi::ParticipantStats
- Defined in:
- lib/lol_api/types/dtos/participant.rb
Instance Attribute Summary collapse
-
#raw_stats ⇒ Object
readonly
Returns the value of attribute raw_stats.
Instance Method Summary collapse
- #assists ⇒ Object
- #champ_level ⇒ Object
- #combat_player_score ⇒ Object
- #deaths ⇒ Object
- #double_kills ⇒ Object
- #first_blood_assist ⇒ Object
- #first_blood_kill ⇒ Object
- #first_inhibitor_assist ⇒ Object
- #first_inhibitor_kill ⇒ Object
- #first_tower_assist ⇒ Object
- #first_tower_kill ⇒ Object
- #gold_earned ⇒ Object
- #gold_spent ⇒ Object
- #inhibitor_kills ⇒ Object
-
#initialize(raw_stats) ⇒ ParticipantStats
constructor
A new instance of ParticipantStats.
- #inventory ⇒ Object
- #killing_sprees ⇒ Object
- #kills ⇒ Object
- #largest_crit ⇒ Object
- #largest_killing_spree ⇒ Object
- #largest_multi_kill ⇒ Object
- #magic_damage_dealt ⇒ Object
- #magic_damage_dealt_to_chanpions ⇒ Object
- #magic_damage_taken ⇒ Object
- #minions_killed ⇒ Object
- #netural_minions_killed_enemy_jungle ⇒ Object
- #netural_minions_killed_team_jungle ⇒ Object
- #neutral_minions_killed ⇒ Object
- #node_capture ⇒ Object
- #node_capture_assist ⇒ Object
- #node_neutralize ⇒ Object
- #node_neutralize_assist ⇒ Object
- #objective_player_score ⇒ Object
- #penta_kills ⇒ Object
- #physical_damage_dealt ⇒ Object
- #physical_damage_dealt_to_champions ⇒ Object
- #physical_damage_taken ⇒ Object
- #quadra_kills ⇒ Object
- #sight_wards_bought ⇒ Object
- #team_objective ⇒ Object
- #total_damage_dealt ⇒ Object
- #total_damage_dealt_to_champions ⇒ Object
- #total_damage_taken ⇒ Object
- #total_heal ⇒ Object
- #total_player_score ⇒ Object
- #total_score_rank ⇒ Object
- #total_time_crowd_control_dealt ⇒ Object
- #total_units_healed ⇒ Object
- #tower_kills ⇒ Object
- #triple_kills ⇒ Object
- #true_damage_dealt ⇒ Object
- #true_damage_dealt_to_champions ⇒ Object
- #true_damage_taken ⇒ Object
- #unreal_kills ⇒ Object
- #vision_wards_bought ⇒ Object
- #wards_killed ⇒ Object
- #wards_placed ⇒ Object
- #winner ⇒ Object
Constructor Details
#initialize(raw_stats) ⇒ ParticipantStats
Returns a new instance of ParticipantStats.
49 50 51 |
# File 'lib/lol_api/types/dtos/participant.rb', line 49 def initialize(raw_stats) @raw_stats = raw_stats end |
Instance Attribute Details
#raw_stats ⇒ Object (readonly)
Returns the value of attribute raw_stats.
47 48 49 |
# File 'lib/lol_api/types/dtos/participant.rb', line 47 def raw_stats @raw_stats end |
Instance Method Details
#assists ⇒ Object
53 54 55 |
# File 'lib/lol_api/types/dtos/participant.rb', line 53 def assists raw_stats['assists'] end |
#champ_level ⇒ Object
56 57 58 |
# File 'lib/lol_api/types/dtos/participant.rb', line 56 def champ_level raw_stats['champLevel'] end |
#combat_player_score ⇒ Object
60 61 62 |
# File 'lib/lol_api/types/dtos/participant.rb', line 60 def combat_player_score raw_stats['combatPlayerScore'] || 0 end |
#deaths ⇒ Object
64 65 66 |
# File 'lib/lol_api/types/dtos/participant.rb', line 64 def deaths raw_stats['deaths'] end |
#double_kills ⇒ Object
68 69 70 |
# File 'lib/lol_api/types/dtos/participant.rb', line 68 def double_kills raw_stats['doubleKills'] end |
#first_blood_assist ⇒ Object
72 73 74 |
# File 'lib/lol_api/types/dtos/participant.rb', line 72 def first_blood_assist raw_stats['firstBloodAssist'] end |
#first_blood_kill ⇒ Object
76 77 78 |
# File 'lib/lol_api/types/dtos/participant.rb', line 76 def first_blood_kill raw_stats['firstBloodKill'] end |
#first_inhibitor_assist ⇒ Object
80 81 82 |
# File 'lib/lol_api/types/dtos/participant.rb', line 80 def first_inhibitor_assist raw_stats['firstInhibitorAssist'] end |
#first_inhibitor_kill ⇒ Object
84 85 86 |
# File 'lib/lol_api/types/dtos/participant.rb', line 84 def first_inhibitor_kill raw_stats['firstInhibitorKill'] end |
#first_tower_assist ⇒ Object
88 89 90 |
# File 'lib/lol_api/types/dtos/participant.rb', line 88 def first_tower_assist raw_stats['firstTowerAssist'] end |
#first_tower_kill ⇒ Object
92 93 94 |
# File 'lib/lol_api/types/dtos/participant.rb', line 92 def first_tower_kill raw_stats['firstTowerKill'] end |
#gold_earned ⇒ Object
96 97 98 |
# File 'lib/lol_api/types/dtos/participant.rb', line 96 def gold_earned raw_stats['goldEarned'] end |
#gold_spent ⇒ Object
100 101 102 |
# File 'lib/lol_api/types/dtos/participant.rb', line 100 def gold_spent raw_stats['goldSpent'] end |
#inhibitor_kills ⇒ Object
104 105 106 |
# File 'lib/lol_api/types/dtos/participant.rb', line 104 def inhibitor_kills raw_stats['inhibitorKills'] end |
#inventory ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/lol_api/types/dtos/participant.rb', line 108 def inventory items = [ raw_stats['item0'], raw_stats['item1'], raw_stats['item2'], raw_stats['item3'], raw_stats['item4'], raw_stats['item5'], raw_stats['item6'], ] Inventory.new(items) end |
#killing_sprees ⇒ Object
121 122 123 |
# File 'lib/lol_api/types/dtos/participant.rb', line 121 def killing_sprees raw_stats['killingSprees'] end |
#kills ⇒ Object
125 126 127 |
# File 'lib/lol_api/types/dtos/participant.rb', line 125 def kills raw_stats['kills'] end |
#largest_crit ⇒ Object
129 130 131 |
# File 'lib/lol_api/types/dtos/participant.rb', line 129 def largest_crit raw_stats['largestCriticalStrike'] end |
#largest_killing_spree ⇒ Object
133 134 135 |
# File 'lib/lol_api/types/dtos/participant.rb', line 133 def largest_killing_spree raw_stats['largestKillingSpree'] end |
#largest_multi_kill ⇒ Object
137 138 139 |
# File 'lib/lol_api/types/dtos/participant.rb', line 137 def largest_multi_kill raw_stats['largestMultiKill'] end |
#magic_damage_dealt ⇒ Object
141 142 143 |
# File 'lib/lol_api/types/dtos/participant.rb', line 141 def magic_damage_dealt raw_stats['magicDamageDealt'] end |
#magic_damage_dealt_to_chanpions ⇒ Object
145 146 147 |
# File 'lib/lol_api/types/dtos/participant.rb', line 145 def magic_damage_dealt_to_chanpions raw_stats['magicDamageDealtToChampions'] end |
#magic_damage_taken ⇒ Object
149 150 151 |
# File 'lib/lol_api/types/dtos/participant.rb', line 149 def magic_damage_taken raw_stats['magicDamageTaken'] end |
#minions_killed ⇒ Object
153 154 155 |
# File 'lib/lol_api/types/dtos/participant.rb', line 153 def minions_killed raw_stats['minionsKilled'] end |
#netural_minions_killed_enemy_jungle ⇒ Object
161 162 163 |
# File 'lib/lol_api/types/dtos/participant.rb', line 161 def netural_minions_killed_enemy_jungle raw_stats['neutralMinionsKilledEnemyJungle'] end |
#netural_minions_killed_team_jungle ⇒ Object
165 166 167 |
# File 'lib/lol_api/types/dtos/participant.rb', line 165 def netural_minions_killed_team_jungle raw_stats['neutralMinionsKilledTeamJungle'] end |
#neutral_minions_killed ⇒ Object
157 158 159 |
# File 'lib/lol_api/types/dtos/participant.rb', line 157 def neutral_minions_killed raw_stats['neutralMinionsKilled'] end |
#node_capture ⇒ Object
169 170 171 |
# File 'lib/lol_api/types/dtos/participant.rb', line 169 def node_capture raw_stats['nodeCapture'] || 0 end |
#node_capture_assist ⇒ Object
172 173 174 |
# File 'lib/lol_api/types/dtos/participant.rb', line 172 def node_capture_assist raw_stats['nodeCaptureAssist'] || 0 end |
#node_neutralize ⇒ Object
176 177 178 |
# File 'lib/lol_api/types/dtos/participant.rb', line 176 def node_neutralize raw_stats['nodeNeutralize'] || 0 end |
#node_neutralize_assist ⇒ Object
180 181 182 |
# File 'lib/lol_api/types/dtos/participant.rb', line 180 def node_neutralize_assist raw_stats['nodeNeutralizeAssist'] || 0 end |
#objective_player_score ⇒ Object
184 185 186 |
# File 'lib/lol_api/types/dtos/participant.rb', line 184 def objective_player_score raw_stats['objectivePlayerScore'] || 0 end |
#penta_kills ⇒ Object
188 189 190 |
# File 'lib/lol_api/types/dtos/participant.rb', line 188 def penta_kills raw_stats['pentaKills'] end |
#physical_damage_dealt ⇒ Object
192 193 194 |
# File 'lib/lol_api/types/dtos/participant.rb', line 192 def physical_damage_dealt raw_stats['physicalDamageDealt'] end |
#physical_damage_dealt_to_champions ⇒ Object
196 197 198 |
# File 'lib/lol_api/types/dtos/participant.rb', line 196 def physical_damage_dealt_to_champions raw_stats['physicalDamageDealtToChampions'] end |
#physical_damage_taken ⇒ Object
200 201 202 |
# File 'lib/lol_api/types/dtos/participant.rb', line 200 def physical_damage_taken raw_stats['physicalDamageTaken'] end |
#quadra_kills ⇒ Object
204 205 206 |
# File 'lib/lol_api/types/dtos/participant.rb', line 204 def quadra_kills raw_stats['quadraKills'] end |
#sight_wards_bought ⇒ Object
208 209 210 |
# File 'lib/lol_api/types/dtos/participant.rb', line 208 def sight_wards_bought raw_stats['sightWardsBoughtInGame'] end |
#team_objective ⇒ Object
212 213 214 |
# File 'lib/lol_api/types/dtos/participant.rb', line 212 def team_objective raw_stats['teamObjectives'] || 0 end |
#total_damage_dealt ⇒ Object
216 217 218 |
# File 'lib/lol_api/types/dtos/participant.rb', line 216 def total_damage_dealt raw_stats['totalDamageDealt'] end |
#total_damage_dealt_to_champions ⇒ Object
220 221 222 |
# File 'lib/lol_api/types/dtos/participant.rb', line 220 def total_damage_dealt_to_champions raw_stats['totalDamageDealtToChampions'] end |
#total_damage_taken ⇒ Object
224 225 226 |
# File 'lib/lol_api/types/dtos/participant.rb', line 224 def total_damage_taken raw_stats['totalDamageTaken'] end |
#total_heal ⇒ Object
228 229 230 |
# File 'lib/lol_api/types/dtos/participant.rb', line 228 def total_heal raw_stats['totalHeal'] end |
#total_player_score ⇒ Object
232 233 234 |
# File 'lib/lol_api/types/dtos/participant.rb', line 232 def total_player_score raw_stats['totalPlayerScore'] || 0 end |
#total_score_rank ⇒ Object
236 237 238 |
# File 'lib/lol_api/types/dtos/participant.rb', line 236 def total_score_rank raw_stats['totalScoreRank'] || 0 end |
#total_time_crowd_control_dealt ⇒ Object
240 241 242 |
# File 'lib/lol_api/types/dtos/participant.rb', line 240 def total_time_crowd_control_dealt raw_stats['totalTimeCrowdControlDealt'] end |
#total_units_healed ⇒ Object
244 245 246 |
# File 'lib/lol_api/types/dtos/participant.rb', line 244 def total_units_healed raw_stats['totalUnitsHealed'] end |
#tower_kills ⇒ Object
248 249 250 |
# File 'lib/lol_api/types/dtos/participant.rb', line 248 def tower_kills raw_stats['towerKills'] end |
#triple_kills ⇒ Object
252 253 254 |
# File 'lib/lol_api/types/dtos/participant.rb', line 252 def triple_kills raw_stats['tripleKills'] end |
#true_damage_dealt ⇒ Object
256 257 258 |
# File 'lib/lol_api/types/dtos/participant.rb', line 256 def true_damage_dealt raw_stats['trueDamageDealt'] end |
#true_damage_dealt_to_champions ⇒ Object
260 261 262 |
# File 'lib/lol_api/types/dtos/participant.rb', line 260 def true_damage_dealt_to_champions raw_stats['trueDamageDealtToChampions'] end |
#true_damage_taken ⇒ Object
264 265 266 |
# File 'lib/lol_api/types/dtos/participant.rb', line 264 def true_damage_taken raw_stats['trueDamageTaken'] end |
#unreal_kills ⇒ Object
268 269 270 |
# File 'lib/lol_api/types/dtos/participant.rb', line 268 def unreal_kills raw_stats['unrealKills'] end |
#vision_wards_bought ⇒ Object
272 273 274 |
# File 'lib/lol_api/types/dtos/participant.rb', line 272 def vision_wards_bought raw_stats['visionWardsBoughtInGame'] end |
#wards_killed ⇒ Object
276 277 278 |
# File 'lib/lol_api/types/dtos/participant.rb', line 276 def wards_killed raw_stats['wardsKilled'] end |
#wards_placed ⇒ Object
280 281 282 |
# File 'lib/lol_api/types/dtos/participant.rb', line 280 def wards_placed raw_stats['wardsPlaced'] end |
#winner ⇒ Object
284 285 286 |
# File 'lib/lol_api/types/dtos/participant.rb', line 284 def winner raw_stats['winner'] end |