Skip to content

v2.2.0

Compare
Choose a tag to compare
@tybug tybug released this 28 Oct 02:04
· 433 commits to master since this release

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 with Beatmap#expand and User#expand
  • rename OssapiV2#beatmapsets_events to OssapiV2#beatmapset_events
  • rename Search.{user, wiki_page} to {users, wiki_pages}
  • add "foreign key" methods to retrieve the related User, Beatmap, or Beatmapset 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 calling bmset = beatmap.beatmapset() instead. This comes with added benefits like being guaranteed non-null.
  • add custom model json encoder ModelEncoder and corresponding serialize_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 or Mod
    • 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.
  • 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.