Page MenuHomePhabricator

Enable developers to access discussion metadata via API
Open, Needs TriagePublic

Description

This task involves the work with extending the existing DiscussionTools API(s) in way(s) that enable developers to access to the discussion metadata Usability Improvements introduces.

Story

  • As someone who is responsible for a bot that helps volunteers track the activity happening withing discussions, I'd value the ability to directly access the activity data DiscussionTools computes/tracks, so that I do not need to duplicate computation that is already being done upstream/elsewhere.

Use Cases

  • Show the following pieces of information about the discussions that have taken place on an arbitrary page, as is done on hu.wiki here:
    • The title of the discussion
    • The date the discussion was started
    • The date of the last edit that was made to the discussion
    • The number of comments within the discussion
    • The size, as measured in bytes, of the discussion

This ticket was inspired by the question @binbot posted at hu.wiki here.

@VirginiaPoundstone and the Platform Team have expressed interest in gaining similar access to the data this ticket is describing as part of the work they are doing to improve https://api.wikimedia.org/wiki/Main_Page .

Event Timeline

ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)
ppelberg added a subscriber: VirginiaPoundstone.
ppelberg updated the task description. (Show Details)

I think we've mostly done this in T416038. The only thing we don't provide is "size in bytes of the discussion", which is kind of ambiguous (in wikitext? in the HTML DT actually works on?)

I think we've mostly done this in T416038. The only thing we don't provide is "size in bytes of the discussion", which is kind of ambiguous (in wikitext? in the HTML DT actually works on?)

Maybe characters then? Is it less ambigous?

I guess the bot inspiring this task is using wikitext bytes, since that’s what a Pywikibot bot can most easily access (I can’t verify this, as the source code has been “soon to be published” for almost 15 years now…). The number of characters in the textContent (not innerText, so that topics with long collapsed parts don’t look short) of the discussion may be a better measure, though.