Thank you and that makes sense. I'm trying to change the code now to support redirects since it gets a different JSONObject (key is not categories for redirects) for redirects.
***one other question, for the title "Nervous system", I need to query into 3 layers. for the firs time it gives me 3 categories,
1. Nervous system
Then I need to query each of these 3 categories to get their sub categories. but in a loop when I parse again Nervous system, it gives me the same three results but I want to get the results as I traverse in Wikipedia manually. In Wikipedia, when I search "Nervous system", it gives me these three results first and then when I click on the category Nervous system (in the initial result of categories), it gives me "Organ systems" and "Mind". How can I do this in the code with MediaWiki API?
----- Original Message -----
From: Brad Jorsch <email@example.com>
Date: Wednesday, August 3, 2011 3:28 pm
Subject: Re: [Mediawiki-api] categories query does not return any results.
To: MediaWiki API announcements & discussion <firstname.lastname@example.org>
> On Wed, Aug 03, 2011 at 02:40:52PM -0400, Dalkandura Arachchige
> Gunaratna wrote:
> > For example, "Populated places" does not return any category listing
> > for the query but if you search Wikipedia, it gives categories.
> No it doesn't.
> Perhaps you did not notice you followed a redirect to [[Populated
> place]], no 's'?
> If you want the API to follow redirects, add '&redirects' to
> your query:
> Mediawiki-api mailing list