Last modified: 2013-03-22 14:26:07 UTC
At the moment it is not possible to create easily migratable parser functions, they all need a copy and paste, and an amendment for the local server. It would be great if there was able to be added to the magic words and parser functions that can used and applied to the api. For example * {{localurl:page name|query_string}} -> {{localurl:MediaWiki|printable=yes}} → /w/index.php?title=MediaWiki&printable=yes Here I am thinking {{localapi}} -> /w/api.php?... * {{fullurl:interwiki:remote page name|query_string}} Here I am thinking {{fullapi:+++}} so we can more easily build lists of xwiki api calls. My reason is that sometimes there are queries that I want to share to others, and and having it being local to the server running it without changing components would be useful. Plus to build a page to run a query on a series of wikis (eg. show me the count of admins and bureaucrats) and building those with shortcuts and without parser functionality is a nightmare.
This isn't really "API", it's asking for magic words to get API paths. To get your "localapi", you should be able to use something like {{SERVER}}{{SCRIPTPATH}}/api.php. You could wrap that in a template if you'd like. For interwiki linking, you'd have to get the API paths for every interwiki link stored somewhere first. Right now it just blindly translates something like de:$1 to //de.wikipedia.org/wiki/$1, based on the patterns into the interwiki map.