pytenno.interface.items
Module holding the Items interface class.
- class pytenno.interface.items.Items(backend: PyTennoBackend)[source]
Class for the items backend.
- async get_dropsources(item_name: str, include_items: Literal[False], language: Optional[Literal['en', 'ru', 'ko', 'fr', 'sv', 'de', 'zh_hans', 'zh_hant', 'pt', 'es', 'pl']] = None) list[pytenno.models.droptable.DropSource][source]
- async get_dropsources(item_name: str, include_items: Literal[True], language: Optional[Literal['en', 'ru', 'ko', 'fr', 'sv', 'de', 'zh_hans', 'zh_hant', 'pt', 'es', 'pl']] = None) tuple[list[pytenno.models.droptable.DropSource], list[pytenno.models.items.ItemFull]]
Gets where an item can be found.
- Parameters
- Return type
list[DropSource] | tuple(list[DropSource], list[ItemFull])
Example
>>> async with PyTenno() as pytenno: >>> droptable, items = await pytenno.items.get_droptable("frost prime neuroptics", include_items=True) >>> print(droptable.relics, droptable.missions) >>> for item in items: >>> print(item.url_name)
- async get_item(item_name: str, *, platform: Optional[Platform] = None) list[pytenno.models.items.ItemFull][source]
Gets the item with the given name, as well as related items (such as items of the same set).
The item must be tradeable.
- Parameters
- Return type
Example
>>> async with PyTenno() as pytenno: >>> items = await pytenno.items.get_item("mirage prime set") >>> for item in items: >>> print(item.url_name)
- async get_items(language: Optional[Literal['en', 'ru', 'ko', 'fr', 'sv', 'de', 'zh_hans', 'zh_hant', 'pt', 'es', 'pl']] = None) list[pytenno.models.items.ItemShort][source]
Gets all items.
- Parameters
language (Optional[VALID_LANGUAGES]) – The language of the items. Default:
None, meaning the default set during client construction.- Return type
Example
>>> async with PyTenno() as pytenno: >>> items = await pytenno.items.get_items() >>> for item in items: >>> print(item.url_name)
- async get_orders(item_name: str, include_items: Literal[False], platform: Optional[Platform] = None) list[pytenno.models.orders.OrderRow][source]
- async get_orders(item_name: str, include_items: Literal[True], platform: Optional[Platform] = None) tuple[list[pytenno.models.orders.OrderRow], list[pytenno.models.items.ItemFull]]
Gets the orders of the given item.
- Parameters
- Return type
Example
>>> async with PyTenno() as pytenno: >>> orders, items = await pytenno.items.get_orders("mirage prime set", include_items=True) >>> for order in orders: >>> print(order.user.ingame_name) >>> for item in items: >>> print(item.url_name)