Added on version 23.3.0
get_item(self, item_id: str) -> GetPublicItemResponse:
Fetch a single item given its item_id.
Args:
item_id
: The unique identifier for a item.
Returns:
GetPublicItemResponse
: The public data of the item.βοΈ Use cases
Letβs make a simple example to get the details from the fifth item that the bot is wearing in his outfit:
async def on_chat(self, user: User, message: str) -> None: if message.lower().startswith("/getitem"): outfit_response = await self.highrise.get_my_outfit() fifth_item = outfit_response.outfit[4].id item_response = await self.webapi.get_item(item_id=fifth_item) print (item_response)
Response:
GetPublicItemResponse( item=Item( item_id='eyebrow-n_basic2018newbrows07', item_name='Fuzzy Brows', acquisition_cost=0, acquisition_amount=1, acquisition_currency='pops', category=<ItemCategory.EYEBROW: 'eyebrow'>, color_linked_categories=[], color_palettes=[], created_at=DateTime(2018, 8, 30, 23, 45, 9, 385000, tzinfo=Timezone('+00:00')), description_key=None, gems_sale_price=None, inspired_by=[], is_purchasable=False, is_tradable=False, image_url=None, icon_url=None, link_ids=[], m_dependent_colors=[], m_front_skin_part_list=[ SkinPart( bone='L_Eyebrow', slot='LeftEyebrow', image_file='front-eyebrow-n_basic2018newbrows07-LeftEyebrow.vec', attachment_name=None, has_remote_render_layer=None), SkinPart( bone='R_Eyebrow', slot='RightEyebrow', image_file='front-eyebrow-n_basic2018newbrows07-RightEyebrow.vec', attachment_name=None, has_remote_render_layer=None)], m_back_skin_part_list=[], m_hidden_skin_parts=set(), pops_sale_price=0, rarity=<Rarity.NONE: 'none_'>, release_date=DateTime(1970, 1, 1, 0, 0, 0, tzinfo=Timezone('+00:00'))), related_items=RelatedItems(affiliations=[], items=[]), storefront_listings=StorefrontListings(sellers=[], pages=0, total=0))
Β