TTTaevas / osu-api-v2-js

Package to easily access the new api of osu!
https://osu-v2.taevas.xyz
The Unlicense
6 stars 0 forks source link

Add getComments() and getComment() #29

Closed TTTaevas closed 7 months ago

TTTaevas commented 7 months ago

This PR adds full support for the two routes related to comments that aren't locked behind lazer

In an effort to stay as close to the original response of the API while making things more convenient for the package users, CommentableMetas that lack ids and that are therefore "Deleted Items" are filtered out, and a property called deleted_commentable_meta exists to let users know that the filtering happened

Furthermore, one of these routes doesn't support cursor_string, instead using the "soon to be replaced" cursor, and it turns out the package had no support for these; Prior to this PR, it didn't support objects in GET requests (or even Dates) So this PR tweaks quite a bit the code that handles GET requests to support more kinds of requests, although this theoretically should only be ever useful for cursors