characters ========== .. py:module:: sidequest_common.schemas.characters .. autoapi-nested-parse:: Characters from Battle.net: the guild roster, looked-up characters, their character sheets and the hero boards. .. py:data:: CHARACTER_SEARCH_MIN_LENGTH :value: 2 .. py:data:: CHARACTER_SEARCH_LIMIT :value: 25 .. py:data:: CHARACTER_SLUG_MAX_LENGTH :value: 50 .. py:data:: CHARACTER_SLUG_PATTERN :value: '^[^\\s/?#-]+-[^\\s/?#-]+$' two parts, and nothing that would leave a URL path segment. :type: ``name-surname`` .. py:data:: HERO_BOARD_SIZE :value: 10 .. py:data:: MILESTONE_LEVELS :value: (40, 60) .. py:data:: RECENT_MILESTONES :value: 20 .. py:function:: canonical_character_name(character: str) -> str The addon's own identity (``SQ.CanonicalName``): ``First-Surname`` on Forever, ``Name-Realm`` elsewhere. Exports from before the addon's Forever identity fix (v0.8.0 and earlier) sent the raw space-joined ``First Surname`` shape, sometimes with a stray ``-`` tail the old, broken in-game normalizer appended (it treated the already-complete name as a bare name and appended the connected realm). Collapse every shape a stored or imported string might be in to the same two-part identity, so a character an old addon version created and one a fixed version sends later land on the same :class:`WowCharacter` row instead of creating a duplicate. .. py:function:: character_key(character: str) -> str The lookup key for :class:`WowCharacter.key`: :func:`canonical_character_name`, lowercased. .. py:class:: CharacterSummary Bases: :py:obj:`pydantic.BaseModel` A character's Battle.net summary. ``profile_found`` is false while Battle.net has no profile for the character (it publishes one some time after the character logs out); the summary then holds only what the guild roster says. ``rank_name`` is the guild rank's name as the addon last saw it, for roster members. .. py:attribute:: model_config .. py:attribute:: slug :type: str .. py:attribute:: name :type: str .. py:attribute:: surname :type: str .. py:attribute:: level :type: int .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None .. py:attribute:: race :type: str | None .. py:attribute:: faction :type: str | None .. py:attribute:: guild_name :type: str | None .. py:attribute:: guild_slug :type: str | None .. py:attribute:: in_roster :type: bool .. py:attribute:: guild_rank :type: int | None .. py:attribute:: rank_name :type: str | None :value: None .. py:attribute:: item_level :type: int | None .. py:attribute:: spec :type: str | None .. py:attribute:: achievement_points :type: int | None .. py:attribute:: honorable_kills :type: int | None .. py:attribute:: pvp_rank :type: int | None .. py:attribute:: last_login_at :type: datetime.datetime | None .. py:attribute:: profile_found :type: bool .. py:attribute:: fetched_at :type: datetime.datetime | None .. py:class:: CharacterGear Bases: :py:obj:`pydantic.BaseModel` One equipped item. .. py:attribute:: slot :type: str .. py:attribute:: slot_name :type: str .. py:attribute:: item_id :type: int .. py:attribute:: name :type: str .. py:attribute:: quality :type: str .. py:attribute:: item_level :type: int | None .. py:attribute:: enchantments :type: list[str] .. py:class:: CharacterStatLine Bases: :py:obj:`pydantic.BaseModel` One line of the character pane, such as ``Strength`` and ``87``. .. py:attribute:: label :type: str .. py:attribute:: value :type: str .. py:class:: CharacterTalentTree Bases: :py:obj:`pydantic.BaseModel` Points spent in one talent tree of the active loadout. .. py:attribute:: name :type: str .. py:attribute:: points :type: int .. py:class:: CharacterProfessionSkill Bases: :py:obj:`pydantic.BaseModel` A profession and its skill. .. py:attribute:: name :type: str .. py:attribute:: skill :type: int .. py:attribute:: max_skill :type: int .. py:attribute:: recipes :type: int .. py:class:: CharacterReputationLine Bases: :py:obj:`pydantic.BaseModel` Standing with one faction. ``value`` is progress within the standing, out of ``max``. ``faction_id`` and ``tier`` are ``None`` for sheets stored before these were added; they refresh within 6h. .. py:attribute:: faction :type: str .. py:attribute:: standing :type: str .. py:attribute:: value :type: int .. py:attribute:: max :type: int .. py:attribute:: faction_id :type: int | None .. py:attribute:: tier :type: int | None .. py:class:: CharacterAchievementLine Bases: :py:obj:`pydantic.BaseModel` An achievement earned recently. .. py:attribute:: name :type: str .. py:attribute:: completed_at :type: datetime.datetime .. py:attribute:: id :type: int | None .. py:class:: CharacterHunterPet Bases: :py:obj:`pydantic.BaseModel` One tamed pet in a hunter's stable. Active first, then by slot; empty for non-hunters. .. py:attribute:: name :type: str .. py:attribute:: level :type: int .. py:attribute:: creature :type: str .. py:attribute:: creature_id :type: int .. py:attribute:: active :type: bool .. py:class:: CharacterSheet Bases: :py:obj:`pydantic.BaseModel` Everything the character page shows beyond the summary, as Battle.net published it at ``fetched_at``. A part Battle.net did not answer for is empty (or ``None`` for ``quests_completed``). .. py:attribute:: gear :type: list[CharacterGear] .. py:attribute:: stats :type: list[CharacterStatLine] .. py:attribute:: talents :type: list[CharacterTalentTree] .. py:attribute:: professions :type: list[CharacterProfessionSkill] .. py:attribute:: reputations :type: list[CharacterReputationLine] .. py:attribute:: recent_achievements :type: list[CharacterAchievementLine] .. py:attribute:: hunter_pets :type: list[CharacterHunterPet] :value: [] .. py:attribute:: mounts :type: int .. py:attribute:: pets :type: int .. py:attribute:: toys :type: int .. py:attribute:: quests_completed :type: int | None .. py:class:: CharacterPage Bases: :py:obj:`CharacterSummary` A character's summary and sheet. ``sheet`` is ``None`` while Battle.net has no profile for the character. .. py:attribute:: sheet :type: CharacterSheet | None .. py:class:: CharacterModelChoice Bases: :py:obj:`pydantic.BaseModel` One customization a character made in the barber's chair, by Battle.net's option and choice ids. .. py:attribute:: option_id :type: int .. py:attribute:: choice_id :type: int .. py:class:: CharacterModelItem Bases: :py:obj:`pydantic.BaseModel` One worn item as Wowhead's model viewer draws it. .. py:attribute:: slot :type: int .. py:attribute:: display_id :type: int .. py:class:: CharacterModel Bases: :py:obj:`pydantic.BaseModel` What Wowhead's model viewer needs to draw a character as Battle.net last published it. .. py:attribute:: model_id :type: int .. py:attribute:: customizations :type: list[CharacterModelChoice] .. py:attribute:: items :type: list[CharacterModelItem] .. py:class:: RosterSyncReport Bases: :py:obj:`pydantic.BaseModel` What one roster sync changed. ``joined`` and ``left`` hold full names (``Name Surname``). .. py:attribute:: members :type: int .. py:attribute:: joined :type: list[str] .. py:attribute:: left :type: list[str] .. py:attribute:: profiles_refreshed :type: int .. py:attribute:: characters_linked :type: int Addon characters (``WowCharacter``) newly matched to their Battle.net character. .. py:attribute:: members_linked :type: int Roster characters (``WowCharacter``) newly auto-linked to a member by proven Battle.net ownership. .. py:attribute:: members_confirmed :type: int :value: 0 Members newly confirmed on the guild roster because one of their Battle.net characters is in it. .. py:class:: RaidReadinessSettings Bases: :py:obj:`pydantic.BaseModel` The officers' raid readiness setting. ``min_item_level`` ``None`` marks nobody as under-geared. .. py:attribute:: min_item_level :type: int | None .. py:class:: HeroBoardEntry Bases: :py:obj:`pydantic.BaseModel` One character on a Hall of Heroes board. .. py:attribute:: model_config .. py:attribute:: slug :type: str .. py:attribute:: name :type: str .. py:attribute:: surname :type: str .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None .. py:attribute:: value :type: int .. py:class:: HeroBoards Bases: :py:obj:`pydantic.BaseModel` The guild roster's top characters, ten to a board, from their Battle.net profiles. .. py:attribute:: item_level :type: list[HeroBoardEntry] .. py:attribute:: honorable_kills :type: list[HeroBoardEntry] .. py:attribute:: pvp_rank :type: list[HeroBoardEntry] .. py:attribute:: achievement_points :type: list[HeroBoardEntry] .. py:attribute:: mounts :type: list[HeroBoardEntry] .. py:attribute:: pets :type: list[HeroBoardEntry] .. py:attribute:: toys :type: list[HeroBoardEntry] .. py:class:: CharacterMilestoneSchema Bases: :py:obj:`pydantic.BaseModel` A roster character reaching level 40 or 60. ``posted_at`` is ``None`` until the bot posts it to Discord. .. py:attribute:: model_config .. py:attribute:: id :type: uuid.UUID .. py:attribute:: slug :type: str .. py:attribute:: name :type: str .. py:attribute:: surname :type: str .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None .. py:attribute:: level :type: int .. py:attribute:: reached_at :type: datetime.datetime .. py:attribute:: posted_at :type: datetime.datetime | None .. py:class:: MilestonePosted Bases: :py:obj:`pydantic.BaseModel` Body for the bot's ``POST .../characters/milestones/{id}/posted``: the Discord message it posted. .. py:attribute:: discord_message_id :type: int | None :value: None