Source code for wow._sync.resources.region

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