Manual:ApiBase.php

The  class implements many basic API functions, and is the base of all API classes. The class functions are divided into several areas of functionality:
 * Module parameters: Derived classes can define  to specify which parameters to expect, how to parse and validate them.
 * Profiling: various methods to allow keeping tabs on various tasks and their time costs
 * Self-documentation: code to allow the API to document its own state

Hooks

 * Manual:Hooks/APIGetAllowedParams
 * Manual:Hooks/APIGetParamDescription
 * Manual:Hooks/APIGetDescription
 * Manual:Hooks/APIGetResultProperties

getAllowedParams
Specify which parameters are allowed and what requirements are to be imposed on them. See the documentation beginning at line 46 for the constants PARAM_DFLT, PARAM_ISMULTI, PARAM_TYPE, PARAM_MAX, PARAM_MAX2, PARAM_MIN, PARAM_ALLOW_DUPLICATES, PARAM_DEPRECATED, PARAM_REQUIRED, and PARAM_RANGE_ENFORCE. The possible types of parameters are NULL, boolean, string, integer, limit, timestamp, or user. A "user" parameter is a username that is validated using Title::makeTitleSafe. For boolean parameters, a default value of anything other than 'false' is not allowed.

Example:

getResultProperties and getFinalResultProperties
TODO: Describe what these do

Hooks
Hooks called from this file are listed in the Category:MediaWiki hooks included in ApiBase.php category.