I don't think you can do this in a single query. You want to do one query to get the titles of all the images in the category, and then do a second query to get all the thumbnail data for those titles.

Ryan Kaldari

On 9/7/12 6:02 AM, vjkumar wrote:
Sorry, my question might not have been clear.
When the page

http://commons.wikimedia.org/wiki/Category:Coins_in_the_Walters_Art_Museum
is opened, You get a gallery of 13 thumbnails with titles and links. When I
looked at the source I see 13 list items. the first list item snippet is
given below. I am trying to get all 13 list items info with a single query.
My query

http://commons.wikimedia.org/w/api.php?format=xml&action=query&list=categorymembers&cmtitle=Category:Coins_in_the_Walters_Art_Museum

only gives me 13 file names. I would like to get the thumbnail url and title
names of all 13 coins as displayed in the gallery (and in the source li
item)  in 1 query.
Thanks.
The list item snippet for first picture in the gallery.

<li class="gallerybox" style="width: 155px"><div style="width: 155px">
                        <div class="thumb" style="width: 150px;"><div 
style="margin:15px auto;">
/wiki/File:Ethiopian_-_Coin_Depicting_an_Anonymous_King_-_Walters_59793_-_Obverse.jpg
//upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Ethiopian_-_Coin_Depicting_an_Anonymous_King_-_Walters_59793_-_Obverse.jpg/120px-Ethiopian_-_Coin_Depicting_an_Anonymous_King_-_Walters_59793_-_Obverse.jpg
</div></div>
                        <div class="gallerytext">
/wiki/File:Ethiopian_-_Coin_Depicting_an_Anonymous_King_-_Walters_59793_-_Obverse.jpg
Ethiopian - Coin Depic... <br />
289 KB<br />

                        </div>
                </div></li>






--
View this message in context: 
http://wikimedia.7.n6.nabble.com/Api-Query-for-thumbnail-images-title-etc-in-a-category-tp4984759p4984787.html
Sent from the WikiMedia Commons mailing list archive at Nabble.com.

_______________________________________________
Commons-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/commons-l


_______________________________________________
Commons-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/commons-l

Reply via email to