So recently I have been pretty active on Fandom, a wiki community site powered by MediaWiki. Plain MediaWiki runs on PHP and has a built in web API where almost all actions can be done through it. Fandom adds many, many social features like their discussions and message walls. These all have a separate API, codenamed Nirvana.
What is Nirvana?
Nirvana is an application framework which consists of controllers and methods (also known as templates). It can be accessed via the /wikia.php or /api/v1 endpoint on every wiki for on-wiki things. There is also a central Fandom API which takes care of more global things like notifications which can be accessed at services.fandom.com.
Most of the Fandom API is currently not documentated, which is very unfortunate. It's like a game of guess the controller and see what methods it has, and then guess what parameters it takes and what it does.
Controllers
Here is a list of controllers and templates I have been able to find. Most controllers do not have a HTML format, so they will need to have format=json in the request parameters. The general layout for wikia.php URLs is https://WIKI.fandom.com/wikia/php?controller=CONTROLLER&method=METHOD&format=FORMAT&PARAMETERS and any additional parameters can be added on the end. For api/v1 URLs, https://WIKI.fandom.com/api/v1/CONTROLLER/METHOD/?PARAMETERS and additional parameters are added on the end. Finally, for Fandom services, https://services.fandom.com/CONTROLLER/METHOD/ but there are two different ways paramters are inputted, and some methods have sub-methods.
You can see the list of controllers I have found on my wiki.
Comments
Post a Comment