Page MenuHomePhabricator

Search for contributions for more than one user in one request to api.php
Closed, ResolvedPublic

Description

Author: tra.wiki

Description:
In query.php, it is possible to request the user contributions for more than one user, using a url like:
http://en.wikipedia.org/w/query.php?what=usercontribs&titles=User:Example1|User:Example2&uclimit=20&uccomments

It would be good to have this same functionality in api.php, perhaps using a url like:
http://en.wikipedia.org/w/api.php?action=query&list=usercontribs&ucuser=Example1|Example2


Version: unspecified
Severity: enhancement

Details

Reference
bz12912

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:06 PM
bzimport set Reference to bz12912.

This can be done, but note that the implementation will differ from query.php's at certain points. uclimit will be the *total* number of contributions to return (not *per user*), and the example link you provided will not separate Example1's and Example2's contributions: you'll just get a list of the 10 most recent contributions that were made by either Example1 or Example2, with no guarantee that you won't get 10 contribs by the same user. query.php's implementation may be somewhat more user-friendly, but causes a significant performance hit.

I'll probably implement this today.