Hi all,
How can I use the wikipedia "query" API to retrieve the display title of a page with the proper lowercase / uppercase? For instance, if I call:
http://en.wikipedia.org/w/api.php?action=query&prop=info&titles=IPad...
I get back:
<?xml version="1.0"?> <api> <query> <pages> <page pageid="25970423" ns="0" title="IPad" touched="2010-05-26T13:22:43Z" lastrevid="364291567" counter="0" length="56739" /> </pages> </query> </api>
The raw page title is indeed "IPad" but the display one should be "iPad"? Is there any way I can get the display title?
I don't want to use the "parse" API (which has a nice "displaytitle" property) as it returns way too much data.
In any case, it seems a "prop" option for "displaytitle" in the "query" API would be a nice addition and it would be consistent with the properties you can retrieve with the "parse" API.
-Pol
________________________________ Pierre-Olivier Latour pol@cooliris.com
2010/5/26 Pierre-Olivier Latour pol@cooliris.com:
I don't want to use the "parse" API (which has a nice "displaytitle" property) as it returns way too much data.
You can use the &prop= parameter so action=parse doesn't return that much data.
Roan Kattouw (Catrope)
I can certainly do that, but I forgot to explain that I need the "query" API to retrieve the first section of the article, so this would mean 2 API calls, which is a little annoying just to retrieve the proper display title.
On May 26, 2010, at 10:38 PM, Roan Kattouw wrote:
2010/5/26 Pierre-Olivier Latour pol@cooliris.com:
I don't want to use the "parse" API (which has a nice "displaytitle" property) as it returns way too much data.
You can use the &prop= parameter so action=parse doesn't return that much data.
Roan Kattouw (Catrope)
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
-Pierre
________________________________ Pierre-Olivier Latour pol@cooliris.com
mediawiki-api@lists.wikimedia.org