Manual:Hooks/ApiRsdServiceApis

From MediaWiki.org
Jump to navigation Jump to search
ApiRsdServiceApis
Available from version 1.17.0
Add or remove APIs from the RSD services list.
Define function:
public static function onApiRsdServiceApis( $apis ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ApiRsdServiceApis": "MyExtensionHooks::onApiRsdServiceApis"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ApiRsdServiceApis'][] = 'MyExtensionHooks::onApiRsdServiceApis';
Called from:File(s): api/ApiRsd.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiRsdServiceApis extensions.

Details[edit]

  • &$apis: array of services

Each service should have its own entry in the $apis array and have a unique name, passed as key for the array that represents the service data. In this data array, the key-value-pair identified by the apiLink key is required.

See also[edit]