On Sun, Mar 20, 2011 at 2:58 AM, Robert Crowe <robert(a)ourwebhome.com> wrote:
I think of this as a tree, even though I know it's
a graph. If I send a query like this:
http://en.wikipedia.org/w/api.php?action=parse&page=Portal:Novels
The <links> element contains <pl> items in namespaces 0 (articles), 14
(categories), and 100 (portals). I interpret that as "Portal:Novels contains these
items", meaning that in tree terms it is the parent of those items, or that those
items "belong to Portal:Novels".
If I send a query like this:
http://en.wikipedia.org/w/api.php?cmtitle=Category:Literature&action=qu…
The <categories> element contains <cl> items that are the categories that
contain Category:Literature, the parent categories. Similarly for pages.
So I'm able to list the categories that are the parents of a given category or page,
but I can't seem to find a way to list the portals that are the parents of a given
category or page. Is there a way to do that? Basically I'm just trying to navigate
the tree.
(replace Voltaire by whichever page you're interested in)
--
André Engels, andreengels(a)gmail.com