Releases: TTTaevas/osu-api-v2-js
v1.0.5
New release! osu-api-v2-js keeps up with the changes that are made to the api!
Beatmapset
- A
Beatmapset
'scurrent_nomiantions
'srulesets
can now be null, watch out for that! - Various fixes have been applied to
Beatmapset.Event
s, namely in regards to them having abeatmapset
property or not track_id
has been added toBeatmapset
, useful for maps with songs from Featured Artists!
User
User.Extended
now hasprofile_hue
anddaily_challenge_user_stats
!- On the other hand,
cover_url
has been deprecated in favour ofcover
getUsers()
now allows you to set a boolean (include_variant_statistics
), which sets avariants
property to theUser
s that becomes helpful when getting data related to mania for example!
Multiplayer
- When you get a
Match
withgetMatch()
, you may now filter or limit theevents
featured in the response - You can now specifically seek out modern Beatmap Spotlights
Room
s thanks to a new parameter ingetRooms()
This release also changed getUser()
to use @
instead of key
, as recommended in the Breaking Changes section of the API's documentation, so you won't have to worry about that!
Full Changelog: v1.0.4...v1.0.5
v1.0.4
Minor release for a few changes:
- The API route can now be specified, useful if the server works differently than expected
- The server may return some of
WikiPage
'stags
as numbers instead of strings, such as years like2024
; the wrapper will now always convert those to strings - The
nominations_summary
ofBeatmapset
silently changed, removingrequired
and addingrequired_meta
&eligible_main_rulesets
; the wrapper has been updated to reflect these changes (you can do your own investigation of how it works server-side by starting here)
Full Changelog: v1.0.3...v1.0.4
v1.0.3
New release! Here's what's different from the previous version:
- Versions of Node.js 16 and more are now explicitly supported while versions 15 and below are explicitly unsupported
APIError
now provides themethod
used for the request- The
method
used for a request is now logged (whenAPI.verbose
is set toall
) - Introduce
API.withSettings()
and theChildAPI
class (#34)
To not go technical about it, the introduction of API.withSettings()
means you're now able to cancel any request by providing your own AbortSignal
! ChildAPI
is essentially what makes it possible behind the scenes
As always, the documentation should be able to help you if you wish to use this newly introduced feature!
Full Changelog: v1.0.2...v1.0.3
v1.0.2
This version brings you more ways to configure your API
objects to your liking!
- The
user_id
ofComment
has been marked as potentiallynull
; older comments always could've had a null user_id retry
has been added to theAPI
, you can configure how and when to automatically retry a failed request with it!refresh_timeout
has been added to theAPI
; Updatingrefresh_token
,refresh_on_expires
andexpires
will changerefresh_timeout
accordingly- The timeout that refreshes the token automatically (now
refresh_timeout
) no longer blocks the program from exiting, as .unref() is always called on it - The documentation is ever so slightly better
Enjoy!
Full Changelog: v1.0.1...v1.0.2
v1.0.1
This version changes a few things from v1.0.0, namely:
- Add a configurable
timeout
property to theAPI
class, which is used when doing a request withfetch()
(so on every request) (#32) - Make
API.createAsync()
always throw anAPIError
(instead of sometimes) - Add
original_error
toAPIError
, which is the error that has caused the program to throw anAPIError
(if there is one) - Add
status_code
toAPIError
, which is the status code given by the server (if there is one)
And also:
APIError
'sparameters
property is no longer marked as optional- A
Beatmapset
'ssource
may no longer be a number (it'll now always be a string, as written in the interface)
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Finally, version 1.0.0! This version only changes a few things, when compared to v0.6.0, namely:
- Each Beatmapset Events (from
getBeatmapsetEvents()
) now have their own interface, meaning much better type safety; You will know which properties the event has by looking at its type - The
Rulesets
enum has been renamed toRuleset
for the sake of consistency - The
Genres
andLanguages
enums under theBeatmapset
namespace have also been renamed toGenre
andLanguage
respectively - The
playstyle
ofUser.Extended
and thecountry_rank
ofUser.Statistics.WithCountryrank
may now benull
keepChatAlive()
now properly returnsUserSilence[]
getRoomLeaderboard()
now also returns the score of the authorized user, asuser_score
I sincerely hope you will find this package useful and easy to use <3
Please feel free to open an issue on the repository if you find any problem or if you have a suggestion!
Full Changelog: v0.6.0...v1.0.0
v0.6.0
This version makes breaking changes to most functions, and adds a few features, such as:
- Add
revokeToken()
in order to invalidate tokens manually - Make
request()
public to allow users of this package to make more personalized requests - Allow the automatic refresh of tokens upon getting 401 to be disabled
- Automatically refresh the token right before the expiration date by default
- Allow functions to be also called through namespaces
In addition, documentation should be more complete and organized than before
Full Changelog: v0.5.2...v0.6.0
v0.5.2
Added many functions:
getEvents()
getSeasonalBackgrounds()
getComments()
getComment()
getBeatmapsetDiscussions()
getBeatmapsetDiscussionVotes()
getBeatmapsetDiscussionPosts()
searchBeatmapset()
lookupBeatmapset()
getBeatmapsetEvents()
Other things this version brings are:
- Fixes to
Event
s (which were notably used bygetUserRecentActivity()
) - A proper and convenient namespace for WebSocket stuff
Genres
&Languages
enums- Usage of the
Rulesets
enum for some properties (likemode
/playmode
of aUser
) instead ofstring
Full Changelog: v0.5.1...v0.5.2
v0.5.1
v0.5.0
This version moves most types in namespaces, making things more organized and easier to understand!
It also provides support for websocket stuff, allowing you to access new chat messages as soon as they arrive!
Added functions
generateWebSocket()
Changed functions
getRanking()
was renamed to getUserRanking()
getRooms()
now requires you to specify the type of rooms you want, and has optional arguments related to limits and sorting
getUsers()
now allows you to give it an array of User
s
getBeatmaps()
now allows you to give it an array of Beatmap
s
Notable type changes
User.Extended
(previously UserExtended
) no longer has active_tournament_banner
, use active_tournament_banners
instead
Beatmapset
's source
may no longer be 0
, it'd be an empty string if there is no source
The tags
of Beatmapset.Extended
(previously BeatmapsetExtended
) also can't be 0
anymore, same logic
Types relating to comments such as Comment
have been removed for now as this package currently doesn't support anything regarding comments
Full Changelog: v0.4.2...v0.5.0