🧦 Get_items

🧦 Get_items

Added on version 23.3.0
get_items( self, starts_after: str | None = None, ends_before: str | None = None, sort_order: SORT_OPTION = "desc", limit: int = 20, rarity: str | None = None, item_name: str | None = None, category: ItemCategory | None = None, ) -> GetPublicItemsResponse:
Fetch a list of posts, can be filtered, ordered, and paginated.
  • rarity: The rarities of items to filter for, comma separated (eg: rare, epic, legendary, none or rare)
  • item_name: The name of the item to retrieve.
  • category: The category of the item to retrieve. Available categories include:
aura
bag
blush
body
dress
earrings
emote
eye
eyebrow
face_hair
fishing_rod
freckle
fullsuit
glasses
gloves
hair_back
hair_front
handbag
hat
jacket
lashes
mole
mouth
necklace
nose
pants
rod
shirt
shoes
shorts
skirt
sock
tattoo
watch
  • sort_order: Determines the order in which results are returned. Can be either asc for ascending order or desc for descending order.
  • starts_after: The ID of the item from which to start the query. This is useful for paginating results.
  • ends_before: The ID of the item to end the query before. This is also useful for paginating results.
  • limit: The maximum number of items to retrieve per request.
Returns:
  • GetPublicRoomsResponse: A list of public data of posts.
💡
The Item_name parameter is CASE SENSITIVE, pay atention when using it.

⚙️ Use cases

Here’s a simple use case where we can print in the terminal items by name
async def on_chat(self, user: User, message: str) -> None: if message.lower().startswith("/item "): parts = message.split(" ") if len(parts) < 2: await self.highrise.chat("Invalid command") return item_name = "" for part in parts[1:]: item_name += part + " " item_name = item_name[:-1] print (item_name) try: response = await self.webapi.get_items(item_name=item_name) print (response) except Exception as e: await self.highrise.chat(f"Error: {e}")
 
notion image
Response:
GetPublicItemsResponse( items=[ ItemBasic( item_id='bag-n_HalloweenContestRewards2021BibliographyWings', item_name='Fire Demon Wings', category=<ItemCategory.BAG: 'bag'>, color_linked_categories=[], color_palettes=[], created_at=DateTime(2021, 10, 14, 11, 10, 19, 926000, tzinfo=Timezone('+00:00')), description_key=None, gems_sale_price=None, inspired_by=['5eb51615fd1d622ee365935a'], is_purchasable=False, is_tradable=True, image_url=None, icon_url=None, link_ids=[], m_dependent_colors=[], m_front_skin_part_list=[ SkinPart( bone='Accessories', slot='BagLower', image_file='front-bag-n_HalloweenContestRewards2021BibliographyWings-BagLower.vec', attachment_name=None, has_remote_render_layer=None)], m_back_skin_part_list=[ SkinPart( bone='Accessories', slot='BagUpper', image_file='back-bag-n_HalloweenContestRewards2021BibliographyWings-BagUpper.vec', attachment_name=None, has_remote_render_layer=None)], m_hidden_skin_parts=set(), pops_sale_price=20, rarity=<Rarity.EPIC: 'epic'>, release_date=DateTime(2021, 10, 21, 16, 0, 0, tzinfo=Timezone('+00:00')))], total=1, first_id='bag-n_HalloweenContestRewards2021BibliographyWings', last_id='bag-n_HalloweenContestRewards2021BibliographyWings')
 
Built with Potion.so