From 44aed656b8906907d168aa4a4770e69daa6ba97e Mon Sep 17 00:00:00 2001 From: shoucandanghehe Date: Sat, 17 Aug 2024 04:21:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E5=BF=98=E8=AE=B0=20push=20sche?= =?UTF-8?q?ma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tetrio/api/schemas/summaries/league.py | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 nonebot_plugin_tetris_stats/games/tetrio/api/schemas/summaries/league.py diff --git a/nonebot_plugin_tetris_stats/games/tetrio/api/schemas/summaries/league.py b/nonebot_plugin_tetris_stats/games/tetrio/api/schemas/summaries/league.py new file mode 100644 index 0000000..d141516 --- /dev/null +++ b/nonebot_plugin_tetris_stats/games/tetrio/api/schemas/summaries/league.py @@ -0,0 +1,55 @@ +from pydantic import BaseModel, Field + +from ...typing import Rank, S1Rank, S1ValidRank, ValidRank +from ..base import SuccessModel + + +class PastInner(BaseModel): + season: str + username: str + country: str + placement: int + gamesplayed: int + gameswon: int + glicko: float + gxe: float + tr: float + rd: float + rank: S1Rank + bestrank: S1ValidRank + ranked: bool + apm: float + pps: float + vs: float + + +class Past(BaseModel): + first: PastInner = Field(..., alias='1') + + +class Data(BaseModel): + gamesplayed: int + gameswon: int + glicko: float + rd: float + gxe: float + tr: float + rank: Rank + bestrank: ValidRank = Field('z') + apm: float + pps: float + vs: float + decaying: bool + standing: int + standing_local: int + prev_rank: ValidRank | None = None + prev_at: int + next_rank: ValidRank | None = None + next_at: int + percentile: float + percentile_rank: Rank + past: Past + + +class LeagueSuccessModel(SuccessModel): + data: Data