39 $result->addValue(
null,
'version',
'1.0' );
40 $result->addValue(
null,
'xmlns',
'http://archipelago.phrasewise.com/rsd' );
44 'engineName' =>
'MediaWiki',
45 'engineLink' =>
'https://www.mediawiki.org/',
46 'homePageLink' => Title::newMainPage()->getCanonicalURL(),
52 $result->addValue(
null,
'service', $service );
62 =>
'apihelp-rsd-example-simple',
96 'docs' =>
'https://www.mediawiki.org/wiki/Special:MyLanguage/API',
124 foreach ( $apis as $name => $info ) {
127 'preferred' =>
wfBoolToStr( $name ==
'MediaWiki' ),
128 'apiLink' => $info[
'apiLink'],
129 'blogID' => $info[
'blogID'] ??
'',
132 if ( isset( $info[
'docs'] ) ) {
133 $settings[
'docs'] = $info[
'docs'];
136 if ( isset( $info[
'settings'] ) ) {
137 foreach ( $info[
'settings'] as $setting => $val ) {
138 if ( is_bool( $val ) ) {
143 $setting = [
'name' => $setting ];
145 $settings[] = $setting;
148 if ( count( $settings ) ) {
150 $data[
'settings'] = $settings;
152 $outputData[] = $data;
159 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Rsd';
164class_alias( ApiRsd::class,
'ApiRsd' );
wfScript( $script='index')
Get the URL path to a MediaWiki entry point.
wfBoolToStr( $value)
Convenience function converts boolean values into "true" or "false" (string) values.