ItemEndpoint#

class corkus.endpoints.ItemEndpoint#
async get_all(timeout=None)#

List all available items.

Note

This endpoint sends a lot of data. That means this function will take noticeably longer to execute than the other.

Parameters:

timeout (Optional[int]) – Optionally override default timeout.

Return type:

List[Item]

async search_by_type(type, timeout=None)#

Search for the items using their type (Item.type).

Warning

This function does not accept crafted items: ItemType.SCROLL, ItemType.POTION and ItemType.FOOD. Providing them will raise corkus.errors.InvalidInputError

Parameters:
  • type (ItemType) – The type of returned items.

  • timeout (Optional[int]) – Optionally override default timeout.

Raises:

InvalidInputError – When invalid type is provided.

Return type:

List[Item]

async search_by_name(name, timeout=None)#

Search for the items using their name (Item.name).

Parameters:
  • name (str) – Search term.

  • timeout (Optional[int]) – Optionally override default timeout.

Return type:

List[Item]