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=que...
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.
Thanks in advance,
Robert
-----Original Message----- From: Andre Engels [mailto:andreengels@gmail.com] Sent: Saturday, March 19, 2011 12:44 PM To: MediaWiki API announcements & discussion Cc: Robert Crowe Subject: Re: [Mediawiki-api] Portals vs categories
On Sat, Mar 19, 2011 at 7:49 PM, Robert Crowe robert@ourwebhome.com wrote:
I'm able to list the categories that a page belongs to, and the categories that a category contains. I'm also able to list the portals that a category contains, but I can't seem to find a way to list the portals that a page or category belongs to. Is there a way to do that?
What does it mean for a page or category to "belong to a portal"?