1"""Routes of the Reputation API."""
2
3from wow._async._resource import AsyncResource
4from wow.models.reputation import (
5 ReputationFaction,
6 ReputationFactionIndex,
7 ReputationTierSet,
8 ReputationTierSetIndex,
9)
10
11__all__ = ["AsyncReputationFactions", "AsyncReputationTiers"]
12
13
[docs]
14class AsyncReputationFactions(AsyncResource):
15 """``client.reputation_factions``: reputation factions such as cities, tribes and armies."""
16
17 __slots__ = ()
18
[docs]
19 async def index(self) -> ReputationFactionIndex:
20 """List every reputation faction."""
21 return await self._get("static", "/data/wow/reputation-faction/index", ReputationFactionIndex)
22
[docs]
23 async def get(self, faction_id: int) -> ReputationFaction:
24 """Get one reputation faction by id."""
25 return await self._get("static", f"/data/wow/reputation-faction/{faction_id}", ReputationFaction)
26
27
[docs]
28class AsyncReputationTiers(AsyncResource):
29 """``client.reputation_tiers``: the standing levels a faction's reputation can reach."""
30
31 __slots__ = ()
32
[docs]
33 async def index(self) -> ReputationTierSetIndex:
34 """List every reputation tier set."""
35 return await self._get("static", "/data/wow/reputation-tiers/index", ReputationTierSetIndex)
36
[docs]
37 async def get(self, tiers_id: int) -> ReputationTierSet:
38 """Get one reputation tier set by id."""
39 return await self._get("static", f"/data/wow/reputation-tiers/{tiers_id}", ReputationTierSet)