doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class