Skip to content

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
@attrs.define(init=False)
class Achievement(BaseModel):
    """Represents an achievement made by a player."""

    player_id: int
    """The unique ID of the player."""

    name: str
    """The name of the achievement."""

    metric: enums.Metric
    """The [`Metric`][wom.Metric] for this achievement."""

    measure: AchievementMeasure
    """The [`AchievementMeasure`][wom.AchievementMeasure] that
    the player obtained.
    """

    threshold: int
    """The threshold for this achievement."""

    created_at: datetime
    """The date the achievement was achieved."""

    accuracy: t.Optional[int]
    """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.
    """

accuracy instance-attribute

accuracy: t.Optional[int]

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 instance-attribute

created_at: datetime

The date the achievement was achieved.

measure instance-attribute

measure: AchievementMeasure

The AchievementMeasure that the player obtained.

metric instance-attribute

metric: enums.Metric

The Metric for this achievement.

name instance-attribute

name: str

The name of the achievement.

player_id instance-attribute

player_id: int

The unique ID of the player.

threshold instance-attribute

threshold: int

The threshold for this achievement.

AchievementMeasure

Bases: BaseEnum

Measures used to categorize achievements.

Source code in wom/models/players/enums.py
class AchievementMeasure(BaseEnum):
    """Measures used to categorize achievements."""

    Levels = "levels"
    Experience = "experience"
    Kills = "kills"
    Score = "score"
    Value = "value"

AchievementProgress

Bases: BaseModel

Represents progress made toward an achievement.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class AchievementProgress(BaseModel):
    """Represents progress made toward an achievement."""

    player_id: int
    """The unique ID of the player."""

    name: str
    """The name of the achievement."""

    metric: enums.Metric
    """The [`Metric`][wom.Metric] for this achievement."""

    measure: AchievementMeasure
    """The [`AchievementMeasure`][wom.AchievementMeasure] that
    the player obtained.
    """

    threshold: int
    """The threshold for this achievement."""

    created_at: t.Optional[datetime]
    """The date the achievement was achieved, or `None` if it has not
    been achieved.
    """

    accuracy: t.Optional[int]
    """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.
    """

accuracy instance-attribute

accuracy: t.Optional[int]

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 instance-attribute

created_at: t.Optional[datetime]

The date the achievement was achieved, or None if it has not been achieved.

measure instance-attribute

measure: AchievementMeasure

The AchievementMeasure that the player obtained.

metric instance-attribute

metric: enums.Metric

The Metric for this achievement.

name instance-attribute

name: str

The name of the achievement.

player_id instance-attribute

player_id: int

The unique ID of the player.

threshold instance-attribute

threshold: int

The threshold for this achievement.

Activity

Bases: BaseModel

Details regarding a particular activity.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Activity(BaseModel):
    """Details regarding a particular activity."""

    metric: enums.Activities
    """The [`Activities`][wom.Activities] being measured."""

    rank: int
    """The players rank in the activity."""

    score: int
    """The players score in the activity."""

metric instance-attribute

metric: enums.Activities

The Activities being measured.

rank instance-attribute

rank: int

The players rank in the activity.

score instance-attribute

score: int

The players score in the activity.

ActivityGains

Bases: BaseModel

Represents activity gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class ActivityGains(BaseModel):
    """Represents activity gains made by a player."""

    metric: enums.Activities
    """The [`Activities`][wom.Activities] being measured."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    score: Gains
    """The score [`Gains`][wom.Gains]."""

metric instance-attribute

metric: enums.Activities

The Activities being measured.

rank instance-attribute

rank: Gains

The rank Gains.

score instance-attribute

score: Gains

The score Gains.

ActivityLeader

Bases: BaseModel

Represents a leader in a particular activity.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class ActivityLeader(BaseModel):
    """Represents a leader in a particular activity."""

    metric: enums.Activities
    """The [`Activities`][wom.Activities] being measured."""

    rank: int
    """The players rank in the activity."""

    score: int
    """The players score in the activity."""

    player: t.Optional[Player]
    """The player leading in this metric, or `None` if none do."""

metric instance-attribute

metric: enums.Activities

The Activities being measured.

player instance-attribute

player: t.Optional[Player]

The player leading in this metric, or None if none do.

rank instance-attribute

rank: int

The players rank in the activity.

score instance-attribute

score: int

The players score in the activity.

BaseModel

The base model all library models inherit from.

Source code in wom/models/base.py
@attrs.define
class BaseModel:
    """The base model all library models inherit from."""

    def to_dict(self) -> t.Dict[str, t.Any]:
        """Converts this class into a dictionary.

        Returns:
            The requested dictionary.
        """
        return attrs.asdict(self)

to_dict

to_dict() -> t.Dict[str, t.Any]

Converts this class into a dictionary.

Returns:

Type Description
Dict[str, Any]

The requested dictionary.

Source code in wom/models/base.py
def to_dict(self) -> t.Dict[str, t.Any]:
    """Converts this class into a dictionary.

    Returns:
        The requested dictionary.
    """
    return attrs.asdict(self)

Boss

Bases: BaseModel

Details regarding a particular boss.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Boss(BaseModel):
    """Details regarding a particular boss."""

    metric: enums.Bosses
    """The [`Bosses`][wom.Bosses] being measured."""

    rank: int
    """The players rank in killing the boss."""

    kills: int
    """The number of kills the player has."""

    ehb: float
    """The players efficient hours bossed for the boss."""

ehb instance-attribute

ehb: float

The players efficient hours bossed for the boss.

kills instance-attribute

kills: int

The number of kills the player has.

metric instance-attribute

metric: enums.Bosses

The Bosses being measured.

rank instance-attribute

rank: int

The players rank in killing the boss.

BossGains

Bases: BaseModel

Represents boss gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class BossGains(BaseModel):
    """Represents boss gains made by a player."""

    metric: enums.Bosses
    """The [`Bosses`][wom.Bosses] being measured."""

    ehb: Gains
    """The efficient hours bossed [`Gains`][wom.Gains]."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    kills: Gains
    """The boss kill [`Gains`][wom.Gains]."""

ehb instance-attribute

ehb: Gains

The efficient hours bossed Gains.

kills instance-attribute

kills: Gains

The boss kill Gains.

metric instance-attribute

metric: enums.Bosses

The Bosses being measured.

rank instance-attribute

rank: Gains

The rank Gains.

BossLeader

Bases: BaseModel

Represents a leader in a particular boss.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class BossLeader(BaseModel):
    """Represents a leader in a particular boss."""

    metric: enums.Bosses
    """The [`Bosses`][wom.Bosses] being measured."""

    rank: int
    """The players rank in killing the boss."""

    kills: int
    """The number of kills the player has."""

    player: t.Optional[Player]
    """The player leading in this metric, or `None` if none do."""

kills instance-attribute

kills: int

The number of kills the player has.

metric instance-attribute

metric: enums.Bosses

The Bosses being measured.

player instance-attribute

player: t.Optional[Player]

The player leading in this metric, or None if none do.

rank instance-attribute

rank: int

The players rank in killing the boss.

Competition

Bases: BaseModel

Represents a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class Competition(BaseModel):
    """Represents a competition."""

    id: int
    """The unique ID of the competition."""

    title: str
    """The title of the competition."""

    metric: enums.Metric
    """The metric being measured."""

    type: CompetitionType
    """The [CompetitionType][wom.CompetitionType]."""

    starts_at: datetime
    """The date the competition started at."""

    ends_at: datetime
    """The date the competition ended at."""

    group_id: t.Optional[int]
    """The optional group id associated with the competition."""

    score: int
    """The competition's score."""

    created_at: datetime
    """The date the competition was created."""

    updated_at: datetime
    """The date the competition was updated."""

    participant_count: int
    """The number of players participating."""

    group: t.Optional[Group]
    """The [`Group`][wom.Group] associated with the competition, if
    there is one.
    """

created_at instance-attribute

created_at: datetime

The date the competition was created.

ends_at instance-attribute

ends_at: datetime

The date the competition ended at.

group instance-attribute

group: t.Optional[Group]

The Group associated with the competition, if there is one.

group_id instance-attribute

group_id: t.Optional[int]

The optional group id associated with the competition.

id instance-attribute

id: int

The unique ID of the competition.

metric instance-attribute

metric: enums.Metric

The metric being measured.

participant_count instance-attribute

participant_count: int

The number of players participating.

score instance-attribute

score: int

The competition's score.

starts_at instance-attribute

starts_at: datetime

The date the competition started at.

title instance-attribute

title: str

The title of the competition.

type instance-attribute

type: CompetitionType

updated_at instance-attribute

updated_at: datetime

The date the competition was updated.

CompetitionDetail

Bases: BaseModel

Represents competition details.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionDetail(BaseModel):
    """Represents competition details."""

    competition: Competition
    """The [`Competition`][wom.Competition] that is being detailed."""

    participations: t.List[CompetitionParticipationDetail]
    """A list of [`CompetitionParticipationDetail`]
    [wom.CompetitionParticipationDetail] participations for this
    competition.
    """

competition instance-attribute

competition: Competition

The Competition that is being detailed.

participations instance-attribute

participations: t.List[CompetitionParticipationDetail]

A list of CompetitionParticipationDetail participations for this competition.

CompetitionHistoryDataPoint

Bases: BaseModel

A competition history data point.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionHistoryDataPoint(BaseModel):
    """A competition history data point."""

    date: datetime
    """The date this data point occurred."""

    value: int
    """The value of the data point."""

date instance-attribute

date: datetime

The date this data point occurred.

value instance-attribute

value: int

The value of the data point.

CompetitionParticipation

Bases: BaseModel

Represents a competition participation.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionParticipation(BaseModel):
    """Represents a competition participation."""

    data: Participation
    """The [`Participation`][wom.models.Participation] achieved in this
    competition.
    """

    player: Player
    """The [`Player`][wom.Player] that participated in this competition.
    """

data instance-attribute

data: Participation

The Participation achieved in this competition.

player instance-attribute

player: Player

The Player that participated in this competition.

CompetitionParticipationDetail

Bases: BaseModel

Represents competition participation details.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionParticipationDetail(BaseModel):
    """Represents competition participation details."""

    participation: CompetitionParticipation
    """The [`CompetitionParticipation`][wom.CompetitionParticipation]
    in these details.
    """

    progress: CompetitionProgress
    """The [`CompetitionProgress`][wom.CompetitionProgress] that was
    made.
    """

participation instance-attribute

participation: CompetitionParticipation

The CompetitionParticipation in these details.

progress instance-attribute

progress: CompetitionProgress

The CompetitionProgress that was made.

CompetitionProgress

Bases: BaseModel

Represents progress in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionProgress(BaseModel):
    """Represents progress in a competition."""

    start: int
    """The starting value for the competition's metric."""

    end: int
    """The ending value for the competition's metric."""

    gained: int
    """The amount of progress gained in the metric."""

end instance-attribute

end: int

The ending value for the competition's metric.

gained instance-attribute

gained: int

The amount of progress gained in the metric.

start instance-attribute

start: int

The starting value for the competition's metric.

CompetitionStatus

Bases: BaseEnum

Potential competition statuses.

Source code in wom/models/competitions/enums.py
class CompetitionStatus(BaseEnum):
    """Potential competition statuses."""

    Upcoming = "upcoming"
    Ongoing = "ongoing"
    Finished = "finished"

CompetitionType

Bases: BaseEnum

Competition types available on WOM.

Source code in wom/models/competitions/enums.py
class CompetitionType(BaseEnum):
    """Competition types available on WOM."""

    Classic = "classic"
    Team = "team"

CompetitionWithParticipations

Bases: BaseModel

Represents a competition with participations.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionWithParticipations(BaseModel):
    """Represents a competition with participations."""

    competition: Competition
    """The [`Competition`][wom.Competition] itself."""

    participations: t.List[CompetitionParticipation]
    """A list containing the [`CompetitionParticipations`]
    [wom.CompetitionParticipation].
    """

    verification_code: t.Optional[str]
    """The verification code for the competition.

    !!! note

        Only returned when a competition is created and will be
        `None` otherwise.
    """

competition instance-attribute

competition: Competition

The Competition itself.

participations instance-attribute

participations: t.List[CompetitionParticipation]

A list containing the CompetitionParticipations.

verification_code instance-attribute

verification_code: t.Optional[str]

The verification code for the competition.

Note

Only returned when a competition is created and will be None otherwise.

ComputedGains

Bases: BaseModel

Represents computed gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class ComputedGains(BaseModel):
    """Represents computed gains made by a player."""

    metric: enums.ComputedMetrics
    """The [`ComputedMetrics`][wom.ComputedMetrics] being measured."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    value: Gains
    """The value [`Gains`][wom.Gains]."""

metric instance-attribute

metric: enums.ComputedMetrics

The ComputedMetrics being measured.

rank instance-attribute

rank: Gains

The rank Gains.

value instance-attribute

value: Gains

The value Gains.

ComputedMetric

Bases: BaseModel

Details regarding a computed metric.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class ComputedMetric(BaseModel):
    """Details regarding a computed metric."""

    metric: enums.ComputedMetrics
    """The [`ComputedMetrics`][wom.ComputedMetrics] being
    measured.
    """

    rank: int
    """The players rank in the computed metric."""

    value: float
    """The value of the computed metric."""

metric instance-attribute

metric: enums.ComputedMetrics

The ComputedMetrics being measured.

rank instance-attribute

rank: int

The players rank in the computed metric.

value instance-attribute

value: float

The value of the computed metric.

ComputedMetricLeader

Bases: BaseModel

Represents a leader in a particular computed metric.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class ComputedMetricLeader(BaseModel):
    """Represents a leader in a particular computed metric."""

    metric: enums.ComputedMetrics
    """The [`ComputedMetrics`][wom.ComputedMetrics] being
    measured.
    """

    rank: int
    """The players rank in the computed metric."""

    value: int
    """The value of the computed metric."""

    player: t.Optional[Player]
    """The player leading in this metric, or `None` if none do."""

metric instance-attribute

metric: enums.ComputedMetrics

The ComputedMetrics being measured.

player instance-attribute

player: t.Optional[Player]

The player leading in this metric, or None if none do.

rank instance-attribute

rank: int

The players rank in the computed metric.

value instance-attribute

value: int

The value of the computed metric.

Country

Bases: BaseEnum

Countries in the world.

Source code in wom/models/players/enums.py
class Country(BaseEnum):
    """Countries in the world."""

    Ad = "AD"
    Ae = "AE"
    Af = "AF"
    Ag = "AG"
    Ai = "AI"
    Al = "AL"
    Am = "AM"
    Ao = "AO"
    Aq = "AQ"
    Ar = "AR"
    As = "AS"
    At = "AT"
    Au = "AU"
    Aw = "AW"
    Ax = "AX"
    Az = "AZ"
    Ba = "BA"
    Bb = "BB"
    Bd = "BD"
    Be = "BE"
    Bf = "BF"
    Bg = "BG"
    Bh = "BH"
    Bi = "BI"
    Bj = "BJ"
    Bl = "BL"
    Bm = "BM"
    Bn = "BN"
    Bo = "BO"
    Bq = "BQ"
    Br = "BR"
    Bs = "BS"
    Bt = "BT"
    Bv = "BV"
    Bw = "BW"
    By = "BY"
    Bz = "BZ"
    Ca = "CA"
    Cc = "CC"
    Cd = "CD"
    Cf = "CF"
    Cg = "CG"
    Ch = "CH"
    Ci = "CI"
    Ck = "CK"
    Cl = "CL"
    Cm = "CM"
    Cn = "CN"
    Co = "CO"
    Cr = "CR"
    Cu = "CU"
    Cv = "CV"
    Cw = "CW"
    Cx = "CX"
    Cy = "CY"
    Cz = "CZ"
    De = "DE"
    Dj = "DJ"
    Dk = "DK"
    Dm = "DM"
    Do = "DO"
    Dz = "DZ"
    Ec = "EC"
    Ee = "EE"
    Eg = "EG"
    Eh = "EH"
    Er = "ER"
    Es = "ES"
    Et = "ET"
    Fi = "FI"
    Fj = "FJ"
    Fk = "FK"
    Fm = "FM"
    Fo = "FO"
    Fr = "FR"
    Ga = "GA"
    Gb = "GB"
    Gd = "GD"
    Ge = "GE"
    Gf = "GF"
    Gg = "GG"
    Gh = "GH"
    Gi = "GI"
    Gl = "GL"
    Gm = "GM"
    Gn = "GN"
    Gp = "GP"
    Gq = "GQ"
    Gr = "GR"
    Gs = "GS"
    Gt = "GT"
    Gu = "GU"
    Gw = "GW"
    Gy = "GY"
    Hk = "HK"
    Hm = "HM"
    Hn = "HN"
    Hr = "HR"
    Ht = "HT"
    Hu = "HU"
    Id = "ID"
    Ie = "IE"
    Il = "IL"
    Im = "IM"
    In = "IN"
    Io = "IO"
    Iq = "IQ"
    Ir = "IR"
    Is = "IS"
    It = "IT"
    Je = "JE"
    Jm = "JM"
    Jo = "JO"
    Jp = "JP"
    Ke = "KE"
    Kg = "KG"
    Kh = "KH"
    Ki = "KI"
    Km = "KM"
    Kn = "KN"
    Kp = "KP"
    Kr = "KR"
    Kw = "KW"
    Ky = "KY"
    Kz = "KZ"
    La = "LA"
    Lb = "LB"
    Lc = "LC"
    Li = "LI"
    Lk = "LK"
    Lr = "LR"
    Ls = "LS"
    Lt = "LT"
    Lu = "LU"
    Lv = "LV"
    Ly = "LY"
    Ma = "MA"
    Mc = "MC"
    Md = "MD"
    Me = "ME"
    Mf = "MF"
    Mg = "MG"
    Mh = "MH"
    Mk = "MK"
    Ml = "ML"
    Mm = "MM"
    Mn = "MN"
    Mo = "MO"
    Mp = "MP"
    Mq = "MQ"
    Mr = "MR"
    Ms = "MS"
    Mt = "MT"
    Mu = "MU"
    Mv = "MV"
    Mw = "MW"
    Mx = "MX"
    My = "MY"
    Mz = "MZ"
    Na = "NA"
    Nc = "NC"
    Ne = "NE"
    Nf = "NF"
    Ng = "NG"
    Ni = "NI"
    Nl = "NL"
    No = "NO"
    Np = "NP"
    Nr = "NR"
    Nu = "NU"
    Nz = "NZ"
    Om = "OM"
    Pa = "PA"
    Pe = "PE"
    Pf = "PF"
    Pg = "PG"
    Ph = "PH"
    Pk = "PK"
    Pl = "PL"
    Pm = "PM"
    Pn = "PN"
    Pr = "PR"
    Ps = "PS"
    Pt = "PT"
    Pw = "PW"
    Py = "PY"
    Qa = "QA"
    Re = "RE"
    Ro = "RO"
    Rs = "RS"
    Ru = "RU"
    Rw = "RW"
    Sa = "SA"
    Sb = "SB"
    Sc = "SC"
    Sd = "SD"
    Se = "SE"
    Sg = "SG"
    Sh = "SH"
    Si = "SI"
    Sj = "SJ"
    Sk = "SK"
    Sl = "SL"
    Sm = "SM"
    Sn = "SN"
    So = "SO"
    Sr = "SR"
    Ss = "SS"
    St = "ST"
    Sv = "SV"
    Sx = "SX"
    Sy = "SY"
    Sz = "SZ"
    Tc = "TC"
    Td = "TD"
    Tf = "TF"
    Tg = "TG"
    Th = "TH"
    Tj = "TJ"
    Tk = "TK"
    Tl = "TL"
    Tm = "TM"
    Tn = "TN"
    To = "TO"
    Tr = "TR"
    Tt = "TT"
    Tv = "TV"
    Tw = "TW"
    Tz = "TZ"
    Ua = "UA"
    Ug = "UG"
    Um = "UM"
    Us = "US"
    Uy = "UY"
    Uz = "UZ"
    Va = "VA"
    Vc = "VC"
    Ve = "VE"
    Vg = "VG"
    Vi = "VI"
    Vn = "VN"
    Vu = "VU"
    Wf = "WF"
    Ws = "WS"
    Ye = "YE"
    Yt = "YT"
    Za = "ZA"
    Zm = "ZM"
    Zw = "ZW"

DeltaLeaderboardEntry

Bases: BaseModel

Represents a leaderboard entry over the given delta.

Source code in wom/models/deltas/models.py
@attrs.define(init=False)
class DeltaLeaderboardEntry(BaseModel):
    """Represents a leaderboard entry over the given delta."""

    player_id: int
    """The ID of the player holding this leaderboard entry."""

    gained: int
    """The value gained over the delta."""

    start_date: datetime
    """The start date of the delta."""

    end_date: datetime
    """The end date of the delta."""

    player: Player
    """The [`Player`][wom.Player] holding this leaderboard entry."""

end_date instance-attribute

end_date: datetime

The end date of the delta.

gained instance-attribute

gained: int

The value gained over the delta.

player instance-attribute

player: Player

The Player holding this leaderboard entry.

player_id instance-attribute

player_id: int

The ID of the player holding this leaderboard entry.

start_date instance-attribute

start_date: datetime

The start date of the delta.

DeniedNameChangeReviewContext

Bases: NameChangeReviewContext

The review context for a name change that was denied.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class DeniedNameChangeReviewContext(NameChangeReviewContext):  # type: ignore[override]
    """The review context for a name change that was denied."""

    reason: t.Literal[
        NameChangeReviewReason.ManualReview,
        NameChangeReviewReason.OldStatsNotFound,
        NameChangeReviewReason.NewNameNotFound,
        NameChangeReviewReason.NegativeGains,
    ]
    """The reason this name change was denied."""

    negative_gains: t.Optional[t.Dict[enums.Metric, int]]
    """The negative gains that were observed, if there were any. Only populated
    when the reason is `NegativeGains`.
    """

negative_gains instance-attribute

negative_gains: t.Optional[t.Dict[enums.Metric, int]]

The negative gains that were observed, if there were any. Only populated when the reason is NegativeGains.

reason instance-attribute

reason: t.Literal[
    NameChangeReviewReason.ManualReview,
    NameChangeReviewReason.OldStatsNotFound,
    NameChangeReviewReason.NewNameNotFound,
    NameChangeReviewReason.NegativeGains,
]

The reason this name change was denied.

Gains

Bases: BaseModel

Represents gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Gains(BaseModel):
    """Represents gains made by a player."""

    gained: float
    """The amount gained."""

    start: float
    """The starting amount."""

    end: float
    """The ending amount."""

end instance-attribute

end: float

The ending amount.

gained instance-attribute

gained: float

The amount gained.

start instance-attribute

start: float

The starting amount.

Group

Bases: BaseModel

Represents a group of players on WOM.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class Group(BaseModel):
    """Represents a group of players on WOM."""

    id: int
    """The unique ID for this group."""

    name: str
    """The groups name."""

    clan_chat: str
    """The clan chat for this group."""

    description: t.Optional[str]
    """The groups optional description."""

    homeworld: t.Optional[int]
    """The groups optional homeworld."""

    verified: bool
    """Whether or not this group is verified."""

    score: int
    """The groups score."""

    created_at: datetime
    """The date the group was created."""

    updated_at: datetime
    """The date the group was updated."""

    member_count: int
    """The number of members in the group."""

clan_chat instance-attribute

clan_chat: str

The clan chat for this group.

created_at instance-attribute

created_at: datetime

The date the group was created.

description instance-attribute

description: t.Optional[str]

The groups optional description.

homeworld instance-attribute

homeworld: t.Optional[int]

The groups optional homeworld.

id instance-attribute

id: int

The unique ID for this group.

member_count instance-attribute

member_count: int

The number of members in the group.

name instance-attribute

name: str

The groups name.

score instance-attribute

score: int

The groups score.

updated_at instance-attribute

updated_at: datetime

The date the group was updated.

verified instance-attribute

verified: bool

Whether or not this group is verified.

GroupDetail

Bases: BaseModel

Represents details about a group.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupDetail(BaseModel):
    """Represents details about a group."""

    group: Group
    """The [`Group`][wom.Group] itself."""

    memberships: t.List[GroupMembership]
    """A list of [`GroupMemberships`][wom.GroupMembership]."""

    verification_code: t.Optional[str]
    """The optional verification code for the group.

    !!! note

        This will only be present on group creation.
    """

group instance-attribute

group: Group

The Group itself.

memberships instance-attribute

memberships: t.List[GroupMembership]

A list of GroupMemberships.

verification_code instance-attribute

verification_code: t.Optional[str]

The optional verification code for the group.

Note

This will only be present on group creation.

GroupHiscoresActivityItem

Bases: BaseModel

Represents a group hiscores item for activities.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresActivityItem(BaseModel):
    """Represents a group hiscores item for activities."""

    rank: int
    """The rank of the hiscore."""

    score: int
    """The activity score."""

rank instance-attribute

rank: int

The rank of the hiscore.

score instance-attribute

score: int

The activity score.

GroupHiscoresBossItem

Bases: BaseModel

Represents a group hiscores item for bosses.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresBossItem(BaseModel):
    """Represents a group hiscores item for bosses."""

    rank: int
    """The rank of the hiscore."""

    kills: int
    """The number of boss kills."""

kills instance-attribute

kills: int

The number of boss kills.

rank instance-attribute

rank: int

The rank of the hiscore.

GroupHiscoresComputedMetricItem

Bases: BaseModel

Represents a group hiscores item for computed metrics.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresComputedMetricItem(BaseModel):
    """Represents a group hiscores item for computed metrics."""

    rank: int
    """The rank of the hiscore."""

    value: int
    """The value of the computed metric."""

rank instance-attribute

rank: int

The rank of the hiscore.

value instance-attribute

value: int

The value of the computed metric.

GroupHiscoresEntry

Bases: BaseModel

Represents a group hiscores entry.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresEntry(BaseModel):
    """Represents a group hiscores entry."""

    player: Player
    """The [`Player`][wom.Player] responsible for the entry."""

    data: t.Union[
        GroupHiscoresActivityItem,
        GroupHiscoresBossItem,
        GroupHiscoresSkillItem,
        GroupHiscoresComputedMetricItem,
    ]
    """The data for this hiscores entry."""

data instance-attribute

data: t.Union[
    GroupHiscoresActivityItem,
    GroupHiscoresBossItem,
    GroupHiscoresSkillItem,
    GroupHiscoresComputedMetricItem,
]

The data for this hiscores entry.

player instance-attribute

player: Player

The Player responsible for the entry.

GroupHiscoresSkillItem

Bases: BaseModel

Represents a group hiscores item for skills.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresSkillItem(BaseModel):
    """Represents a group hiscores item for skills."""

    rank: int
    """The rank of the hiscore."""

    level: int
    """The level of the skill."""

    experience: int
    """The experience in the skill."""

experience instance-attribute

experience: int

The experience in the skill.

level instance-attribute

level: int

The level of the skill.

rank instance-attribute

rank: int

The rank of the hiscore.

GroupMemberFragment

Bases: BaseModel

Represents a condensed group member.

Parameters:

Name Type Description Default
username str

The username of the group member.

required
role Optional[GroupRole]

The optional GroupRole to give the member.

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
@attrs.define
class GroupMemberFragment(BaseModel):
    """Represents a condensed group member.

    Args:
        username: The username of the group member.

        role: The optional [`GroupRole`][wom.models.GroupRole] to
            give the member.

    !!! tip

        This is a model class that you will create in order to send
        data to some endpoints.
    """

    def __init__(self, username: str, role: t.Optional[GroupRole] = None) -> None:
        self.username = username
        self.role = role

    username: str
    """The group members username."""

    role: t.Optional[GroupRole]
    """The optional [`GroupRole`][wom.GroupRole] for the member.
    """

role instance-attribute

role: t.Optional[GroupRole]

The optional GroupRole for the member.

username instance-attribute

username: str

The group members username.

GroupMemberGains

Bases: BaseModel

Represents a leaderboard entry over the given delta.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupMemberGains(BaseModel):
    """Represents a leaderboard entry over the given delta."""

    start_date: datetime
    """The start date of the gains."""

    end_date: datetime
    """The end date of the gains."""

    player: Player
    """The [`Player`][wom.Player] that attained these gains."""

    data: Gains
    """The [`Gains`][wom.Gains] for this group member."""

data instance-attribute

data: Gains

The Gains for this group member.

end_date instance-attribute

end_date: datetime

The end date of the gains.

player instance-attribute

player: Player

The Player that attained these gains.

start_date instance-attribute

start_date: datetime

The start date of the gains.

GroupMembership

Bases: BaseModel

Represents a group membership.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupMembership(BaseModel):
    """Represents a group membership."""

    player: Player
    """The [`Player`][wom.Player] that is a member."""

    membership: Membership
    """The [`Membership`][wom.Membership] itself."""

membership instance-attribute

membership: Membership

The Membership itself.

player instance-attribute

player: Player

The Player that is a member.

GroupRole

Bases: BaseEnum

Roles that can be assigned to group members.

Source code in wom/models/groups/enums.py
class GroupRole(BaseEnum):
    """Roles that can be assigned to group members."""

    Achiever = "achiever"
    Adamant = "adamant"
    Adept = "adept"
    Administrator = "administrator"
    Admiral = "admiral"
    Adventurer = "adventurer"
    Air = "air"
    Anchor = "anchor"
    Apothecary = "apothecary"
    Archer = "archer"
    Armadylean = "armadylean"
    Artillery = "artillery"
    Artisan = "artisan"
    Asgarnian = "asgarnian"
    Assassin = "assassin"
    Assistant = "assistant"
    Astral = "astral"
    Athlete = "athlete"
    Attacker = "attacker"
    Bandit = "bandit"
    Bandosian = "bandosian"
    Barbarian = "barbarian"
    Battlemage = "battlemage"
    Beast = "beast"
    Berserker = "berserker"
    Blisterwood = "blisterwood"
    Blood = "blood"
    Blue = "blue"
    Bob = "bob"
    Body = "body"
    Brassican = "brassican"
    Brawler = "brawler"
    Brigadier = "brigadier"
    Brigand = "brigand"
    Bronze = "bronze"
    Bruiser = "bruiser"
    Bulwark = "bulwark"
    Burglar = "burglar"
    Burnt = "burnt"
    Cadet = "cadet"
    Captain = "captain"
    Carry = "carry"
    Champion = "champion"
    Chaos = "chaos"
    Cleric = "cleric"
    Collector = "collector"
    Colonel = "colonel"
    Commander = "commander"
    Competitor = "competitor"
    Completionist = "completionist"
    Constructor = "constructor"
    Cook = "cook"
    Coordinator = "coordinator"
    Corporal = "corporal"
    Cosmic = "cosmic"
    Councillor = "councillor"
    Crafter = "crafter"
    Crew = "crew"
    Crusader = "crusader"
    Cutpurse = "cutpurse"
    Death = "death"
    Defender = "defender"
    Defiler = "defiler"
    Deputy_owner = "deputy_owner"
    Destroyer = "destroyer"
    Diamond = "diamond"
    Diseased = "diseased"
    Doctor = "doctor"
    Dogsbody = "dogsbody"
    Dragon = "dragon"
    Dragonstone = "dragonstone"
    Druid = "druid"
    Duellist = "duellist"
    Earth = "earth"
    Elite = "elite"
    Emerald = "emerald"
    Enforcer = "enforcer"
    Epic = "epic"
    Executive = "executive"
    Expert = "expert"
    Explorer = "explorer"
    Farmer = "farmer"
    Feeder = "feeder"
    Fighter = "fighter"
    Fire = "fire"
    Firemaker = "firemaker"
    Firestarter = "firestarter"
    Fisher = "fisher"
    Fletcher = "fletcher"
    Forager = "forager"
    Fremennik = "fremennik"
    Gamer = "gamer"
    Gatherer = "gatherer"
    General = "general"
    Gnome_child = "gnome_child"
    Gnome_elder = "gnome_elder"
    Goblin = "goblin"
    Gold = "gold"
    Goon = "goon"
    Green = "green"
    Grey = "grey"
    Guardian = "guardian"
    Guthixian = "guthixian"
    Harpoon = "harpoon"
    Healer = "healer"
    Hellcat = "hellcat"
    Helper = "helper"
    Herbologist = "herbologist"
    Hero = "hero"
    Holy = "holy"
    Hoarder = "hoarder"
    Hunter = "hunter"
    Ignitor = "ignitor"
    Illusionist = "illusionist"
    Imp = "imp"
    Infantry = "infantry"
    Inquisitor = "inquisitor"
    Iron = "iron"
    Jade = "jade"
    Justiciar = "justiciar"
    Kandarin = "kandarin"
    Karamjan = "karamjan"
    Kharidian = "kharidian"
    Kitten = "kitten"
    Knight = "knight"
    Labourer = "labourer"
    Law = "law"
    Leader = "leader"
    Learner = "learner"
    Legacy = "legacy"
    Legend = "legend"
    Legionnaire = "legionnaire"
    Lieutenant = "lieutenant"
    Looter = "looter"
    Lumberjack = "lumberjack"
    Magic = "magic"
    Magician = "magician"
    Major = "major"
    Maple = "maple"
    Marshal = "marshal"
    Master = "master"
    Maxed = "maxed"
    Mediator = "mediator"
    Medic = "medic"
    Mentor = "mentor"
    Member = "member"
    Merchant = "merchant"
    Mind = "mind"
    Miner = "miner"
    Minion = "minion"
    Misthalinian = "misthalinian"
    Mithril = "mithril"
    Moderator = "moderator"
    Monarch = "monarch"
    Morytanian = "morytanian"
    Mystic = "mystic"
    Myth = "myth"
    Natural = "natural"
    Nature = "nature"
    Necromancer = "necromancer"
    Ninja = "ninja"
    Noble = "noble"
    Novice = "novice"
    Nurse = "nurse"
    Oak = "oak"
    Officer = "officer"
    Onyx = "onyx"
    Opal = "opal"
    Oracle = "oracle"
    Orange = "orange"
    Owner = "owner"
    Page = "page"
    Paladin = "paladin"
    Pawn = "pawn"
    Pilgrim = "pilgrim"
    Pine = "pine"
    Pink = "pink"
    Prefect = "prefect"
    Priest = "priest"
    Private = "private"
    Prodigy = "prodigy"
    Proselyte = "proselyte"
    Prospector = "prospector"
    Protector = "protector"
    Pure = "pure"
    Purple = "purple"
    Pyromancer = "pyromancer"
    Quester = "quester"
    Racer = "racer"
    Raider = "raider"
    Ranger = "ranger"
    Record_chaser = "record_chaser"
    Recruit = "recruit"
    Recruiter = "recruiter"
    Red_topaz = "red_topaz"
    Red = "red"
    Rogue = "rogue"
    Ruby = "ruby"
    Rune = "rune"
    Runecrafter = "runecrafter"
    Sage = "sage"
    Sapphire = "sapphire"
    Saradominist = "saradominist"
    Saviour = "saviour"
    Scavenger = "scavenger"
    Scholar = "scholar"
    Scourge = "scourge"
    Scout = "scout"
    Scribe = "scribe"
    Seer = "seer"
    Senator = "senator"
    Sentry = "sentry"
    Serenist = "serenist"
    Sergeant = "sergeant"
    Shaman = "shaman"
    Sheriff = "sheriff"
    Short_green_guy = "short_green_guy"
    Skiller = "skiller"
    Skulled = "skulled"
    Slayer = "slayer"
    Smiter = "smiter"
    Smith = "smith"
    Smuggler = "smuggler"
    Sniper = "sniper"
    Soul = "soul"
    Specialist = "specialist"
    Speed_runner = "speed_runner"
    Spellcaster = "spellcaster"
    Squire = "squire"
    Staff = "staff"
    Steel = "steel"
    Strider = "strider"
    Striker = "striker"
    Summoner = "summoner"
    Superior = "superior"
    Supervisor = "supervisor"
    Teacher = "teacher"
    Templar = "templar"
    Therapist = "therapist"
    Thief = "thief"
    Tirannian = "tirannian"
    Trialist = "trialist"
    Trickster = "trickster"
    Tzkal = "tzkal"
    Tztok = "tztok"
    Unholy = "unholy"
    Vagrant = "vagrant"
    Vanguard = "vanguard"
    Walker = "walker"
    Wanderer = "wanderer"
    Warden = "warden"
    Warlock = "warlock"
    Warrior = "warrior"
    Water = "water"
    Wild = "wild"
    Willow = "willow"
    Wily = "wily"
    Wintumber = "wintumber"
    Witch = "witch"
    Wizard = "wizard"
    Worker = "worker"
    Wrath = "wrath"
    Xerician = "xerician"
    Yellow = "yellow"
    Yew = "yew"
    Zamorakian = "zamorakian"
    Zarosian = "zarosian"
    Zealot = "zealot"
    Zenyte = "zenyte"

GroupStatistics

Bases: BaseModel

Represents accumulated group statistics.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupStatistics(BaseModel):
    """Represents accumulated group statistics."""

    maxed_combat_count: int
    """The number of maxed combat players in the group."""

    maxed_total_count: int
    """The number of maxed total level players in the group."""

    maxed_200ms_count: int
    """The number of maxed 200M xp players in the group."""

    average_stats: Snapshot
    """The average group statistics in a [`Snapshot`][wom.Snapshot]."""

    metric_leaders: MetricLeaders
    """The [`MetricLeaders`][wom.MetricLeaders] in this group for each
    metric.
    """

average_stats instance-attribute

average_stats: Snapshot

The average group statistics in a Snapshot.

maxed_200ms_count instance-attribute

maxed_200ms_count: int

The number of maxed 200M xp players in the group.

maxed_combat_count instance-attribute

maxed_combat_count: int

The number of maxed combat players in the group.

maxed_total_count instance-attribute

maxed_total_count: int

The number of maxed total level players in the group.

metric_leaders instance-attribute

metric_leaders: MetricLeaders

The MetricLeaders in this group for each metric.

HttpErrorResponse

Bases: BaseModel

Indicates something went wrong during the request.

Source code in wom/models/http.py
@attrs.define
class HttpErrorResponse(BaseModel):
    """Indicates something went wrong during the request."""

    status: int
    """The HTTP status code."""

    message: str
    """The error message."""

message instance-attribute

message: str

The error message.

status instance-attribute

status: int

The HTTP status code.

HttpSuccessResponse

Bases: BaseModel

Indicates a successful HTTP response.

Source code in wom/models/http.py
@attrs.define
class HttpSuccessResponse(BaseModel):
    """Indicates a successful HTTP response."""

    status: int
    """The HTTP status code."""

    message: str
    """The success message."""

message instance-attribute

message: str

The success message.

status instance-attribute

status: int

The HTTP status code.

Membership

Bases: BaseModel

Represents a membership in a group.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class Membership(BaseModel):
    """Represents a membership in a group."""

    player_id: int
    """The unique ID of the player in this membership."""

    group_id: int
    """The group ID this membership belongs to."""

    role: t.Optional[GroupRole]
    """The optional [`GroupRole`][wom.GroupRole] for this membership."""

    created_at: datetime
    """The date this membership was created."""

    updated_at: datetime
    """The date this membership was updated."""

created_at instance-attribute

created_at: datetime

The date this membership was created.

group_id instance-attribute

group_id: int

The group ID this membership belongs to.

player_id instance-attribute

player_id: int

The unique ID of the player in this membership.

role instance-attribute

role: t.Optional[GroupRole]

The optional GroupRole for this membership.

updated_at instance-attribute

updated_at: datetime

The date this membership was updated.

MetricLeaders

Bases: BaseModel

The leaders for each metric in a group.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class MetricLeaders(BaseModel):
    """The leaders for each metric in a group."""

    skills: t.Dict[enums.Skills, SkillLeader]
    """A mapping of [`Skills`][wom.Skills] keys to [`SkillLeader`]
    [wom.SkillLeader] values.
    """

    bosses: t.Dict[enums.Bosses, BossLeader]
    """A mapping of [`Bosses`][wom.Bosses] keys to [`BossLeader`]
    [wom.BossLeader] values.
    """

    activities: t.Dict[enums.Activities, ActivityLeader]
    """A mapping of [`Activities`][wom.Activities] keys to [`ActivityLeader`]
    [wom.ActivityLeader] values.
    """

    computed: t.Dict[enums.ComputedMetrics, ComputedMetricLeader]
    """A mapping of [`ComputedMetrics`][wom.ComputedMetrics] keys to
    [`ComputedMetricLeader`][wom.ComputedMetricLeader] values.
    """

activities instance-attribute

activities: t.Dict[enums.Activities, ActivityLeader]

A mapping of Activities keys to ActivityLeader values.

bosses instance-attribute

bosses: t.Dict[enums.Bosses, BossLeader]

A mapping of Bosses keys to BossLeader values.

computed instance-attribute

computed: t.Dict[
    enums.ComputedMetrics, ComputedMetricLeader
]

A mapping of ComputedMetrics keys to ComputedMetricLeader values.

skills instance-attribute

skills: t.Dict[enums.Skills, SkillLeader]

A mapping of Skills keys to SkillLeader values.

NameChange

Bases: BaseModel

Represents a player name change.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class NameChange(BaseModel):
    """Represents a player name change."""

    id: int
    """The unique ID of this name change."""

    player_id: int
    """The player ID associated with the name change."""

    old_name: str
    """The old username of the player."""

    new_name: str
    """The new username of the player."""

    status: NameChangeStatus
    """The [`status`][wom.NameChangeStatus] of the name change."""

    review_context: t.Optional[NameChangeReviewContext]
    """The [review context][wom.NameChangeReviewContext] associated with
    this name change, if it was denied or skipped.
    """

    resolved_at: t.Optional[datetime]
    """The date the name change was approved or denied."""

    updated_at: datetime
    """The date the name change was updated."""

    created_at: datetime
    """The date the name change was created."""

created_at instance-attribute

created_at: datetime

The date the name change was created.

id instance-attribute

id: int

The unique ID of this name change.

new_name instance-attribute

new_name: str

The new username of the player.

old_name instance-attribute

old_name: str

The old username of the player.

player_id instance-attribute

player_id: int

The player ID associated with the name change.

resolved_at instance-attribute

resolved_at: t.Optional[datetime]

The date the name change was approved or denied.

review_context instance-attribute

review_context: t.Optional[NameChangeReviewContext]

The review context associated with this name change, if it was denied or skipped.

status instance-attribute

status: NameChangeStatus

The status of the name change.

updated_at instance-attribute

updated_at: datetime

The date the name change was updated.

NameChangeReviewContext

Bases: BaseModel

The review context for a name change that was not approved.

Note

This will always be one of:

  • DeniedNameChangeReviewContext

  • SkippedNameChangeReviewContext

You can use an isinstance(...) check to determine which one it is.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class NameChangeReviewContext(BaseModel):
    """The review context for a name change that was not approved.

    !!! note

        This will always be one of:

        - `DeniedNameChangeReviewContext`

        - `SkippedNameChangeReviewContext`

        You can use an `isinstance(...)` check to determine which one
        it is.
    """

    reason: NameChangeReviewReason
    """The reason this name change was denied."""

reason instance-attribute

reason: NameChangeReviewReason

The reason this name change was denied.

NameChangeStatus

Bases: BaseEnum

The available name change statuses.

Source code in wom/models/names/enums.py
class NameChangeStatus(BaseEnum):
    """The available name change statuses."""

    Pending = "pending"
    Approved = "approved"
    Denied = "denied"

Participation

Bases: BaseModel

Represents participation in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class Participation(BaseModel):
    """Represents participation in a competition."""

    player_id: int
    """The ID of the player associated with this participation."""

    competition_id: int
    """The ID of the competition associated with this participation."""

    team_name: t.Optional[str]
    """The optional team name associated with this participation."""

    created_at: datetime
    """The date this participation was created."""

    updated_at: datetime
    """The date this participation was updated."""

competition_id instance-attribute

competition_id: int

The ID of the competition associated with this participation.

created_at instance-attribute

created_at: datetime

The date this participation was created.

player_id instance-attribute

player_id: int

The ID of the player associated with this participation.

team_name instance-attribute

team_name: t.Optional[str]

The optional team name associated with this participation.

updated_at instance-attribute

updated_at: datetime

The date this participation was updated.

Player

Bases: BaseModel

Represents a player on WOM.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Player(BaseModel):
    """Represents a player on WOM."""

    id: int
    """The players unique ID."""

    username: str
    """The players username, always lowercase and 1-12 chars."""

    display_name: str
    """The players display name, supports capitalization ."""

    type: PlayerType
    """The [`PlayerType`][wom.PlayerType] for this player."""

    build: PlayerBuild
    """The [`PlayerBuild`][wom.PlayerBuild] for this player."""

    country: t.Optional[Country]
    """The players [`Country`][wom.Country] country of origin, if they
    have one set.
    """

    status: PlayerStatus
    """The players status, i.e. flagged, archived, etc."""

    exp: int
    """The players overall experience."""

    ehp: float
    """The players efficient hours played."""

    ehb: float
    """The players efficient hours bossed."""

    ttm: float
    """The players time to max, in hours."""

    tt200m: float
    """The players time to 200m xp all skills, in hours."""

    registered_at: datetime
    """The date the player was registered with WOM."""

    updated_at: t.Optional[datetime]
    """The date the player was last successfully updated with WOM."""

    last_changed_at: t.Optional[datetime]
    """The date of the players last change (xp gain, boss kc, etc)."""

    last_imported_at: t.Optional[datetime]
    """The date of the last player history import."""

build instance-attribute

build: PlayerBuild

The PlayerBuild for this player.

country instance-attribute

country: t.Optional[Country]

The players Country country of origin, if they have one set.

display_name instance-attribute

display_name: str

The players display name, supports capitalization .

ehb instance-attribute

ehb: float

The players efficient hours bossed.

ehp instance-attribute

ehp: float

The players efficient hours played.

exp instance-attribute

exp: int

The players overall experience.

id instance-attribute

id: int

The players unique ID.

last_changed_at instance-attribute

last_changed_at: t.Optional[datetime]

The date of the players last change (xp gain, boss kc, etc).

last_imported_at instance-attribute

last_imported_at: t.Optional[datetime]

The date of the last player history import.

registered_at instance-attribute

registered_at: datetime

The date the player was registered with WOM.

status instance-attribute

status: PlayerStatus

The players status, i.e. flagged, archived, etc.

tt200m instance-attribute

tt200m: float

The players time to 200m xp all skills, in hours.

ttm instance-attribute

ttm: float

The players time to max, in hours.

type instance-attribute

type: PlayerType

The PlayerType for this player.

updated_at instance-attribute

updated_at: t.Optional[datetime]

The date the player was last successfully updated with WOM.

username instance-attribute

username: str

The players username, always lowercase and 1-12 chars.

PlayerAchievementProgress

Bases: BaseModel

Represents a players progress toward an achievement.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerAchievementProgress(BaseModel):
    """Represents a players progress toward an achievement."""

    achievement: AchievementProgress
    """The [AchievementProgress][wom.AchievementProgress] made."""

    current_value: int
    """The current value for the achievement's metric."""

    absolute_progress: float
    """The players current absolute progress toward the achievement.

    Scale of 0-1 with 1 being 100% progress.
    """

    relative_progress: float
    """The players current relative progress toward the achievement
    starting from the previous achievement.

    Scale of 0-1 with 1 being 100% progress.
    """

absolute_progress instance-attribute

absolute_progress: float

The players current absolute progress toward the achievement.

Scale of 0-1 with 1 being 100% progress.

achievement instance-attribute

achievement: AchievementProgress

current_value instance-attribute

current_value: int

The current value for the achievement's metric.

relative_progress instance-attribute

relative_progress: float

The players current relative progress toward the achievement starting from the previous achievement.

Scale of 0-1 with 1 being 100% progress.

PlayerBuild

Bases: BaseEnum

Potential account builds.

Source code in wom/models/players/enums.py
class PlayerBuild(BaseEnum):
    """Potential account builds."""

    Main = "main"
    F2p = "f2p"
    Lvl3 = "lvl3"
    Zerker = "zerker"
    Def1 = "def1"
    Hp10 = "hp10"
    F2pLvl3 = "f2p_lvl3"

PlayerCompetitionStanding

Bases: BaseModel

Represents a players standing in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class PlayerCompetitionStanding(BaseModel):
    """Represents a players standing in a competition."""

    participation: PlayerParticipation
    """The [`PlayerParticipation`][wom.PlayerParticipation] achieved by
    the player.
    """

    progress: CompetitionProgress
    """The [`CompetitionProgress`][wom.CompetitionProgress] that was
    made.
    """

    rank: int
    """The rank in the competition standings."""

participation instance-attribute

participation: PlayerParticipation

The PlayerParticipation achieved by the player.

progress instance-attribute

progress: CompetitionProgress

The CompetitionProgress that was made.

rank instance-attribute

rank: int

The rank in the competition standings.

PlayerDetail

Bases: BaseModel

Represents details about a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerDetail(BaseModel):
    """Represents details about a player."""

    player: Player
    """The [Player][wom.Player]."""

    combat_level: int
    """The players combat level."""

    latest_snapshot: t.Optional[Snapshot]
    """The latest snapshot for the player, if there is one."""

combat_level instance-attribute

combat_level: int

The players combat level.

latest_snapshot instance-attribute

latest_snapshot: t.Optional[Snapshot]

The latest snapshot for the player, if there is one.

player instance-attribute

player: Player

The Player.

PlayerGains

Bases: BaseModel

Gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerGains(BaseModel):
    """Gains made by a player."""

    starts_at: datetime
    """The date the gains started at."""

    ends_at: datetime
    """The date the gains ended at."""

    data: PlayerGainsData
    """The [`PlayerGainsData`][wom.PlayerGainsData] for the player."""

data instance-attribute

data: PlayerGainsData

The PlayerGainsData for the player.

ends_at instance-attribute

ends_at: datetime

The date the gains ended at.

starts_at instance-attribute

starts_at: datetime

The date the gains started at.

PlayerGainsData

Bases: BaseModel

Contains all the player gains data.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerGainsData(BaseModel):
    """Contains all the player gains data."""

    skills: t.Dict[enums.Skills, SkillGains]
    """A mapping of [`Skills`][wom.Skills] keys to [`SkillGains`]
    [wom.SkillGains] values.
    """

    bosses: t.Dict[enums.Bosses, BossGains]
    """A mapping of [`Bosses`][wom.Bosses] keys to [`BossGains`]
    [wom.BossGains] values.
    """

    activities: t.Dict[enums.Activities, ActivityGains]
    """A mapping of [`Activities`][wom.Activities] keys to [`ActivityGains`]
    [wom.ActivityGains] values.
    """

    computed: t.Dict[enums.ComputedMetrics, ComputedGains]
    """A mapping of [`ComputedMetrics`][wom.ComputedMetrics] keys to
    [`ComputedGains`] [wom.ComputedGains] values.
    """

activities instance-attribute

activities: t.Dict[enums.Activities, ActivityGains]

A mapping of Activities keys to ActivityGains values.

bosses instance-attribute

bosses: t.Dict[enums.Bosses, BossGains]

A mapping of Bosses keys to BossGains values.

computed instance-attribute

computed: t.Dict[enums.ComputedMetrics, ComputedGains]

A mapping of ComputedMetrics keys to ComputedGains values.

skills instance-attribute

skills: t.Dict[enums.Skills, SkillGains]

A mapping of Skills keys to SkillGains values.

PlayerMembership

Bases: BaseModel

Represents a player membership.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class PlayerMembership(BaseModel):
    """Represents a player membership."""

    group: Group
    """The [`Group`][wom.Group] the player is a member of."""

    membership: Membership
    """The [`Membership`][wom.Membership] itself."""

group instance-attribute

group: Group

The Group the player is a member of.

membership instance-attribute

membership: Membership

The Membership itself.

PlayerParticipation

Bases: BaseModel

Represents a players participation in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class PlayerParticipation(BaseModel):
    """Represents a players participation in a competition."""

    data: Participation
    """The [`Participation`][wom.Participation] the player achieved."""

    competition: Competition
    """The [`Competition`][wom.Competition] that the player participated
    in.
    """

competition instance-attribute

competition: Competition

The Competition that the player participated in.

data instance-attribute

data: Participation

The Participation the player achieved.

PlayerStatus

Bases: BaseEnum

Status for the players account.

Source code in wom/models/players/enums.py
class PlayerStatus(BaseEnum):
    """Status for the players account."""

    Active = "active"
    Unranked = "unranked"
    Flagged = "flagged"
    Archived = "archived"
    Banned = "banned"

PlayerType

Bases: BaseEnum

Different types of players.

Source code in wom/models/players/enums.py
class PlayerType(BaseEnum):
    """Different types of players."""

    Unknown = "unknown"
    Regular = "regular"
    Ironman = "ironman"
    Hardcore = "hardcore"
    Ultimate = "ultimate"
    FreshStart = "fresh_start"

Record

Bases: BaseModel

Represents a record held by a player.

Source code in wom/models/records/models.py
@attrs.define(init=False)
class Record(BaseModel):
    """Represents a record held by a player."""

    id: int
    """The unique ID for this record."""

    player_id: int
    """The player ID associated with this record."""

    period: enums.Period
    """The [`Period`][wom.Period] over which this record was achieved."""

    metric: enums.Metric
    """The [`Metric`][wom.Metric] measured in this record."""

    value: int
    """The records gained value."""

    updated_at: datetime
    """The records creation/modification date."""

id instance-attribute

id: int

The unique ID for this record.

metric instance-attribute

metric: enums.Metric

The Metric measured in this record.

period instance-attribute

period: enums.Period

The Period over which this record was achieved.

player_id instance-attribute

player_id: int

The player ID associated with this record.

updated_at instance-attribute

updated_at: datetime

The records creation/modification date.

value instance-attribute

value: int

The records gained value.

RecordLeaderboardEntry

Bases: BaseModel

Represents a player's record leaderboard entry.

Source code in wom/models/records/models.py
@attrs.define(init=False)
class RecordLeaderboardEntry(BaseModel):
    """Represents a player's record leaderboard entry."""

    player: Player
    """The [`Player`][wom.Player] holding this leaderboard entry."""

    record: Record
    """The [`Record`][wom.Record] tied to this leaderboard entry."""

player instance-attribute

player: Player

The Player holding this leaderboard entry.

record instance-attribute

record: Record

The Record tied to this leaderboard entry.

Skill

Bases: BaseModel

Details regarding a particular skill.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Skill(BaseModel):
    """Details regarding a particular skill."""

    metric: enums.Skills
    """The [`Skills`][wom.Skills] being measured."""

    rank: int
    """The players rank in the skill."""

    level: int
    """The players level in the skill."""

    experience: int
    """The players experience in the skill."""

    ehp: float
    """The players efficient hours played for the skill."""

ehp instance-attribute

ehp: float

The players efficient hours played for the skill.

experience instance-attribute

experience: int

The players experience in the skill.

level instance-attribute

level: int

The players level in the skill.

metric instance-attribute

metric: enums.Skills

The Skills being measured.

rank instance-attribute

rank: int

The players rank in the skill.

SkillGains

Bases: BaseModel

Represents skill gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class SkillGains(BaseModel):
    """Represents skill gains made by a player."""

    metric: enums.Skills
    """The [`Skills`][wom.Skills] being measured."""

    experience: Gains
    """The experience [`Gains`][wom.Gains]."""

    ehp: Gains
    """The efficient hours played [`Gains`][wom.Gains]."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    level: Gains
    """The level [`Gains`][wom.Gains]."""

ehp instance-attribute

ehp: Gains

The efficient hours played Gains.

experience instance-attribute

experience: Gains

The experience Gains.

level instance-attribute

level: Gains

The level Gains.

metric instance-attribute

metric: enums.Skills

The Skills being measured.

rank instance-attribute

rank: Gains

The rank Gains.

SkillLeader

Bases: BaseModel

Represents a leader in a particular skill.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class SkillLeader(BaseModel):
    """Represents a leader in a particular skill."""

    metric: enums.Skills
    """The [`Skills`][wom.Skills] being measured."""

    rank: int
    """The players rank in the skill."""

    level: int
    """The players level in the skill."""

    experience: int
    """The players experience in the skill."""

    player: t.Optional[Player]
    """The player leading in this metric, or `None` if none do."""

experience instance-attribute

experience: int

The players experience in the skill.

level instance-attribute

level: int

The players level in the skill.

metric instance-attribute

metric: enums.Skills

The Skills being measured.

player instance-attribute

player: t.Optional[Player]

The player leading in this metric, or None if none do.

rank instance-attribute

rank: int

The players rank in the skill.

SkippedNameChangeReviewContext

Bases: NameChangeReviewContext

The review context for a name change that was skipped.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class SkippedNameChangeReviewContext(NameChangeReviewContext):  # type: ignore[override]
    """The review context for a name change that was skipped."""

    reason: t.Literal[
        NameChangeReviewReason.TransitionTooLong,
        NameChangeReviewReason.ExcessiveGains,
        NameChangeReviewReason.TotalLevelTooLow,
    ]
    """The reason this name change was denied."""

    max_hours_diff: t.Optional[int]
    """The max number of hours in the transition period. Only populated when
    reason is `TransitionTooLong`.
    """

    hours_diff: t.Optional[int]
    """The actual number of hours in the transition period. Only populated when
    reason is `TransitionTooLong` or `ExcessiveGains`.
    """

    ehp_diff: t.Optional[int]
    """The number difference between the old and new names ehp. Only populated
    when the reason is `ExcessiveGains`.
    """

    ehb_diff: t.Optional[int]
    """The number difference between the old and new names ehb. Only populated
    when the reason is `ExcessiveGains`.
    """

    min_total_level: t.Optional[int]
    """The minimum total level allowed for this name change. Only populated
    when the reason is `TotalLevelTooLow`.
    """

    total_level: t.Optional[int]
    """The number difference between the old and new names ehb. Only populated
    when the reason is `TotalLevelTooLow`.
    """

ehb_diff instance-attribute

ehb_diff: t.Optional[int]

The number difference between the old and new names ehb. Only populated when the reason is ExcessiveGains.

ehp_diff instance-attribute

ehp_diff: t.Optional[int]

The number difference between the old and new names ehp. Only populated when the reason is ExcessiveGains.

hours_diff instance-attribute

hours_diff: t.Optional[int]

The actual number of hours in the transition period. Only populated when reason is TransitionTooLong or ExcessiveGains.

max_hours_diff instance-attribute

max_hours_diff: t.Optional[int]

The max number of hours in the transition period. Only populated when reason is TransitionTooLong.

min_total_level instance-attribute

min_total_level: t.Optional[int]

The minimum total level allowed for this name change. Only populated when the reason is TotalLevelTooLow.

reason instance-attribute

reason: t.Literal[
    NameChangeReviewReason.TransitionTooLong,
    NameChangeReviewReason.ExcessiveGains,
    NameChangeReviewReason.TotalLevelTooLow,
]

The reason this name change was denied.

total_level instance-attribute

total_level: t.Optional[int]

The number difference between the old and new names ehb. Only populated when the reason is TotalLevelTooLow.

Snapshot

Bases: BaseModel

Represents a player snapshot.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Snapshot(BaseModel):
    """Represents a player snapshot."""

    id: int
    """The unique ID of the snapshot."""

    player_id: int
    """The unique ID of the player for this snapshot."""

    imported_at: t.Optional[datetime]
    """The date the snapshot was imported, if it was."""

    data: SnapshotData
    """The [`SnapshotData`][wom.SnapshotData] for the snapshot."""

    created_at: datetime
    """The date the snapshot was created."""

created_at instance-attribute

created_at: datetime

The date the snapshot was created.

data instance-attribute

data: SnapshotData

The SnapshotData for the snapshot.

id instance-attribute

id: int

The unique ID of the snapshot.

imported_at instance-attribute

imported_at: t.Optional[datetime]

The date the snapshot was imported, if it was.

player_id instance-attribute

player_id: int

The unique ID of the player for this snapshot.

SnapshotData

Bases: BaseModel

The data associated with this snapshot.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class SnapshotData(BaseModel):
    """The data associated with this snapshot."""

    skills: t.Dict[enums.Skills, Skill]
    """A mapping of [`Skills`][wom.Skills] keys to [`Skill`][wom.Skill] values
    from this snapshot.
    """

    bosses: t.Dict[enums.Bosses, Boss]
    """A mapping of [`Bosses`][wom.Bosses] keys to [`Boss`][wom.Boss] values
    from this snapshot.
    """

    activities: t.Dict[enums.Activities, Activity]
    """A mapping of [`Activities`][wom.Activities] keys to [`Activity`]
    [wom.Activity] values from this snapshot.
    """

    computed: t.Dict[enums.ComputedMetrics, ComputedMetric]
    """A mapping of [`ComputedMetrics`][wom.ComputedMetrics] keys to
    [`ComputedMetric`][wom.ComputedMetric] values from this snapshot.
    """

activities instance-attribute

activities: t.Dict[enums.Activities, Activity]

A mapping of Activities keys to Activity values from this snapshot.

bosses instance-attribute

bosses: t.Dict[enums.Bosses, Boss]

A mapping of Bosses keys to Boss values from this snapshot.

computed instance-attribute

computed: t.Dict[enums.ComputedMetrics, ComputedMetric]

A mapping of ComputedMetrics keys to ComputedMetric values from this snapshot.

skills instance-attribute

skills: t.Dict[enums.Skills, Skill]

A mapping of Skills keys to Skill values from this snapshot.

SnapshotTimelineEntry

Bases: BaseModel

An entry representing a point in time of a players gains.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class SnapshotTimelineEntry(BaseModel):
    """An entry representing a point in time of a players gains."""

    value: int
    """The total xp gained since the last timeline entry."""

    date: datetime
    """The date this timeline entry was recorded."""

date instance-attribute

date: datetime

The date this timeline entry was recorded.

value instance-attribute

value: int

The total xp gained since the last timeline entry.

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
@attrs.define
class Team(BaseModel):
    """Represents a competition team.

    Args:
        name: The name of the team.

        participants: A list of usernames to include in the
            team.

    !!! tip

        This is a model class that you will create in order to send
        data to some endpoints.
    """

    def __init__(self, name: str, participants: t.List[str]) -> None:
        self.name = name
        self.participants = participants

    name: str
    """The name of the team."""

    participants: t.List[str]
    """A list of participant usernames on the team."""

name instance-attribute

name: str

The name of the team.

participants instance-attribute

participants: t.List[str]

A list of participant usernames on the team.

Top5ProgressResult

Bases: BaseModel

A top 5 progress result for a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class Top5ProgressResult(BaseModel):
    """A top 5 progress result for a competition."""

    player: Player
    """The [`Player`][wom.Player] who made top 5 progress."""

    history: t.List[CompetitionHistoryDataPoint]
    """A list of [CompetitionHistoryDataPoints]
    [wom.CompetitionHistoryDataPoint] making up the history
    of this top 5 progress result.
    """

history instance-attribute

history: t.List[CompetitionHistoryDataPoint]

A list of CompetitionHistoryDataPoints making up the history of this top 5 progress result.

player instance-attribute

player: Player

The Player who made top 5 progress.