Subject: | enabling GET for non-standard actions |
http://semantic-mediawiki.org/ enables 'ask' and 'askargs' via the api.
But MediaWiki::Bot clients are forced to always POST instead of GET,
because MediaWiki::API uses a hardcoded whitelist of GETable methods.
The simplest fix is to add 2 more lines to the 'api' subroutine's
whitelisting variable.
my $get_actions = {
'ask' => 1, # new for Semantic-Mediawiki
'askargs' => 1, # new for Semantic-Mediawiki
'query' => 1,
'logout' => 1,
'purge' => 1,
'paraminfo' => 1
};
http://www.snpedia.com/api.php is a working reference system. It shows
that I have at least these extra actions due to various extensions.
smwinfo, ask, askargs, sfautocomplete, sfautoedit, titleblacklist,
addsurvey, deletesurvey, editsurvey, submitsurvey
but its make this data structure modifyable at runtime, so other actions
can be specified.