1"""Routes of the Playable Class API."""
2
3from wow._async._resource import AsyncResource
4from wow.models._common import Media
5from wow.models.playable_class import PlayableClass, PlayableClassIndex
6
7__all__ = ["AsyncPlayableClasses"]
8
9
[docs]
10class AsyncPlayableClasses(AsyncResource):
11 """``client.playable_classes``: classes such as Warrior and Mage."""
12
13 __slots__ = ()
14
[docs]
15 async def index(self) -> PlayableClassIndex:
16 """List every playable class."""
17 return await self._get("static", "/data/wow/playable-class/index", PlayableClassIndex)
18
[docs]
19 async def get(self, class_id: int) -> PlayableClass:
20 """Get one playable class by id."""
21 return await self._get("static", f"/data/wow/playable-class/{class_id}", PlayableClass)
22