1"""Routes of the Region API."""
2
3from wow._async._resource import AsyncResource
4from wow.models.region import RegionIndex, RegionInfo
5
6__all__ = ["AsyncRegions"]
7
8
[docs]
9class AsyncRegions(AsyncResource):
10 """``client.regions``: Battle.net API regions."""
11
12 __slots__ = ()
13
[docs]
14 async def index(self) -> RegionIndex:
15 """List every region reachable from this host."""
16 return await self._get("dynamic", "/data/wow/region/index", RegionIndex)
17
[docs]
18 async def get(self, region_id: int) -> RegionInfo:
19 """Get one region by id."""
20 return await self._get("dynamic", f"/data/wow/region/{region_id}", RegionInfo)