Source code for wow._sync.resources.ruleset

 1# Generated by scripts/unasync.py from src/wow/_async/resources/ruleset.py. Do not edit.
 2"""Routes of the Ruleset API."""
 3
 4from wow._sync._resource import Resource
 5from wow.models.ruleset import Ruleset, RulesetIndex
 6
 7__all__ = ["Rulesets"]
 8
 9
[docs] 10class Rulesets(Resource): 11 """``client.rulesets``: the rulesets players choose from, such as Normal and PvP.""" 12 13 __slots__ = () 14
[docs] 15 def index(self) -> RulesetIndex: 16 """List every ruleset.""" 17 return self._get("dynamic", "/data/wow/ruleset/index", RulesetIndex)
18
[docs] 19 def get(self, ruleset_id: int) -> Ruleset: 20 """Get one ruleset by id, with its server status.""" 21 return self._get("dynamic", f"/data/wow/ruleset/{ruleset_id}", Ruleset)