1 Jun 2010 05:26
Redirect does not provide any actual image info for "action=query&prop=imageinfo"
Pierre-Olivier Latour <pol <at> cooliris.com>
2010-06-01 03:26:16 GMT
2010-06-01 03:26:16 GMT
Hi,
I just noticed that if you use the "redirect" option with the "action=query&prop=imageinfo" API, it does provide a <redirects> element as expected, but there's no image info? You need to do a new query with the redirected image name to retrieve it.
I think this is different behavior from "redirect" in the other APIs, where it provides the info with the redirect at the same time.
Is this a bug or expected?
<?xml version="1.0"?>
<api>
<query>
<redirects>
<r from="File:Liberia court of arms.png" to="File:Coat of arms of Liberia.png" />
</redirects>
<pages>
<page pageid="23044582" ns="6" title="File:Coat of arms of Liberia.png" imagerepository="" />
</pages>
</query>
</api>
-Pierre
<?xml version="1.0"?>
<api>
<query>
<pages>
<page pageid="23044582" ns="6" title="File:Coat of arms of Liberia.png" imagerepository="local">
<imageinfo>
<ii timestamp="2009-06-01T14:04:00Z" size="14121" width="200" height="211" thumburl="http://upload.wikimedia.org/wikipedia/en/thumb/1/12/Coat_of_arms_of_Liberia.png/121px-Coat_of_arms_of_Liberia.png" thumbwidth="121" thumbheight="128" url="http://upload.wikimedia.org/wikipedia/en/1/12/Coat_of_arms_of_Liberia.png" descriptionurl="http://en.wikipedia.org/wiki/File:Coat_of_arms_of_Liberia.png" metadata="" mime="image/png" />
</imageinfo>
</page>
</pages>
</query>
</api>
-Pierre
________________________________
Pierre-Olivier Latour
_______________________________________________ Mediawiki-api mailing list Mediawiki-api <at> lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
best,
Robert
RSS Feed