Scores#

download_score(self, score_id, *, raw=False)#

Download the replay data of a score.

This endpoint is for score ids which don’t have a matching gamemode (new id format). If you have an old score id, use api.download_score_mode.

Parameters:
  • score_id (int) – The score to download.

  • raw (bool) – If True, will return the raw string response from the api instead of a Replay object.

Return type:

Replay

Notes

Implements the Download Score endpoint.

download_score_mode(self, mode, score_id, *, raw=False)#

Download the replay data of a score.

This endpoint is for score ids which have a matching gamemode (old id format). If you have a new score id, use api.download_score.

Parameters:
  • mode (GameMode | str) – The mode of the score to download.

  • score_id (int) – The score to download.

  • raw (bool) – If True, will return the raw string response from the api instead of a Replay object.

Return type:

Replay

Notes

Implements the Download Score endpoint.

score(self, score_id)#

Get a score. This corresponds to urls of the form https://osu.ppy.sh/scores/1312718771 (“new id format”).

If you have an old id which is per-gamemode, use api.score_mode.

Parameters:

score_id (int) – The score to get.

Return type:

Score

Notes

Implements the Get Score endpoint.

score_mode(self, mode, score_id)#

Get a score, where the score id is specific to the gamemode. This corresponds to urls of the form https://osu.ppy.sh/scores/osu/4459998279 (“old id format”).

If you have a new id which is global across gamemodes, use api.score.

Parameters:
  • mode (GameMode | str) – The mode the score was set on.

  • score_id (int) – The score to get.

Return type:

Score

Notes

Implements the Get Score endpoint.