svick / LINQ-to-Wiki

.Net library to access MediaWiki API
MIT License
99 stars 25 forks source link

Filter page namespace #9

Open lianzhao opened 9 years ago

lianzhao commented 9 years ago

I'd like to get all category pages against my wiki http://zh.asoiaf.wikia.com/ Here's my code:

var categoryPages = wiki.Query.allpages().Where(p => p.ns == Namespace.Category).ToList();

Which translate to http request http://zh.asoiaf.wikia.com/api.php?action=query&list=allpages&apns=14&approp=&aplimit=max The parameter "apns" should be "apnamesapce" This issue can be reproduced on both wikipedia and mediawiki

lianzhao commented 9 years ago

Failed to build codegen application... I tried to introduce latest Roslyn package to the codegen project. But failed to build it since Roslyn API has changed a lot, e.g. Syntax was renamed to SyntaxFactory