1# Generated by scripts/unasync.py from src/wow/_async/resources/quest.py. Do not edit.
2"""Routes of the Quest API."""
3
4from wow._sync._resource import Resource
5from wow.models.quest import (
6 Quest,
7 QuestArea,
8 QuestAreaIndex,
9 QuestCategory,
10 QuestCategoryIndex,
11 QuestType,
12 QuestTypeIndex,
13)
14
15__all__ = ["QuestAreas", "QuestCategories", "QuestTypes", "Quests"]
16
17
[docs]
18class Quests(Resource):
19 """``client.quests``: individual quests."""
20
21 __slots__ = ()
22
[docs]
23 def get(self, quest_id: int) -> Quest:
24 """Get one quest by id."""
25 return self._get("static", f"/data/wow/quest/{quest_id}", Quest)
26
27
[docs]
28class QuestAreas(Resource):
29 """``client.quest_areas``: the zones quests take place in."""
30
31 __slots__ = ()
32
[docs]
33 def index(self) -> QuestAreaIndex:
34 """List every quest area."""
35 return self._get("static", "/data/wow/quest/area/index", QuestAreaIndex)
36
[docs]
37 def get(self, area_id: int) -> QuestArea:
38 """Get one quest area and its quests by id."""
39 return self._get("static", f"/data/wow/quest/area/{area_id}", QuestArea)
40
41
[docs]
42class QuestCategories(Resource):
43 """``client.quest_categories``: quest groupings such as Epic or Seasonal."""
44
45 __slots__ = ()
46
[docs]
47 def index(self) -> QuestCategoryIndex:
48 """List every quest category."""
49 return self._get("static", "/data/wow/quest/category/index", QuestCategoryIndex)
50
[docs]
51 def get(self, category_id: int) -> QuestCategory:
52 """Get one quest category and its quests by id."""
53 return self._get("static", f"/data/wow/quest/category/{category_id}", QuestCategory)
54
55
[docs]
56class QuestTypes(Resource):
57 """``client.quest_types``: quest kinds such as Elite, PvP or Raid."""
58
59 __slots__ = ()
60
[docs]
61 def index(self) -> QuestTypeIndex:
62 """List every quest type."""
63 return self._get("static", "/data/wow/quest/type/index", QuestTypeIndex)
64
[docs]
65 def get(self, type_id: int) -> QuestType:
66 """Get one quest type and its quests by id."""
67 return self._get("static", f"/data/wow/quest/type/{type_id}", QuestType)