Page MenuHomePhabricator

Enhance Page Revision Utility To Get Contents Of Last Two Revisions
Closed, ResolvedPublic8 Estimated Story Points

Description

To compute diff-related credibility signals, we need the wikitext for the current rev id and its parent rev id. We need to be able to pass rvlimit=2 and rvprop=content to the revision API in order to get the contents of the last two revisions.

To understand this, pls try this API call (in postman)

https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Green_Island_(Rideau_River)&rvlimit=2&formatversion=2&format=json&rvprop=content|ids|timestamp

Here, rvlimit=2 gets the latest two contents.
ids and timestamp under rvprop is just for illustration. We will be fine with just content.

To get this API result via our utility, you will have to enhance the revision utility such that it can get content for rvlimit=2.

Event Timeline

prabhat triaged this task as High priority.Jan 13 2022, 8:03 PM

I would suggest making content optional, meaning having the ability to get revisions list with and without content.

Also would suggest updating this part of the utility to give us the ability to make content optional, as if we are fetching 2 latest revisions with content there's no need for us to fetch it in PageData.

Lena.Milenko changed the task status from Open to In Progress.Jan 22 2022, 4:27 AM
Lena.Milenko changed the task status from In Progress to Open.Feb 3 2022, 12:46 PM