Roan Kattouw wrote: > 2010/4/11 Roan Kattouw <[email protected]>: > >> 2010/4/11 Claes Lindvall <[email protected]>: >> >>> 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) > > _______________________________________________ > Mediawiki-api mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api > Thank you so much. It helped.
Regards Claes Lindvall _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
