osu-web icon indicating copy to clipboard operation
osu-web copied to clipboard

Add API endpoints for creating/editing beatmap discussion posts

Open minetoblend opened this issue 1 year ago • 3 comments

Closes #10199

Adds the ability to create new beatmap discussions, reply to existing discussions, and updating discussion posts, via the API. The whole thing is based on the forum API for how OAuth scopes are set up (forum.write scope).

Use cases

  • Bots that automatically detect unrankables and create posts about it
  • Ability to write mods in third party mapping tools & editors
  • Would help pave the way for modding in the lazer editor

List of all changes:

  • Added API endpoints for BeatmapDiscussionPostsController.store and BeatmapDiscussionPostsController.update
  • Added a beatmap_discussion.write OAuth scope
  • Added API Documentation for BeatmapDiscussionPostsController.store and BeatmapDiscussionPostsController.update
  • Made adjustments to expected endpoints in RouteScopesTest
  • Added English & German translations for beatmap_discussion.write OAuth scope

minetoblend avatar Mar 24 '24 17:03 minetoblend

Ability to write mods in third party mapping tools & editors

I'm against supporting this, so it should be limited for now to not allow that. This is in line with other restrictions we currently have like third party apps should not be able to post on forums as a user.

Maybe client-auth only for lazer to start with.

peppy avatar Mar 25 '24 03:03 peppy

In that case, would adding it to the the scopes that require client delegation (like chat.write) work? That way it can still be used by bot accounts & lazer, while not being able to post as regular users.

minetoblend avatar Mar 25 '24 04:03 minetoblend

This is in line with other restrictions we currently have like third party apps should not be able to post on forums as a user.

there is no such restriction :see_no_evil: maybe you're thinking of chat messages, which do have some additional requirements

what problems do you see with adding more write scopes like this? if it's going to be a blocker for third party, we should at least be tracking what needs to be done somewhere. maybe #10589 is related

cl8n avatar Mar 25 '24 06:03 cl8n