pokelance.models.abstract.item ⚓︎

Item ⚓︎

Bases: BaseModel

Item model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • name (str) –

    The name for this resource.

  • cost (int) –

    The price of this item in stores.

  • fling_power (int) –

    The power of the move Fling when used with this item.

  • fling_effect (NamedResource) –

    The effect of the move Fling when used with this item.

  • attributes (List[NamedResource]) –

    A list of attributes this item has.

  • category (NamedResource) –

    The category of items this item falls into.

  • effect_entries (List[Effect]) –

    The effect of this ability listed in different languages.

  • flavor_text_entries (List[VersionGroupFlavorText]) –

    The flavor text of this ability listed in different languages.

  • game_indices (List[GenerationGameIndex]) –

    A list of game indices relevent to this item by generation.

  • names (List[Name]) –

    The name of this resource listed in different languages.

  • sprites (ItemSprites) –

    A set of sprites used to depict this item in the game.

  • held_by_pokemon (List[ItemHolderPokemon]) –

    A list of Pokémon that might be found in the wild holding this item.

  • baby_trigger_for (NamedResource) –

    An evolution chain this item requires to produce a bay during mating.

  • machines (List[MachineVersionDetail]) –

    A list of the machines related to this item.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ItemAttribute ⚓︎

Bases: BaseModel

ItemAttribute model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • name (str) –

    The name for this resource.

  • items (List[NamedResource]) –

    A list of items that have this attribute.

  • names (List[Name]) –

    The name of this resource listed in different languages.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ItemCategory ⚓︎

Bases: BaseModel

ItemCategory model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • name (str) –

    The name for this resource.

  • items (List[NamedResource]) –

    A list of items that are a part of this category.

  • names (List[Name]) –

    The name of this resource listed in different languages.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ItemFlingEffect ⚓︎

Bases: BaseModel

ItemFlingEffect model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • name (str) –

    The name for this resource.

  • effect_entries (List[Effect]) –

    The result of this fling effect listed in different languages.

  • items (List[NamedResource]) –

    A list of items that have this fling effect.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ItemPocket ⚓︎

Bases: BaseModel

ItemPocket model.

Attributes:
  • id (int) –

    The identifier for this resource.

  • name (str) –

    The name for this resource.

  • categories (List[NamedResource]) –

    A list of item categories that are relevant to this item pocket.

  • names (List[Name]) –

    The name of this resource listed in different languages.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)