IngredientEndpoint#

class corkus.endpoints.IngredientEndpoint#
async list_all(timeout=None)#

List all available ingredient.

Parameters:

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

Return type:

List[PartialIngredient]

async get(name, timeout=None)#

Get information about ingredient of specified name

Parameters:
  • name (str) – the name of the ingredient

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

Return type:

Ingredient

async search_by_name(name, timeout=None)#

Search for the ingredients using name (Ingredient.name). For geting ingredient by specified name see: get().

Parameters:
  • name (str) – Search term.

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

Return type:

List[Ingredient]

async search_by_tier(tier, timeout=None)#

Search for the ingredients using their tier (Ingredient.tier).

Parameters:
  • tier (Literal[0, 1, 2, 3]) – Tier of returned ingredients.

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

Return type:

List[Ingredient]

async search_by_level(level, timeout=None)#

Search for the ingredients using their level (Ingredient.required_level).

Parameters:
  • level (int) – Level of returned ingredients.

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

Return type:

List[Ingredient]

async search_by_professions(symbol, professions, timeout=None)#

This is a Moderate search route. See more: Search Routes.

Search for the ingredients using their required professions (Ingredient.required_professions).

Parameters:
  • symbol (LogicSymbol) – Logic symbol to be used on ingredients list.

  • professions (List[ProfessionType]) – List of professions to search for.

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

Return type:

List[Ingredient]

async search_by_sprite(symbol, *, id=None, damage=None, timeout=None)#

This is a Complex search route. See more: Search Routes.

Search for the ingredients using properties in Ingredient.sprite.

Parameters:
  • symbol (LogicSymbol) – Logic symbol to be used on this query.

  • id (Optional[int]) – Ingredient property.

  • damage (Optional[int]) – Ingredient property.

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

Return type:

List[Ingredient]

async search_by_identifications(symbol, identifications, timeout=None)#

This is a Complex search route. See more: Search Routes.

Search for the ingredients using values of their identifications Ingredient.identifications.

Example:

# Search for ingredient that have xp bonus between 4 and 6 AND any loot bonus

await corkus.ingredient.search_by_identifications(
    LogicSymbol.AND,
    [
        (IdentificationType.XP_BONUS, 4, 6),
        (IdentificationType.LOOT_BONUS, None, None),
    ]
)
Parameters:
  • symbol (LogicSymbol) – Logic symbol to be used on this query.

  • identifications (List[Tuple[IdentificationType, Optional[int], Optional[int]]]) –

    List of tuples with exactly three elements.

    • Type of the identification.

    • If a int, the min for such identification must have that value. If None, the min for such identification can be anything.

    • If a int, the max for such identification must have that value. If None, the max for such identification can be anything.

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

Return type:

List[Ingredient]

async search_by_item_modifiers(symbol, *, durability=None, strength=None, dexterity=None, intelligence=None, defence=None, agility=None, timeout=None)#

This is a Complex search route. See more: Search Routes.

Search for the ingredients using properties in Ingredient.item_modifiers.

Parameters:
Return type:

List[Ingredient]

async search_by_consumable_modifiers(symbol, *, duration=None, charges=None, timeout=None)#

This is a Complex search route. See more: Search Routes.

Search for the ingredients using properties in Ingredient.consumable_modifiers.

Parameters:
  • symbol (LogicSymbol) – Logic symbol to be used on this query.

  • duration (Optional[int]) – Ingredient property.

  • charges (Optional[int]) – Ingredient property.

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

Return type:

List[Ingredient]