Skip to content

Releases: L-Mario564/osu.js

v2.5.0

13 Jul 03:19
Compare
Choose a tag to compare
  • Fix Client.beatmaps.getBeatmapAttributes returning mismatch from type definition. Addresses #18.
  • Add UserStatisticsVariant interface.
  • Add variants property to UserStatistics. Addresses #20.
  • Add include_variant_statistics property to GetUsersOptions.query.
  • Auth.clientCredentialsGrant now has an optional scopes paramater of type Scope[]. Defaults to ['public'].

v2.4.0

02 Apr 20:14
Compare
Choose a tag to compare
  • Add support for the /beatmaps/{beatmap}/solo-scores endpoint via Client.beatmaps.getBeatmapTopNonLegacyScores.
  • Add GetBeatmapTopNonLegacyScoresOptions interface.
  • Add image@2x property to UserActiveTournamentBanner interface.
  • Add image@2x_url property to UserBadge interface.
  • Add count_100, count_300, count_50, count_miss, pp_exp and global_rank_exp properties to UserStatistics interface.
  • Add active_tournament_banners to UserExtended interface.

v2.3.1

02 Apr 18:29
Compare
Choose a tag to compare
  • Fix the setAccessToken method in the Client class not setting the access token for the other classes it uses.

v2.3.0

05 Mar 17:12
Compare
Choose a tag to compare
  • Add the ability to set the access token in the current client via Client.setAccessToken.

v2.2.0

22 Feb 19:46
Compare
Choose a tag to compare
  • Add ruleset and ruleset_id properties to GetBeatmapAttributesOptions.body.
  • Update response type for Client.users.getSelf to include the session_verified property.
  • Add 'chat.read' and 'chat.write_manage' to Scope union type.
  • Add safeParse method to the Client class to optionally prevent the OsuJSUnexpectedResponseError error to be thrown in requests done to the current API. Addresses #12.

v2.1.0

16 Feb 16:45
Compare
Choose a tag to compare
  • Add best_id property to the Score interface.
  • The count_geki and count_katu properties in the ScoreStatistics interface are now marked as nullable. Addresses #4.
  • Fix a bug with getEnumMods when passing NC and/or PF alongside other mods.
  • Add derivativeModsWithOriginal parameter to getModsEnum in case the developer wishes for NC to output the same enum value as DTNC and for PF to output the same enum value as SDPF if set to true. Implemented with assistance of @yorunoken.

v2.0.2

10 Feb 16:36
Compare
Choose a tag to compare
  • getEnumMods now returns ['NC'] instead of ['DT', 'NC'] when input is 576 and returns ['PF'] instead of ['SD', 'PF'] when input is 16416. Fixed with assistance of @yorunoken.

v2.0.1

03 Feb 15:42
Compare
Choose a tag to compare

Patches

  • global_rank and country_rank properties in UserStatistics interface are now marked as nullable. Patched by @yorunoken.

v2.0.0

03 Feb 01:51
Compare
Choose a tag to compare

Breaking Changes

  • Use native fetch API instead of Axios.
  • Remove input validations.
  • Client.beatmaps.lookupBeatmap and Client.changelog.lookupChangelogBuild methods now return null if nothing is found on lookup. Prior to this, these methods would return undefined when there were no results.
  • Remove unused interface GetBeatmapOptions. (Not to be confused with GetBeatmapsOptions, note the plural form of beatmap).
  • The following properties in ModsEnum have been renamed:
    • K4 -> 4K
    • K5 -> 5K
    • K6 -> 6K
    • K7 -> 7K
    • K8 -> 8K
    • RN -> RD
    • TR -> TP
    • K1 -> 1K
    • K3 -> 3K
    • K2 -> 2K

Additions

  • Provide the option to pass a polyfill for the fetch API for development environments that have a Node.js version below 18.
  • Introduce error handling via the OsuJSGeneralError and OsuJSUnexpectedResponseError classes and OsuJSError type.
  • Token can now be revoked using Client.revokeToken. Has same functionality as Auth.revokeToken.
  • Add links to documentation in JSDoc comments.
  • Add osu! Lazer mods to Mod type.
  • New utility functions:
    • getModsEnum: Converts an array of mods into its numerical representation.
    • getEnumMods: Converts a numerical representation of a mod or mod combination into an array of mods represented as strings.
    • isOsuJSError: Determines if a value is an error thrown by osu.js.

Patches

  • Converted many types inferred from schemas into interfaces.

v1.4.0

18 Dec 20:17
Compare
Choose a tag to compare
  • Add guest and nominated literals to UserBeatmapsType. Added by @Teages.