feat(user): implement /users/{user_id}/beatmaps-passed

close #9
This commit is contained in:
MingxuanGame
2025-10-04 09:52:15 +00:00
parent 6f48dd4575
commit 38671cd471
2 changed files with 113 additions and 0 deletions

View File

@@ -84,6 +84,15 @@ class GameMode(str, Enum):
GameMode.FRUITSRX: "catch relax",
}[self]
def to_base_ruleset(self) -> "GameMode":
gamemode = {
GameMode.OSURX: GameMode.OSU,
GameMode.OSUAP: GameMode.OSU,
GameMode.TAIKORX: GameMode.TAIKO,
GameMode.FRUITSRX: GameMode.FRUITS,
}.get(self)
return gamemode if gamemode else self
def to_special_mode(self, mods: list[APIMod] | list[str]) -> "GameMode":
if self not in (GameMode.OSU, GameMode.TAIKO, GameMode.FRUITS):
return self