Topic on Project:Support desk

Query on categories and user

6
Unuaiga (talkcontribs)

Hi,

I'm new on mediawiki and I have a question. I would like to do a query on wikimedia commons to list all images from a definite category and a definite user via an URL. I can request each one separately (query=categorymembers and query=allimages) but I did'nt find how to do both at the same time. I've been spending hours on the manual and I can't see anywhere if it's possible or not.

Someone know how I could do it ?

Thanks

137.147.55.98 (talkcontribs)

Use query=allimages to get the list of titles, then send those titles to prop=categories to get the categories the titles belong to, and use that to filter out any titles that aren't in the category you want.

Unuaiga (talkcontribs)

Thanks for your answer, but as I have a limit=30 and I use then a "continue", if I filter after the result of the query, the number of pictures won't be the same on each page. I could even have pages with no pictures.

Isn't it possible to filter in the url both category and user ?

137.147.55.98 (talkcontribs)

Then user a higher limit, or keep making requests until you have 30 valid results.

Unuaiga (talkcontribs)

I would like to have, on each page, 30 photographies I took (with my user name) from a definite category. Is that possible to obtain this result in doing only one request ?

If it's not, I will follow your advice and request more photos than I want to display, thanks.

Ciencia Al Poder (talkcontribs)

it's not possible

Reply to "Query on categories and user"