You can use 'categorymembers' as a generator, and use 'prop=categoryinfo'
to display information about whether each category is hidden. You can't use
this to filter the results, but you can do that in your application code
and it still saves a lot of extra queries.
Example:
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=quer
y&format=json&prop=categoryinfo&generator=categorymembers&
formatversion=2&gcmtitle=Category%3AWikipedia_article_
cleanup&gcmtype=subcat&gcmlimit=max
On Tue, Jun 27, 2017 at 4:26 PM, Max Vlasov <max.vlasov(a)gmail.com> wrote:
Hi,
my software uses sub- and super- category enumeration while trying to
avoid hidden categories. There's no problem with sub- (?action=query&prop=
categories&titles=....&clshow=!hidden), but there's no corresponding
parameter for super-categories ( ?action=query&list=categorymembers&cmtitle=
... ). Is there a way to avoid contradictory states when both are used? Or
maybe to achieve hidden avoiding for super-categories some other way?
I asked about this four years ago, but not at the list (
https://www.mediawiki.org/wiki/Topic:Ra34est5vsl7fxdc), no answers at the
time, probably something changed since then or someone would give me some
workaround
Thanks in advance,
Max
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
--
Matma Rex