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!