Skip to content

Item

pokelance.models.abstract.item ⚓︎

Currency ⚓︎

Bases: BaseModel

Currency model.

Attributes:

Name Type Description
id int

The identifier for this resource.

name str

The name for this resource.

names List[Name]

The name of this resource listed in different languages.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Item ⚓︎

Bases: BaseModel

Item model.

Attributes:

Name Type Description
id int

The identifier for this resource.

name str

The name for this resource.

prices List[ItemPrice]

The purchase and sell prices of this item for each version group.

fling_power Optional[int]

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

fling_effect Optional[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[VerboseEffect]

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 Optional[Resource]

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:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

ItemAttribute ⚓︎

Bases: BaseModel

ItemAttribute model.

Attributes:

Name Type Description
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.

descriptions List[Description]

The description of this resource listed in different languages.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

ItemCategory ⚓︎

Bases: BaseModel

ItemCategory model.

Attributes:

Name Type Description
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.

pocket NamedResource

The pocket this category of items falls into.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

ItemFlingEffect ⚓︎

Bases: BaseModel

ItemFlingEffect model.

Attributes:

Name Type Description
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:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

ItemPocket ⚓︎

Bases: BaseModel

ItemPocket model.

Attributes:

Name Type Description
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:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Comments