v5.0.0b1
Pre-releaseThis release implements the x-api-version header of the osu api. It adds a new parameter api_version to Ossapi, which allows you to specify which version of the api your code supports. The attributes in the returned models may be different for certain endpoints depending on the passed api_version. For instance, by setting api_version=20220705 or higher, endpoints will start returning the new score format. This contains lazer-specific information such as settings for mods, correct accuracy for lazer scores, etc.
This is a major release bump for ossapi because I have set api_version to default to 20241024 (the current date as of time of release). This means that if your code relied on the previous structure score structure, it may break. It also means that by upgrading you will start using the newest structures by default. If you want to upgrade but want to continue using the old model structure, pass api_version=0 (or some sufficiently small version like api_version=20200101 is very likely to also work). You can opt-in to the new structure at any time by setting a higher api version.
I recommend that you hardcod a version string regardless, to be explicit about which api version you are using. You can choose the current date if you are happy with the current models you are receiving from the api.
Changes
- add
api_versionparameter toOssapi - add new
Ossapi.users_lookupendpoint - add
beatmapset_idparameter toapi.beatmapet_eventsendpoint - add
Nominations.eligible_main_rulesets - add
UserStatistics.rank_change_since_30_days - add
RoomCategory.DAILY_CHALLENGE - add
User.{profile_hue, daily_challenge_stats} - add
BeatmapsetEventCommentWithNominators.beatmap_ids - change
Nominations.requiredtoNominations.required_meta - mark
Rankings.totalas optional - mark
UserStatistics.{play_time, pp}as optional