Hello list, I am trying to get all images in a page but I want absolute paths of those images not just image name (aka image titles). e.g. To get all images in article "Pakistan International Airlines", I call http://commons.wikimedia.org/w/api.php?action=query&prop=images&titl...
but then I am returned a image titles. I have to call this for each image to get obsoulte URL: http://commons.wikimedia.org/w/api.php?action=query&titles=File:Pakistan...
This means that I have to make many (order of 2) calls to get absolute paths of all images in an article. Is there any way this all can be squeezed into just one API call?
Regards
Hasanat Kazmi +923464362473
On Fri, May 6, 2011 at 9:22 PM, Hasanat Kazmi hasanatkazmi@gmail.com wrote:
but then I am returned a image titles. I have to call this for each image to get obsoulte URL: http://commons.wikimedia.org/w/api.php?action=query&titles=File:Pakistan...
This means that I have to make many (order of 2) calls to get absolute paths of all images in an article. Is there any way this all can be squeezed into just one API call?
Depending on what you want the actual URL for, you may find that linking to http://commons.wikimedia.org/wiki/Special:FilePath/Pakistan%20Int%20AL%20B77... is easier, and avoids the need for the second step.
Conrad
On Sat, May 7, 2011 at 6:22 AM, Hasanat Kazmi hasanatkazmi@gmail.com wrote:
Hello list, I am trying to get all images in a page but I want absolute paths of those images not just image name (aka image titles). e.g. To get all images in article "Pakistan International Airlines", I call http://commons.wikimedia.org/w/api.php?action=query&prop=images&titl...
Make it a generator:
http://commons.wikimedia.org/w/api.php?action=query&generator=images&...
Thanks, Thats precisely what I was looking.
Hasanat Kazmi +923464362473
On Sat, May 7, 2011 at 1:43 PM, Bryan Tong Minh bryan.tongminh@gmail.comwrote:
On Sat, May 7, 2011 at 6:22 AM, Hasanat Kazmi hasanatkazmi@gmail.com wrote:
Hello list, I am trying to get all images in a page but I want absolute paths of
those
images not just image name (aka image titles). e.g. To get all images in article "Pakistan International Airlines", I call
http://commons.wikimedia.org/w/api.php?action=query&prop=images&titl...
Make it a generator:
http://commons.wikimedia.org/w/api.php?action=query&generator=images&...
mediawiki-api@lists.wikimedia.org