models#
Typed models for Battle.net documents.
Models skip fields they do not declare, so new fields from Blizzard never break parsing.
account: Models for the Account Profile API.
achievement: Models for the Achievement API.
auction: Models for the Auction House API.
character: Models for the Character Profile API.
creature: Models for the Creature, Creature Family and Creature Type APIs.
guild: Models for the Guild API.
guild_crest: Models for the Guild Crest API.
item: Models for the Item, Item Class and Item Set APIs.
item_appearance: Models for the Item Appearance API.
media: Models for the Media Search API.
mount: Models for the Mount API.
pet: Models for the Pet API.
playable_class: Models for the Playable Class API.
playable_race: Models for the Playable Race API.
playable_specialization: Models for the Playable Specialization API.
power_type: Models for the Power Type API.
profession: Models for the Profession API.
quest: Models for the Quest API.
realm: Models for the Realm API.
recipe: Models for the Recipe API.
region: Models for the Region API.
reputation: Models for the Reputation API.
ruleset: Models for the Ruleset API.
spell: Models for the Spell API.
talent: Models for the Talent and Talent Tree APIs.
title: Models for the Title API.
toy: Models for the Toy API.
- class wow.models.GenderedName[source]#
Bases:
ModelA name with a male and a female form.
- male: str#
- female: str#
- class wow.models.IdRef[source]#
Bases:
ModelA reference that carries no name, such as a media or appearance link.
- id: int#
- type wow.models.LocalizedString = dict[str, str]#
Text in every locale, keyed like
{"en_US": "Sword", "de_DE": "Schwert"}.Search results always come back this way, whatever
localethe client uses.
- class wow.models.Media[source]#
Bases:
DocumentA media document: the rendered assets for one item, class, or other entity.
- id: int#
- assets: tuple[MediaAsset, ...]#
- class wow.models.MediaAsset[source]#
Bases:
ModelOne rendered asset.
- Variables:
key – The asset kind, such as
icon.value – Its URL on
render.worldofwarcraft.com. Forever assets live under/forever-{region}/.file_data_id – The game client’s file id. Guild crest media has none.
- key: str#
- value: str#
- file_data_id: int | None = None#
- class wow.models.Model[source]#
Bases:
msgspec.StructBase for every response model.
Models are immutable. Fields they do not declare are skipped, so a field Blizzard adds tomorrow is never fatal; read it from the raw document with
wow.Client.get()until a release models it.
- class wow.models.NamedLink[source]#
Bases:
ModelA reference that carries no id, such as a talent tree link.
- name: str#
- class wow.models.Ref[source]#
Bases:
IdNameA reference to another document: its id, name and link, as in every index.
- class wow.models.SearchPage[DataT: Model][source]#
Bases:
ModelOne page of search results.
Battle.net stops at 1,000 results per query however many pages that spans, and sets
result_count_cappedwhen it cut the results short.- page: int#
- page_size: int#
- max_page_size: int#
- page_count: int#
- results: tuple[SearchResult[DataT], ...]#
- result_count_capped: bool#