Source code for wow._sync.resources.playable_specialization

 1# Generated by scripts/unasync.py from src/wow/_async/resources/playable_specialization.py. Do not edit.
 2"""Routes of the Playable Specialization API."""
 3
 4from wow._sync._resource import Resource
 5from wow.models._common import Media
 6from wow.models.playable_specialization import PlayableSpecialization, PlayableSpecializationIndex
 7
 8__all__ = ["PlayableSpecializations"]
 9
10
[docs] 11class PlayableSpecializations(Resource): 12 """``client.playable_specializations``: class specializations such as Fury or Restoration.""" 13 14 __slots__ = () 15
[docs] 16 def index(self) -> PlayableSpecializationIndex: 17 """List every playable specialization.""" 18 return self._get("static", "/data/wow/playable-specialization/index", PlayableSpecializationIndex)
19
[docs] 20 def get(self, spec_id: int) -> PlayableSpecialization: 21 """Get one playable specialization by id.""" 22 return self._get("static", f"/data/wow/playable-specialization/{spec_id}", PlayableSpecialization)
23
[docs] 24 def media(self, spec_id: int) -> Media: 25 """Get a specialization's icon.""" 26 return self._get("static", f"/data/wow/media/playable-specialization/{spec_id}", Media)