pokelance.ext.move
⚓︎
Move(client)
⚓︎
Bases: BaseExtension
Extension for move related endpoints.
Attributes: |
|
---|
Initializes the extension.
Parameters: |
|
---|
Returns: |
|
---|
Source code in pokelance/ext/_base.py
fetch_move(name)
async
⚓︎
Fetches a move from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... move = await client.move.fetch_move(1)
... print(move.name)
... await client.close()
>>> asyncio.run(main())
pound
Source code in pokelance/ext/move.py
fetch_move_ailment(name)
async
⚓︎
Fetches a move ailment from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... ailment = await client.move.fetch_move_ailment(1)
... print(ailment.name)
... await client.close()
>>> asyncio.run(main())
paralysis
Source code in pokelance/ext/move.py
fetch_move_battle_style(name)
async
⚓︎
Fetches a move battle style from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... style = await client.move.fetch_move_battle_style(1)
... print(style.name)
... await client.close()
>>> asyncio.run(main())
attack
Source code in pokelance/ext/move.py
fetch_move_category(name)
async
⚓︎
Fetches a move category from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... category = await client.move.fetch_move_category(1)
... print(category.name)
... await client.close()
>>> asyncio.run(main())
ailment
Source code in pokelance/ext/move.py
fetch_move_damage_class(name)
async
⚓︎
Fetches a move damage class from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... damage_class = await client.move.fetch_move_damage_class(1)
... print(damage_class.name)
... await client.close()
>>> asyncio.run(main())
status
Source code in pokelance/ext/move.py
fetch_move_learn_method(name)
async
⚓︎
Fetches a move learn method from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... learn_method = await client.move.fetch_move_learn_method(1)
... print(learn_method.name)
... await client.close()
>>> asyncio.run(main())
level-up
Source code in pokelance/ext/move.py
fetch_move_target(name)
async
⚓︎
Fetches a move target from the API.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> import asyncio
>>> client = PokeLance()
>>> async def main() -> None:
... target = await client.move.fetch_move_target(1)
... print(target.name)
... await client.close()
>>> asyncio.run(main())
specific-pokemon
Source code in pokelance/ext/move.py
get_message(case, data)
staticmethod
⚓︎
Gets the error message for a resource not found error.
Parameters: |
---|
Returns: |
|
---|
Source code in pokelance/ext/_base.py
get_move(name)
⚓︎
Gets a move from the cache.
Parameters: |
---|
Returns: |
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> move = client.move.get_move(1)
>>> move.name
'pound'
Source code in pokelance/ext/move.py
get_move_ailment(name)
⚓︎
Gets a move ailment from the cache.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> ailment = client.move.get_move_ailment(1)
>>> ailment.name
'paralysis'
Source code in pokelance/ext/move.py
get_move_battle_style(name)
⚓︎
Gets a move battle style from the cache.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> style = client.move.get_move_battle_style(1)
>>> style.name
'attack'
Source code in pokelance/ext/move.py
get_move_category(name)
⚓︎
Gets a move category from the cache.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> category = client.move.get_move_category(1)
>>> category.name
'ailment'
Source code in pokelance/ext/move.py
get_move_damage_class(name)
⚓︎
Gets a move damage class from the cache.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> damage_class = client.move.get_move_damage_class(1)
>>> damage_class.name
'status'
Source code in pokelance/ext/move.py
get_move_learn_method(name)
⚓︎
Gets a move learn method from the cache.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> learn_method = client.move.get_move_learn_method(1)
>>> learn_method.name
'level-up'
Source code in pokelance/ext/move.py
get_move_target(name)
⚓︎
Gets a move target from the cache.
Parameters: |
---|
Returns: |
|
---|
Raises: |
|
---|
Examples:
>>> from pokelance import PokeLance
>>> client = PokeLance()
>>> target = client.move.get_move_target(1)
>>> target.name
'specific-pokemon'
Source code in pokelance/ext/move.py
setup()
async
⚓︎
Sets up the extension.