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