Releases: L-Mario564/osu.js
Releases · L-Mario564/osu.js
v2.5.0
- Fix
Client.beatmaps.getBeatmapAttributes
returning mismatch from type definition. Addresses #18. - Add
UserStatisticsVariant
interface. - Add
variants
property toUserStatistics
. Addresses #20. - Add
include_variant_statistics
property toGetUsersOptions.query
. Auth.clientCredentialsGrant
now has an optionalscopes
paramater of typeScope[]
. Defaults to['public']
.
v2.4.0
- Add support for the
/beatmaps/{beatmap}/solo-scores
endpoint viaClient.beatmaps.getBeatmapTopNonLegacyScores
. - Add
GetBeatmapTopNonLegacyScoresOptions
interface. - Add
image@2x
property toUserActiveTournamentBanner
interface. - Add
image@2x_url
property toUserBadge
interface. - Add
count_100
,count_300
,count_50
,count_miss
,pp_exp
andglobal_rank_exp
properties toUserStatistics
interface. - Add
active_tournament_banners
toUserExtended
interface.
v2.3.1
- Fix the
setAccessToken
method in theClient
class not setting the access token for the other classes it uses.
v2.3.0
- Add the ability to set the access token in the current client via
Client.setAccessToken
.
v2.2.0
- Add
ruleset
andruleset_id
properties toGetBeatmapAttributesOptions.body
. - Update response type for
Client.users.getSelf
to include thesession_verified
property. - Add
'chat.read'
and'chat.write_manage'
toScope
union type. - Add
safeParse
method to theClient
class to optionally prevent theOsuJSUnexpectedResponseError
error to be thrown in requests done to the current API. Addresses #12.
v2.1.0
- Add
best_id
property to theScore
interface. - The
count_geki
andcount_katu
properties in theScoreStatistics
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 togetModsEnum
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 totrue
. Implemented with assistance of @yorunoken.
v2.0.2
getEnumMods
now returns['NC']
instead of['DT', 'NC']
when input is576
and returns['PF']
instead of['SD', 'PF']
when input is16416
. Fixed with assistance of @yorunoken.
v2.0.1
Patches
global_rank
andcountry_rank
properties inUserStatistics
interface are now marked as nullable. Patched by @yorunoken.
v2.0.0
Breaking Changes
- Use native fetch API instead of Axios.
- Remove input validations.
Client.beatmaps.lookupBeatmap
andClient.changelog.lookupChangelogBuild
methods now returnnull
if nothing is found on lookup. Prior to this, these methods would returnundefined
when there were no results.- Remove unused interface
GetBeatmapOptions
. (Not to be confused withGetBeatmapsOptions
, 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
andOsuJSUnexpectedResponseError
classes andOsuJSError
type. - Token can now be revoked using
Client.revokeToken
. Has same functionality asAuth.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.