Source code for wow._sync.resources.power_type

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