hm, I tried this:
http://ddig8109/wiki/api.php?action=query&titles=Don_Playground∝=revisi…
(for page name :'Don Playground')
but it returns all of the page, not just section 1.
oh and when I added call a url like:
http://ddig8109/wiki/api.php?version=
I get this version info:
Version:
MediaWiki 1.12.0rc1
ApiMain: $Id: ApiMain.php 31484 2008-03-03 05:46:20Z brion $
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiMain…
ApiBase: $Id: ApiBase.php 31259 2008-02-25 14:14:55Z catrope $
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiBase…
ApiFormatBase: $Id: ApiFormatBase.php 30222 2008-01-28 19:05:26Z catrope $
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiForm…
ApiQueryBase: $Id: ApiQueryBase.php 31484 2008-03-03 05:46:20Z brion $
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiQuer…
ApiFormatFeedWrapper: $Id: ApiFormatBase.php 30222 2008-01-28 19:05:26Z catrope $
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiForm…
and hm, in that page, which is the auto-generated API doc,
there's no mention of any "rvsection" parameter.
So maybe I'm just using a too-old version?
________________________________
From: Roan Kattouw <roan.kattouw(a)gmail.com>
To: MediaWiki API announcements & discussion
<mediawiki-api(a)lists.wikimedia.org>
Sent: Tue, May 11, 2010 3:05:19 PM
Subject: Re: [Mediawiki-api] API to get just a section of a page
2010/5/11 don undeen <donundeen(a)yahoo.com>om>:
ah, so it's implemented in the core code?
I'm doing this work on my own wikis, so I can update my own wikis codebase
to support this, perhaps.
what version of MW is this implemented on?
Only on the trunk SVN version so far.
barring that approach, I saw some references to
obtaining an xml rendering
of an entire page. Is that right?
If I could get an xml representation of a rendered page, where each section
is noted in the xml somehow, I could then extract the relevent section, with
just the additional overhead of pulling the whole page.
However, my efforts to specify the generatexml parameter failed.
You can work around this by grabbing the raw wikitext of the section
using action=query&prop=revisions&rvprop=content&rvsection=3 , then
passing the resulting wikitext to action=parse&text=WikitextHere . In
trunk, action=parse has a section parameter than can be used in
conjunction with the page parameter to cut out the middle man.
Roan Kattouw (Catrope)
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api