Reputation: 113
I'm trying to design a query that returns the diff of the first and last (or oldest and newest, if you like) revisions of a given Wikipedia article, but I can't figure out a way to do it without sorting by oldest first, parsing out the top result, and diffing it with the current revision manually.
Upvotes: 0
Views: 227
Reputation: 665536
I can't figure out a way to do it without sorting by oldest first, parsing out the top result
I don't think there is a way around this.
and diffing it with the current revision manually.
However, you can do this in one step. You can send the rvdiffto=cur
parameter, so that you don't have to deduce the current revision id in an extra step.
rvprop=id|timestamp & rvlimit=1 & rvdir=newer & rvdiffto=cur
Upvotes: 1