Page MenuHomePhabricator

Figure out why discussiontoolssubscribe API is marked as internal
Closed, ResolvedPublic

Description

https://github.com/wikimedia/mediawiki-extensions-DiscussionTools/blob/1f342306b43fcc93ad40f637ab4dd2e1cc4a174f/includes/ApiDiscussionToolsGetSubscriptions.php#L61-L66

@matmarex, looks like you marked discussiontoolssubscribe API as internal. I just wanted to inquire as to the reason, and if we could get this turned into a regular API soon? This API could potentially be really useful to extensions, gadgets, and user scripts that would like to use it. Examples:

Event Timeline

It was marked as internal because at the time, we weren't sure how topic subscriptions were going to be implemented in the end, and we didn't want to make any promises about the API stability.

I think it's stable now and it should be fine to use it elsewhere. We should unmark it as internal.

We should improve the validation and documentation while we're at it. For the page parameter, you're supposed to pass a title with a fragment pointing to the section, otherwise the subscription won't appear correctly on Special:TopicSubscriptions. And it's not obvious what the commentname should be (it's the ID value starting with h-).

Change 946553 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Remove 'internal' flag from ApiDiscussionToolsSubscribe

https://gerrit.wikimedia.org/r/946553

Change 946553 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Remove 'internal' flag from ApiDiscussionToolsSubscribe/GetSubscriptions

https://gerrit.wikimedia.org/r/946553