v2.2.0
Note that this release includes a few breaking changes for OssapiV2
. They are bolded below.
- make
UserStatistics.play_time
optional - make
BeatmapCompact.beatmapset_id
non-optional - add
OssapiV2#news_listing
- add
OssapiV2#news_post
- add
OssapiV2#friends
- add
OssapiV2#seasonal_backgrounds
- add
OssapiV2#beatmapset
to retrieve a beatmapset from either a beatmap id, or a beatmapset id - implement
Beatmapset#expand
in line withBeatmap#expand
andUser#expand
- rename
OssapiV2#beatmapsets_events
toOssapiV2#beatmapset_events
- rename Search.{user, wiki_page} to {users, wiki_pages}
- add "foreign key" methods to retrieve the related
User
,Beatmap
, orBeatmapset
of any model. See the "following foreign keys" section of the readme for more information.- note that this is a breaking change because some attributes which were previously properties are now methods, and will need to be adjusted accordingly. For instance, if you were previously accessing
bmset = beatmap.beatmapset
, you will need to change that to callingbmset = beatmap.beatmapset()
instead. This comes with added benefits like being guaranteed non-null.
- note that this is a breaking change because some attributes which were previously properties are now methods, and will need to be adjusted accordingly. For instance, if you were previously accessing
- add custom model json encoder
ModelEncoder
and correspondingserialize_model
method to serialize a model to json (from ossapi import serialize_model
) - remove explicit annotations from
Cursor
- this means that cursor attributes will be their "raw" json type, and not converted to a nice type like a
datetime
orMod
- the osu!web team has made it very clear that cursors are part of an internal, undocumented api, which is why I'm not putting any effort into making it easily accessible for consumers. If you need to access a cursor object for some reason, you should probably figure out another way or raise it with the web team.
- this means that cursor attributes will be their "raw" json type, and not converted to a nice type like a
- don't raise error on null fields, even when they're non-optional, unless
strict=True
- this better preserves forward-compatibility for all releases from now on. The osu! api sometimes makes previously required arguments optional. Previously, this would cause fatal errors when decoding. Now we simply ignore such mismatches.
- you can and should still rely on non-null guarantees of fields not marked as optional, as I will still fix such issues if the api does ever break compatibility in this way. This change is only to improve forward-compatibility for old releases.