I'm trying to list all the pages in the user namespace on a wiki, NOT the main namespace, but I can't figure this out. Here's what I'm using to query a generator for "allpages":
{ 'action':'query', 'generator':'allpages', 'gaplimit':'5', 'gapfrom':'Foo, 'prop':'links|categories', 'plnamespaces':'2' }
but this doesn't include pages in the user namespace? How do I query pages, using a generator, in a specific namespace?
Thank you!
On Fri, Jul 23, 2010 at 02:03:03PM -0500, Python Script wrote:
I'm trying to list all the pages in the user namespace on a wiki, NOT the main namespace, but I can't figure this out. Here's what I'm using to query a generator for "allpages":
{ 'action':'query', 'generator':'allpages', 'gaplimit':'5', 'gapfrom':'Foo, 'prop':'links|categories', 'plnamespaces':'2' }
This query looks at the first 5 pages in the main namespace starting from Foo, and returns the categories and links to the User namespace for each of those page. plnamespace applies to the prop=links; allpages uses apnamespace, and since allpages is being used as a generator it needs to be gapnamespace:
{ 'action':'query', 'generator':'allpages', 'gapnamespaces':'2' 'gaplimit':'5', 'gapfrom':'Foo, 'prop':'links|categories', }
2010/7/24 Brad Jorsch b-jorsch@northwestern.edu:
'plnamespaces':'2'
[snip]
'gapnamespaces':'2'
Also note that plnamespace and gapnamespace are spelled without a final 's'.
Roan Kattouw (Catrope)
mediawiki-api@lists.wikimedia.org