Source code for wow._sync.resources.title

 1# Generated by scripts/unasync.py from src/wow/_async/resources/title.py. Do not edit.
 2"""Routes of the Title API."""
 3
 4from wow._sync._resource import Resource
 5from wow.models.title import Title, TitleIndex
 6
 7__all__ = ["Titles"]
 8
 9
[docs] 10class Titles(Resource): 11 """``client.titles``: character titles such as Commander.""" 12 13 __slots__ = () 14
[docs] 15 def index(self) -> TitleIndex: 16 """List every title.""" 17 return self._get("static", "/data/wow/title/index", TitleIndex)
18
[docs] 19 def get(self, title_id: int) -> Title: 20 """Get one title by id.""" 21 return self._get("static", f"/data/wow/title/{title_id}", Title)