2010/4/11 Roan Kattouw <roan.kattouw(a)gmail.com>om>:
2010/4/11 Claes Lindvall <classe(a)ekvagen.com>om>:
Hi
Im having trouble to get MediaWiki::API ver. 0.30 to work properly.
Im running MediaWiki 1.13 and my simple query is:
use MediaWiki::API;
my $mw = MediaWiki::API->new();
$mw->{config}->{api_url} = 'http://192.168.10.1/wiki15/api.php';
$mw->list ( {
action => 'query',
list => 'Page1',
export => '1',
exportnowrap => '1' })
You need to pass format =>
'json'
Or wait, MediaWiki::API takes care of that. Rather, the problem is
with exportnowrap => 1. By passing that parameter you're explicitly
asking for the XML not to be wrapped in JSON, on which the JSON parser
chokes. Omit this parameter and you should be fine.
Roan Kattouw (Catrope)