models
This module contains the models used to represent data returned by the WOM API.
Enums related to specific services are also housed in the module.
Tip
Most of the models here you won't create, but a few you will. Those will be documented as such.
Achievement
Bases: BaseModel
Represents an achievement made by a player.
Source code in wom/models/players/models.py
accuracy
class-attribute
The margin of error for the achievements creation date.
Note
Can be None
if the achievement hasn't been recalculated since
the addition of this field (~ Feb 2023). It can also be -1 for
achievements with unknown dates.
measure
class-attribute
The AchievementMeasure
that
the player obtained.
AchievementMeasure
AchievementProgress
Bases: BaseModel
Represents progress made toward an achievement.
Source code in wom/models/players/models.py
accuracy
class-attribute
The margin of error for the achievements creation date.
Note
Can be None
if the achievement hasn't been recalculated since
the addition of this field (~ Feb 2023). It can also be -1 for
achievements with unknown dates.
created_at
class-attribute
The date the achievement was achieved, or None
if it has not
been achieved.
measure
class-attribute
The AchievementMeasure
that
the player obtained.
Activity
Bases: BaseModel
Details regarding a particular activity.
Source code in wom/models/players/models.py
ActivityGains
Bases: BaseModel
Represents activity gains made by a player.
Source code in wom/models/players/models.py
BaseModel
The base model all library models inherit from.
Source code in wom/models/base.py
to_dict
Converts this class into a dictionary.
Returns:
Type | Description |
---|---|
dict[str, t.Any]
|
The requested dictionary. |
Boss
Bases: BaseModel
Details regarding a particular boss.
Source code in wom/models/players/models.py
BossGains
Bases: BaseModel
Represents boss gains made by a player.
Source code in wom/models/players/models.py
Competition
Bases: BaseModel
Represents a competition.
Source code in wom/models/competitions/models.py
group
class-attribute
The Group
associated with the competition, if
there is one.
group_id
class-attribute
The optional group id associated with the competition.
CompetitionDetail
Bases: BaseModel
Represents competition details.
Source code in wom/models/competitions/models.py
participations
class-attribute
A list of CompetitionParticipationDetail
participations for this
competition.
CompetitionHistoryDataPoint
CompetitionParticipation
Bases: BaseModel
Represents a competition participation.
Source code in wom/models/competitions/models.py
CompetitionParticipationDetail
Bases: BaseModel
Represents competition participation details.
Source code in wom/models/competitions/models.py
participation
class-attribute
The CompetitionParticipation
in these details.
CompetitionProgress
Bases: BaseModel
Represents progress in a competition.
Source code in wom/models/competitions/models.py
CompetitionStatus
CompetitionType
CompetitionWithParticipations
Bases: BaseModel
Represents a competition with participations.
Source code in wom/models/competitions/models.py
participations
class-attribute
A list containing the CompetitionParticipations
.
ComputedGains
Bases: BaseModel
Represents computed gains made by a player.
Source code in wom/models/players/models.py
ComputedMetric
Bases: BaseModel
Details regarding a computed metric.
Source code in wom/models/players/models.py
Country
Bases: BaseEnum
Countries in the world.
Source code in wom/models/players/enums.py
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 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
|
DeltaLeaderboardEntry
Bases: BaseModel
Represents a leaderboard entry over the given delta.
Source code in wom/models/deltas/models.py
Gains
Group
Bases: BaseModel
Represents a group of players on WOM.
Source code in wom/models/groups/models.py
GroupDetail
Bases: BaseModel
Represents details about a group.
Source code in wom/models/groups/models.py
GroupHiscoresActivityItem
Bases: BaseModel
Represents a group hiscores item for activities.
Source code in wom/models/groups/models.py
GroupHiscoresBossItem
Bases: BaseModel
Represents a group hiscores item for bosses.
Source code in wom/models/groups/models.py
GroupHiscoresComputedMetricItem
Bases: BaseModel
Represents a group hiscores item for computed metrics.
Source code in wom/models/groups/models.py
GroupHiscoresEntry
Bases: BaseModel
Represents a group hiscores entry.
Source code in wom/models/groups/models.py
GroupHiscoresSkillItem
Bases: BaseModel
Represents a group hiscores item for skills.
Source code in wom/models/groups/models.py
GroupMemberFragment
Bases: BaseModel
Represents a condensed group member.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
username |
str
|
The username of the group member. |
required |
role |
GroupRole | None
|
The optional |
None
|
Tip
This is a model class that you will create in order to send data to some endpoints.
Source code in wom/models/groups/models.py
GroupMembership
GroupRole
Bases: BaseEnum
Roles that can be assigned to group members.
Source code in wom/models/groups/enums.py
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 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
|
GroupStatistics
Bases: BaseModel
Represents accumulated group statistics.
Source code in wom/models/groups/models.py
average_stats
class-attribute
The average stat StatisticsSnapshot
.
maxed_200ms_count
class-attribute
The number of maxed 200M xp players in the group.
maxed_combat_count
class-attribute
The number of maxed combat players in the group.
HttpErrorResponse
Bases: BaseModel
Indicates something went wrong during the request.
Source code in wom/models/http.py
HttpSuccessResponse
Membership
Bases: BaseModel
Represents a membership in a group.
Source code in wom/models/groups/models.py
NameChange
Bases: BaseModel
Represents a player name change.
Source code in wom/models/names/models.py
resolved_at
class-attribute
The date the name change was approved or denied.
NameChangeData
Bases: BaseModel
Metadata associated with a name change.
Source code in wom/models/names/models.py
ehb_diff
class-attribute
The difference in efficient hours bossed between the old and new usernames.
ehp_diff
class-attribute
The difference in efficient hours played between the old and new usernames.
has_negative_gains
class-attribute
Whether or not name change has negative XP gains.
hours_diff
class-attribute
Hours between old names last snapshot and new names first snapshot or the name change submission date if not tracked.
is_new_on_hiscores
class-attribute
Whether or not he new username is on the hiscores.
is_new_tracked
class-attribute
Whether or not he new username is tracked on WOM.
is_old_on_hiscores
class-attribute
Whether or not he old username is on the hiscores.
new_stats
class-attribute
The new name's first Snapshot
, current hiscores
stats if untracked or `None`` if untracked and not present on
hiscores.
NameChangeDetail
Bases: BaseModel
Details regarding a name change.
Source code in wom/models/names/models.py
data
class-attribute
The NameChangeData
for this name change.
Note
This will be None
when the name change is not pending.
NameChangeStatus
Participation
Bases: BaseModel
Represents participation in a competition.
Source code in wom/models/competitions/models.py
competition_id
class-attribute
The ID of the competition associated with this participation.
team_name
class-attribute
The optional team name associated with this participation.
Player
Bases: BaseModel
Represents a player on WOM.
Source code in wom/models/players/models.py
country
class-attribute
The players Country
country of origin, if they
have one set.
flagged
class-attribute
Whether the player is flagged for having an invalid snapshot history.
last_changed_at
class-attribute
The date of the players last change (xp gain, boss kc, etc).
last_imported_at
class-attribute
The date of the last player history import.
PlayerAchievementProgress
Bases: BaseModel
Represents a players progress toward an achievement.
Source code in wom/models/players/models.py
absolute_progress
class-attribute
The players current absolute progress toward the achievement.
Scale of 0-1 with 1 being 100% progress.
PlayerBuild
PlayerCompetitionStanding
Bases: BaseModel
Represents a players standing in a competition.
Source code in wom/models/competitions/models.py
participation
class-attribute
The PlayerParticipation
achieved by
the player.
PlayerDetail
Bases: BaseModel
Represents details about a player.
Source code in wom/models/players/models.py
latest_snapshot
class-attribute
The latest snapshot for the player, if there is one.
PlayerGainsData
Bases: BaseModel
Contains all the player gains data.
Source code in wom/models/players/models.py
PlayerMembership
PlayerParticipation
Bases: BaseModel
Represents a players participation in a competition.
Source code in wom/models/competitions/models.py
competition
class-attribute
The Competition
that the player participated
in.
PlayerType
Record
Bases: BaseModel
Represents a record held by a player.
Source code in wom/models/records/models.py
RecordLeaderboardEntry
Bases: BaseModel
Represents a player's record leaderboard entry.
Source code in wom/models/records/models.py
Skill
Bases: BaseModel
Details regarding a particular skill.
Source code in wom/models/players/models.py
SkillGains
Bases: BaseModel
Represents skill gains made by a player.
Source code in wom/models/players/models.py
Snapshot
Bases: BaseModel
Represents a player snapshot.
Source code in wom/models/players/models.py
imported_at
class-attribute
The date the snapshot was imported, if it was.
SnapshotData
Bases: BaseModel
The data associated with this snapshot.
Source code in wom/models/players/models.py
activities
class-attribute
A list of all Activities
stored in this
snapshot.
computed
class-attribute
A list of all ComputedMetrics
stored in
this snapshot.
StatisticsSnapshot
Bases: BaseModel
Represents a player statistics snapshot.
Source code in wom/models/players/models.py
created_at
class-attribute
The optional date the statistics snapshot was created.
imported_at
class-attribute
The date the snapshot was imported, if it was.
Team
Bases: BaseModel
Represents a competition team.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the team. |
required |
participants |
list[str]
|
A list of usernames to include in the team. |
required |
Tip
This is a model class that you will create in order to send data to some endpoints.
Source code in wom/models/competitions/models.py
Top5ProgressResult
Bases: BaseModel
A top 5 progress result for a competition.
Source code in wom/models/competitions/models.py
history
class-attribute
A list of CompetitionHistoryDataPoints making up the history of this top 5 progress result.