MediaWiki action api - query categories property of allimages list?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MediaWiki action api - query categories property of allimages list?

Hogan (US), Michael C
Is there a way to use the allimages API to get categories applied to each File: page? If not, would it make sense to suggest adding a categories property using Phabricator or by some other communication channel?
https://www.mediawiki.org/wiki/API:Allimages

Thank you,
Michael

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki action api - query categories property of allimages list?

Bartosz Dziewoński
Yes, you have to use 'allimages' as a "generator" for a
'prop=categories' query.

Example:
https://en.wikipedia.org/w/api.php?action=query&prop=categories&generator=allimages&gaifrom=E

More about generators: https://www.mediawiki.org/wiki/API:Query#Generators

--
Bartosz Dziewoński

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l