User talk:Yurik/Query API/Completed Requests
"revisions" action: rvcomments option: bug
with and without the rvcomments option, I recieve the same result, except that with it on the result is somewhat slower to arrive. See also the history page for that article for comparison. r3m0t talk 13:10, 19 May 2006 (UTC)
- This bug has been fixed in the newer version, and should be published shortly. In the meantime, use rvcomments=true. --Yurik 03:57, 20 May 2006 (UTC)
Page Content
- Get page content for current and previous revisions. Phr
- Done for current revision, pending for previous ones. --Yurik 18:20, 1 June 2006 (UTC)
- Done as part of revisions and as a separate content request. --Yurik 04:36, 2 June 2006 (UTC)
Pages in a Category
- Can get pages in a given category using "category" parameter. --Yurik 20:45, 6 June 2006 (UTC)
- to generate useful previews for categories, could your tool spit out the members of a category? Also it'd be cool if it could compute unions and intersections of categories. Lupin
- Partialy done - members of categories can now be retrieved using the "category" parameter (code is checked in, will be available shortly) --Yurik 20:44, 6 June 2006 (UTC)
- Thanks! The union and intersection business is probably a bit fanciful - I can't think of a good application at the moment :) Lupin|talk|popups 23:00, 6 June 2006 (UTC)
- Postponing unions, etc, until later. --Yurik 17:21, 8 June 2006 (UTC)
User Contributions
- I'd like to be able to query user contribs in a similar way to querying page histories. Lupin 03:53, 4 May 2006 (UTC)
- Done. --Yurik 05:47, 10 June 2006 (UTC)
Multiple revisions of same article
I want just that. To be able to fetch two versions of the same article with arbitrary revision ids. joshbuddytalk 07:29, 10 June 2006 (UTC)
- Done. You can now request any number (rvlimit) of unique users who edited given page(s). The revisions returned will be the last ones made by the users. --Yurik 23:18, 10 June 2006 (UTC)
History by revid
An oft-requested feature for my popups script is for it to provide better edit summaries when reverting. The script only knows about revision ids, so to do this it would be very useful if the revisions query supported using revids where it currently only dates, in the rvstart and rvend parameters. Lupin|talk|popups 12:56, 10 May 2006 (UTC)
- What kind of request do you want to make - Get name,date,comment for title/pageId where revision id = x? If that is what you need, do you want x to be just one value or multiple revIds? So the query can become: give me a list of titles with revisions if all i know is a list of revIDs. This way you can specify a list of revisions, and get back which pages they apply to, and some revision info. --Yurik 05:11, 12 May 2006 (UTC)
- For the immediate task at hand, I only need one or two revids. However, it'd be great if I could also specify ranges of the form "current until X", "X onwards", "X with previous 4 edits and next 5 edits". A general input syntax that springs to mind might be something like revids=x|y|a,b|c+1,d|^,e|f,$|g-2,h+4 which would retrieve the revision ids x,y, those between the one after c and d (inclusive), all those up to and including e (if that's not too many), all those from f onwards, and those between g and h with 2 more before and 4 more afterwards. Lupin|talk|popups 13:03, 12 May 2006 (UTC)
- First part done - you can now request pages by revids. Currently it will not do any additional set processing such as +4, -2, etc, as I am not sure how it will be used. Postponing for now. --Yurik 03:35, 11 June 2006 (UTC)
- Excellent, many thanks. I note that
what=revisions&revids=1384&rvlimit=2
returns revision 1384 and the previous edit to that page. I hope this is a feature and not a bug, because it should be very useful. Lupin|talk|popups 04:23, 11 June 2006 (UTC)- Feature, albeit a bit unexpected in its use :). When revids are given, it first determines which pages they belong to, and add those pages to the output. Also, the rvlimit is defaulted to 0, so as to avoid any unexpected revisions in the result. Setting it manualy is still allowed, as i follow the policy of let the user burry themselves if they wish - i'm in the showels business. All other rv* params should work as well - again, might produce unexpected or confusing results. The query you showed would give top 2 revisions + the one you asked by its id. If the one you asked for is in the top 2, only 2 rows will be returned. --Yurik 08:24, 11 June 2006 (UTC)
- Oh rats. I thought I was getting the revision I specified and the previous one, but that's not what you described. I must have tested this only on recent revision ids. Lupin|talk|popups 23:06, 11 June 2006 (UTC)
- Feature, albeit a bit unexpected in its use :). When revids are given, it first determines which pages they belong to, and add those pages to the output. Also, the rvlimit is defaulted to 0, so as to avoid any unexpected revisions in the result. Setting it manualy is still allowed, as i follow the policy of let the user burry themselves if they wish - i'm in the showels business. All other rv* params should work as well - again, might produce unexpected or confusing results. The query you showed would give top 2 revisions + the one you asked by its id. If the one you asked for is in the top 2, only 2 rows will be returned. --Yurik 08:24, 11 June 2006 (UTC)
- Excellent, many thanks. I note that
Image information and upload history
From IRC:
- Duesentrieb> can query.php give me the file upload history?
- select * from oldimage where oi_name = 'foo' order by oi_timestamp;
- select * from image where img_name = 'foo';
- --Yurik 18:45, 2 June 2006 (UTC)
Done. --Yurik 02:16, 14 June 2006 (UTC)