items ===== .. py:module:: sidequest_common.schemas.items .. autoapi-nested-parse:: Item schemas: game items from Battle.net for item pages and item search, and members' wishlists. .. py:data:: ITEM_SEARCH_PAGE_SIZE :value: 50 .. py:data:: ITEM_SEARCH_MIN_LENGTH :value: 3 .. py:data:: MAX_ITEM_WISHES :value: 50 .. py:data:: ITEM_WISH_NOTE_MAX :value: 200 .. py:class:: ItemQuality Bases: :py:obj:`enum.StrEnum` An item quality, as Battle.net names it. .. py:attribute:: POOR :value: 'POOR' .. py:attribute:: COMMON :value: 'COMMON' .. py:attribute:: UNCOMMON :value: 'UNCOMMON' .. py:attribute:: RARE :value: 'RARE' .. py:attribute:: EPIC :value: 'EPIC' .. py:attribute:: LEGENDARY :value: 'LEGENDARY' .. py:attribute:: ARTIFACT :value: 'ARTIFACT' .. py:attribute:: HEIRLOOM :value: 'HEIRLOOM' .. py:class:: ItemLootPrice Bases: :py:obj:`pydantic.BaseModel` What SQL (the guild's loot rules) charges for an item, before an officer's choices. An officer can still change it at the table: a caster's one-hand weapon costs the two-hand price, and a tier token costs the price of the slot it's for. .. py:attribute:: main_spec :type: int .. py:attribute:: off_spec :type: int .. py:attribute:: chase :type: int .. py:function:: sql_price(inventory_type: str, quality: str) -> ItemLootPrice | None The SQL price of an item in this slot and quality, or ``None`` if the rules don't price its slot. .. py:class:: ItemSchema Bases: :py:obj:`pydantic.BaseModel` An item as returned by ``GET /api/items/{item_id}``, with the lines of its in-game tooltip. .. py:attribute:: model_config .. py:attribute:: item_id :type: int .. py:attribute:: name :type: str .. py:attribute:: quality :type: str .. py:attribute:: quality_name :type: str .. py:attribute:: item_class :type: str .. py:attribute:: item_subclass :type: str .. py:attribute:: inventory_type :type: str .. py:attribute:: inventory_type_name :type: str .. py:attribute:: item_level :type: int .. py:attribute:: required_level :type: int .. py:attribute:: sell_price :type: int .. py:attribute:: is_equippable :type: bool .. py:attribute:: icon_url :type: str | None .. py:attribute:: tooltip :type: list[str] .. py:property:: loot_price :type: ItemLootPrice | None The item's SQL price, from its slot and quality. .. py:class:: ItemSearchResult Bases: :py:obj:`pydantic.BaseModel` One item in a search result. Search results carry no icon or tooltip; the item page has them. .. py:attribute:: item_id :type: int .. py:attribute:: name :type: str .. py:attribute:: quality :type: str .. py:attribute:: quality_name :type: str .. py:attribute:: inventory_type :type: str .. py:attribute:: inventory_type_name :type: str .. py:attribute:: item_level :type: int .. py:attribute:: required_level :type: int .. py:class:: ItemSearchPage Bases: :py:obj:`pydantic.BaseModel` One page of item search results, as returned by ``GET /api/items``. Battle.net stops at 1,000 results. .. py:attribute:: page :type: int .. py:attribute:: page_count :type: int .. py:attribute:: results :type: list[ItemSearchResult] .. py:class:: ItemWishUpdate Bases: :py:obj:`pydantic.BaseModel` Body for ``PUT /api/me/wishlist/{item_id}`` (member): add the item, or change its note. .. py:attribute:: note :type: str | None .. py:class:: ItemWishSchema Bases: :py:obj:`pydantic.BaseModel` One item on the signed-in member's wishlist, as ``GET /api/me/wishlist`` returns it. .. py:attribute:: item_id :type: int .. py:attribute:: name :type: str .. py:attribute:: quality :type: str .. py:attribute:: inventory_type_name :type: str .. py:attribute:: note :type: str | None .. py:attribute:: added_at :type: datetime.datetime .. py:class:: ItemWisher Bases: :py:obj:`pydantic.BaseModel` A member who wants an item, with their loot points, as ``GET /api/items/{item_id}/wishers`` returns them. .. py:attribute:: member_id :type: int .. py:attribute:: member_name :type: str .. py:attribute:: note :type: str | None .. py:attribute:: added_at :type: datetime.datetime .. py:attribute:: ep :type: float .. py:attribute:: gp :type: float .. py:attribute:: pr :type: float .. py:attribute:: trial :type: bool