Last modified: 2008-04-26 15:35:02 UTC
I would like to ask for the feature to have the property to get pages count on the given category, with an option of not having category titles returned to save bandwidth when just wanting the count.
I noticed the latest MediaWiki is now able to provide the total pages count on each category now, so hopefully should not be a lot of work for the API.
You can do it with list=allcategories:
Thanks! I didn't realize that in the first place.
It turns out that I need this property in list=categorymembers. I am suggesting that it would be nice to have size property in cmprop. This is so that I can specify the categories I want to get the size on. list=allcategories do not allow me to do that. Thanks.
(In reply to comment #3)
> It turns out that I need this property in list=categorymembers. I am suggesting
> that it would be nice to have size property in cmprop. This is so that I can
> specify the categories I want to get the size on. list=allcategories do not
> allow me to do that. Thanks.
That doesn't make much sense. Using allcategories this way (with acfrom=Foo&aclimit=1) only allows fetching data for one category at a time, but the same is true for categorymembers, which only allows listing the members of one category at a time. If you want to get the size *and* members of a category, you can combine the requests:
Marking this as WORKSFORME, as there is a way to do it already.
OK. Basically, I have a scenario where I would like to be able to pass in multiple titles of categories and get the size and other info of those categories all in one query. I guess what I would like is to have something like cmtitles where I can pass the names of categories I would like to get info. on. categorymembers and allcategories doesn't let me do that.
One scenario I may use this for an example is to calculate of statistics such as
Category:A-class abc articles, Category:B-class abc articles, and so forth. This feature would allow me to pass in those titles I already know to get the info of them. Sorry for not being so clear earlier. If there is a way to do this already, please tell me. Thanks!
Added in r33914