1"""Routes of the Power Type API."""
2
3from wow._async._resource import AsyncResource
4from wow.models.power_type import PowerType, PowerTypeIndex
5
6__all__ = ["AsyncPowerTypes"]
7
8
[docs]
9class AsyncPowerTypes(AsyncResource):
10 """``client.power_types``: power types such as Mana and Rage."""
11
12 __slots__ = ()
13
[docs]
14 async def index(self) -> PowerTypeIndex:
15 """List every power type."""
16 return await self._get("static", "/data/wow/power-type/index", PowerTypeIndex)
17
[docs]
18 async def get(self, power_type_id: int) -> PowerType:
19 """Get one power type by id."""
20 return await self._get("static", f"/data/wow/power-type/{power_type_id}", PowerType)