This change only affects clients using the JSON, PHP, WDDX, PHP, TXT and DBG formats. If you're using the XML or YAML formats, nothing will change for you.
The list=backlinks, list=embeddedin and list=imageusage used to return arrays with pageIDs as keys, duplicating information (those arrays also contain the pageID). An example (in JSON):
{ "query": { "backlinks": { "1024": { "pageid": "1024", "ns": 1, "title": "Talk:Anarcho-capitalism" }, "1236": { "pageid": "1236", "ns": 1, "title": "Talk:Algorithm" } } } }
After a complaint [1] about this behavior, it was changed in r39645 [2]. Like all other list= modules, backlinks and friends now return arrays with 0, 1, 2, etc. as keys. In JSON this looks like:
{ "query": { "backlinks": [ { "pageid": "1024", "ns": 1, "title": "Talk:Anarcho-capitalism" }, { "pageid": "1236", "ns": 1, "title": "Talk:Algorithm" } ] } }
Roan Kattouw (Catrope)
[1] http://lists.wikimedia.org/pipermail/mediawiki-api/2008-August/000657.html [2] http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=39645
_______________________________________________ Mediawiki-api-announce mailing list Mediawiki-api-announce@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Thanks for making these changes and your continued work on the API (Which has put an end to huge amounts of screenscraping horribleness which I previously had to endure!)
<3 $wgEnableWriteAPI = true;
Best Regards
Jools
Jools Smyth schreef:
Thanks for making these changes and your continued work on the API (Which has put an end to huge amounts of screenscraping horribleness which I previously had to endure!)
Let's not forget Yuri Astrakhan here: the API and query.php (its predecessor) were his brainchildren. There's still a lot of Yuri's code in the API, despite the fact he's not touched the code for over a year now.
<3 $wgEnableWriteAPI = true;
Well yes, that *was* my project from the start.
Roan Kattouw (Catrope)
mediawiki-api@lists.wikimedia.org