DevMS : querying wikibooks API
Using the gui to the wikibooks API at http://en.wikibooks.org/wiki/Special:ApiSandbox, I ultimately want to get data for each page on each user and what modifications they've made to that page.
Because anybody can add a page to the DevMS, and the naming convention requires that all page titles begin with "The Devonshire Manuscript/", I did this query to get a list (max of 500 pages) of the pages in the collection:
which returns results like this:
<api>
<query>
<allpages>
<p pageid="259759" ns="0" title="The Devonshire Manuscript" />
<p pageid="264110" ns="0" title="The Devonshire Manuscript/94r-96r" />
<p pageid="264051" ns="0" title="The Devonshire Manuscript/A my herte a what eilith the" />
...
<p pageid="262594" ns="0" title="The Devonshire Manuscript/ys yt possyble" />
<p pageid="262460" ns="0" title="The Devonshire Manuscript /Take hede be tyme leste ye be spyede" />
</allpages>
</query>
</api>
then for each page id, I could run a query like this:
http://en.wikibooks.org/w/api.php?action=query&prop=revisions&format=xml&rvlimit=max&pageids=259759
(the 'rvlimit=max' bit is crucial, or you get only the most recent revision)
which returns results like this:
<api>
<query>
<pages>
<page pageid="259759" ns="0" title="The Devonshire Manuscript">
<revisions>
<rev revid="2249136" parentid="2249131" user="Cultures4" timestamp="2012-01-12T00:38:18Z" size="21716" comment="Edited TOC, added link." />
<rev revid="2249131" parentid="2249119" user="Cultures4" timestamp="2012-01-12T00:21:45Z" size="21711" comment="Added link to TOC." />
...
<rev revid="2208491" parentid="2208489" minor="" user="Cultures92" timestamp="2011-11-09T19:45:55Z" size="393" comment="" />
<rev revid="2208489" parentid="0" user="Cultures92" timestamp="2011-11-09T19:43:18Z" size="403" comment="inserted the TOC and status (0%)" />
</revisions>
</page>
</pages>
</query>
</api>
So, from that I can derive for each page which users made changes, but nothing about the kind of changes (other than whether the net effect was to increase or decrease the size of the page).