Source code for wow.models.recipe

 1"""Models for the Recipe API."""
 2
 3from wow.models._common import Document, IdRef, Model, Ref
 4from wow.models.item import ItemReagent
 5
 6__all__ = ["CraftedQuantity", "Recipe"]
 7
 8
[docs] 9class CraftedQuantity(Model): 10 """How many items one craft makes: a fixed ``value``, or a range from ``minimum`` to ``maximum``.""" 11 12 value: float | None = None 13 minimum: float | None = None 14 maximum: float | None = None
15 16
[docs] 17class Recipe(Document): 18 """A profession recipe: what it makes and the reagents it uses. 19 20 Attributes: 21 crafted_item: The item the recipe makes. Recipes that make no item, such as enchants, have none. 22 crafted_quantity: How many items one craft makes. Recipes that craft nothing, such as the one that teaches 23 Skinning, have none. 24 rank: The rank of a recipe that has several ranks. 25 """ 26 27 id: int 28 name: str 29 media: IdRef 30 crafted_quantity: CraftedQuantity | None = None 31 reagents: tuple[ItemReagent, ...] = () 32 crafted_item: Ref | None = None 33 rank: int | None = None 34 description: str | None = None