1"""Routes of the Pet API."""
2
3from wow._async._resource import AsyncResource
4from wow.models._common import Media
5from wow.models.pet import Pet, PetIndex
6
7__all__ = ["AsyncPets"]
8
9
[docs]
10class AsyncPets(AsyncResource):
11 """``client.pets``: battle pet species."""
12
13 __slots__ = ()
14
[docs]
15 async def index(self) -> PetIndex:
16 """List every battle pet species."""
17 return await self._get("static", "/data/wow/pet/index", PetIndex)
18
[docs]
19 async def get(self, pet_id: int) -> Pet:
20 """Get one battle pet species by id."""
21 return await self._get("static", f"/data/wow/pet/{pet_id}", Pet)
22