Skip to content

Commit

Permalink
feat: add legacy_only param to get_beatmap_scores
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceAesth committed Jan 30, 2024
1 parent 4af6780 commit 7be6a8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aiosu/v2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,8 @@ async def get_beatmap_scores(self, beatmap_id: int, **kwargs: Any) -> list[Score
See below
:Keyword Arguments:
* *legacy_only* (``bool``) --
Optional, whether to only get legacy scores, defaults to ``False``
* *mode* (``aiosu.models.gamemode.Gamemode``) --
Optional, gamemode to search for
* *mods* (``aiosu.models.mods.Mods``) --
Expand All @@ -1186,6 +1188,7 @@ async def get_beatmap_scores(self, beatmap_id: int, **kwargs: Any) -> list[Score
"""
url = f"{self.base_url}/api/v2/beatmaps/{beatmap_id}/scores"
params: dict[str, object] = {}
add_param(params, kwargs, key="legacy_only", converter=int)
add_param(params, kwargs, key="mode", converter=lambda x: str(Gamemode(x)))
add_param(
params,
Expand Down

0 comments on commit 7be6a8b

Please sign in to comment.