Closed PeterBowman closed 6 years ago
Does #163 fix this? The behavior I want is equivalent to: https://en.wikipedia.org/wiki/Special:PrefixIndex/Wikipedia:Featured_pictures/
That'll do, thanks! You might want to update docs for the overload of listPages()
, too.
The namespace parameter is meaningless when a title prefix is provided, see:
https://github.com/MER-C/wiki-java/blob/4026210d8202203e3b1537fcb2b4753b0037cd5d/src/org/wikipedia/Wiki.java#L6179-L6185
This behavior might create confusion. I'm used to omitting the
Category:
namespace in page titles when usingWiki.categoryMembers
. For the sake of clarity, these are the function's internals:https://github.com/MER-C/wiki-java/blob/4026210d8202203e3b1537fcb2b4753b0037cd5d/src/org/wikipedia/Wiki.java#L5664-L5668
That is, I can invoke
wiki.categoryMembers("Foo")
and get all members ofCategory:Foo
. In that vein, I expected thatwiki.listPages("Foo", null, Wiki.CATEGORY_NAMESPACE)
would list all categories starting withFoo
, but it shows results from the main namespace only. The behavior I propose here is also consistent with the Special:ApiSandbox interface, which also expects a namespace-less title prefix along with the actual namespace passed on as another query parameter.Moreover, namespaces could get "stacked" together, see
wikt:es:Categoría:Wikcionario:Esbozo
. Here, the localizedCategoría
refers to the category namespace, andWikcionario
to the project namespace.