Unless I did not understand something, this is by design - you have asked
for multiple properties - categories, revision, and imageinfo. The first
result included everything except all imageinfos (which is strange -
imageinfo doesn't seem so complex as to require a continuation, but that's
a separate potential issue). When you continued, the second result will
only give you what you have not received yet - which is only the imageinfo.
There is no point to resend the same revision data twice.
On Tue, May 28, 2013 at 2:29 PM, Liu Chenheng <liuchenheng(a)gmail.com> wrote:
Hi, All!
I found a very strange thing about the continue tokens:
The link is here:
http://commons.wikimedia.org/w/api.php?action=query&format=xml&revi…
I got the following response:
<api>
<query>
<pages>
<page pageid="1246719" ns="6" title="File:AB
towns+names.png"
imagerepository="local" contentmodel="wikitext" touched="
2012-04-26T19:25:33Z" lastrevid="37692183" counter=""
length="447">
<categories>
<cl ns="14" title="Category:Locator maps of cities in
Alberta"/>
<cl ns="14" title="Category:Maps of Alberta"/>
<cl ns="14" title="Category:PD-self"/>
</categories>
<imageinfo>
<ii size="82937" width="524" height="700" url="
http://upload.wikimedia.org/wikipedia/commons/1/1d/AB_towns%2Bnames.png&quo…
descriptionurl="
http://commons.wikimedia.org/wiki/File:AB_towns%2Bnames.png" sha1="
0753be62082948bceb1db4205e75d4cf819dbbfa"mime="image/png"
bitdepth="8"/>
</imageinfo>
<revisions>
<rev revid="37692183" parentid="25300971" minor=""
user="Qyd" timestamp="
2010-04-16T02:38:20Z" comment="/* {{int:filedesc}} */ gallery"
contentformat="text/x-wiki" contentmodel="wikitext"
xml:space="preserve">
== {{int:filedesc}} == {{Information |Description=Map of [[Alberta]] with
cities, towns and roads |Source=GIS data |Date=2006-10 |Author={{User|Qyd}}
|Permission=All |other_versions=<gallery> Image:AB-towns-roads.png|without
town names Image:AB-towns-highways.png|simplified
Image:AB-cities-roads.png|cities and highways </gallery> }} [[Category:Maps
of Alberta]] [[Category:Locator maps of cities in Alberta|*]] ==
{{int:license}} == {{PD-self}}
</rev>
</revisions>
</page>
</pages>
</query>
<limits categories="500"/>
<continue continue="||categories|info|revisions" iistart="
2006-10-05T10:33:30Z"/>
</api>
I found there was a continue token at the end of the response, Then I use:
http://commons.wikimedia.org/w/api.php?action=query&format=xml&revi…
to get the following response:
<api>
<limits categories="500"/>
<query>
<pages>
<page pageid="1246719" ns="6" title="File:AB
towns+names.png"
imagerepository="local">
<imageinfo>
<ii size="76966" width="524" height="700"url="
http://upload.wikimedia.org/wikipedia/commons/archive/1/1d/20061006020043%2…
"descriptionurl="
http://commons.wikimedia.org/wiki/File:AB_towns%2Bnames.png" sha1="
387284aaeea43dfae091e965e19cc47ce99dcf49"mime="image/png"
bitdepth="8"/>
</imageinfo>
</page>
</pages>
</query>
<continue continue="||categories|info|revisions" iistart="
2006-10-04T23:32:38Z"/>
</api>
I found in the response we didn't have the revisions information any more.
I think this may be a bug? Because I found if we set clcontinue to request
the following page, the response will not miss the revisions information.
P.S. Another question: Are the items in imageinfo list sorted by
timestamp? I mean from latest to oldest.
Thanks.
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api