ParticipantList
Bases: list['Participant']
A specialized list for match participants with ergonomic filtering methods.
Extends the built-in list while providing convenient methods for common participant queries and filters.
Source code in nexar/models/match/participant_list.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
|
blue_team()
Get all participants on the blue team.
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing blue team participants |
by_champion(champion_name)
Filter participants by champion name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
champion_name
|
str
|
The champion name (case-insensitive) |
required |
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing participants playing the specified champion |
Source code in nexar/models/match/participant_list.py
by_position(position)
Filter participants by their team position.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position
|
MatchParticipantPosition
|
The position to filter by |
required |
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing participants in the specified position |
Source code in nexar/models/match/participant_list.py
by_puuid(puuid)
Find a participant by their PUUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
puuid
|
str
|
The player's universally unique identifier |
required |
Returns:
Type | Description |
---|---|
Participant | None
|
The participant with the matching PUUID, or None if not found |
Source code in nexar/models/match/participant_list.py
by_team(team_id)
Filter participants by team ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
team_id
|
int
|
The team ID (100 for blue, 200 for red) |
required |
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing participants on the specified team |
Source code in nexar/models/match/participant_list.py
filter(predicate)
Filter participants using a custom predicate function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
predicate
|
Callable[[Participant], bool]
|
A function that takes a Participant and returns True/False |
required |
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing participants that match the predicate |
Source code in nexar/models/match/participant_list.py
highest_kda(count=1)
Get participants with the highest KDA ratios.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
count
|
int
|
Number of top participants to return |
1
|
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList with the highest KDA participants |
Source code in nexar/models/match/participant_list.py
losers()
Get all participants who lost the match.
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing losing participants |
most_damage(count=1)
Get participants who dealt the most damage to champions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
count
|
int
|
Number of top participants to return |
1
|
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList with the highest damage dealers |
Source code in nexar/models/match/participant_list.py
most_kills(count=1)
Get participants with the most kills.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
count
|
int
|
Number of top participants to return |
1
|
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList with the most kills |
Source code in nexar/models/match/participant_list.py
red_team()
Get all participants on the red team.
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing red team participants |
sort_by(key, *, reverse=False)
Sort participants by a custom key function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
Callable[[Participant], Any]
|
A function that takes a Participant and returns a sortable value |
required |
reverse
|
bool
|
Whether to sort in descending order |
False
|
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList with participants sorted by the key |
Source code in nexar/models/match/participant_list.py
team_of(puuid)
Get the team of the participant with the given PUUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
puuid
|
str
|
The player's universally unique identifier |
required |
Returns:
Type | Description |
---|---|
ParticipantList
|
A ParticipantList containing all participants on the same team as the specified PUUID. |
Raises:
Type | Description |
---|---|
ValueError
|
If no participant with the given PUUID is found. |
Source code in nexar/models/match/participant_list.py
winners()
Get all participants who won the match.
Returns:
Type | Description |
---|---|
ParticipantList
|
A new ParticipantList containing winning participants |