Skip to content

Releases: TTTaevas/osu-api-v2-js

v1.0.4

10 Jun 11:24
Compare
Choose a tag to compare

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's tags as numbers instead of strings, such as years like 2024; the wrapper will now always convert those to strings
  • The nominations_summary of Beatmapset silently changed, removing required and adding required_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

22 Apr 15:39
Compare
Choose a tag to compare

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 the method used for the request
  • The method used for a request is now logged (when API.verbose is set to all)
  • Introduce API.withSettings() and the ChildAPI 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

17 Apr 01:19
Compare
Choose a tag to compare

This version brings you more ways to configure your API objects to your liking!

  • The user_id of Comment has been marked as potentially null; older comments always could've had a null user_id
  • retry has been added to the API, you can configure how and when to automatically retry a failed request with it!
  • refresh_timeout has been added to the API; Updating refresh_token, refresh_on_expires and expires will change refresh_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

13 Apr 16:41
Compare
Choose a tag to compare

This version changes a few things from v1.0.0, namely:

  • Add a configurable timeout property to the API class, which is used when doing a request with fetch() (so on every request) (#32)
  • Make API.createAsync() always throw an APIError (instead of sometimes)
  • Add original_error to APIError, which is the error that has caused the program to throw an APIError (if there is one)
  • Add status_code to APIError, which is the status code given by the server (if there is one)

And also:

  • APIError's parameters property is no longer marked as optional
  • A Beatmapset's source 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

31 Mar 13:54
Compare
Choose a tag to compare

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 to Ruleset for the sake of consistency
  • The Genres and Languages enums under the Beatmapset namespace have also been renamed to Genre and Language respectively
  • The playstyle of User.Extended and the country_rank of User.Statistics.WithCountryrank may now be null
  • keepChatAlive() now properly returns UserSilence[]
  • getRoomLeaderboard() now also returns the score of the authorized user, as user_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

27 Mar 13:48
Compare
Choose a tag to compare

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

15 Mar 14:56
Compare
Choose a tag to compare

Added many functions:

  • getEvents()
  • getSeasonalBackgrounds()
  • getComments()
  • getComment()
  • getBeatmapsetDiscussions()
  • getBeatmapsetDiscussionVotes()
  • getBeatmapsetDiscussionPosts()
  • searchBeatmapset()
  • lookupBeatmapset()
  • getBeatmapsetEvents()

Other things this version brings are:

  • Fixes to Events (which were notably used by getUserRecentActivity())
  • A proper and convenient namespace for WebSocket stuff
  • Genres & Languages enums
  • Usage of the Rulesets enum for some properties (like mode/playmode of a User) instead of string

Full Changelog: v0.5.1...v0.5.2

v0.5.1

07 Mar 16:57
Compare
Choose a tag to compare

Adds some functions:

  • getBeatmapSoloScores()
  • lookupBeatmap()
  • lookupChangelogBuild()
  • getReplay()

This version adds a include_lazer_scores to getBeatmapScores(), which might break v0.5.0 code if this function's used with a specified ruleset, watch out!

v0.5.0

05 Mar 18:17
Compare
Choose a tag to compare

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 Users
getBeatmaps() now allows you to give it an array of Beatmaps

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

v0.4.2

27 Nov 16:06
9729c41
Compare
Choose a tag to compare

This version adds to the API object the functions that relate to news posts, forums, and chatting!
It also adds the behavior of automatically seeking a new token if a request seems to fail because the current token has expired
User interfaces have also received light adjustments