summaryrefslogtreecommitdiff
path: root/extensions/Gadgets/api/ApiQueryGadgets.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /extensions/Gadgets/api/ApiQueryGadgets.php
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'extensions/Gadgets/api/ApiQueryGadgets.php')
-rw-r--r--extensions/Gadgets/api/ApiQueryGadgets.php29
1 files changed, 27 insertions, 2 deletions
diff --git a/extensions/Gadgets/api/ApiQueryGadgets.php b/extensions/Gadgets/api/ApiQueryGadgets.php
index b6b00515..46535964 100644
--- a/extensions/Gadgets/api/ApiQueryGadgets.php
+++ b/extensions/Gadgets/api/ApiQueryGadgets.php
@@ -186,10 +186,16 @@ class ApiQueryGadgets extends ApiQueryBase {
);
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getDescription() {
return 'Returns a list of gadgets used on this wiki';
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getParamDescription() {
return array(
'prop' => array(
@@ -205,6 +211,9 @@ class ApiQueryGadgets extends ApiQueryBase {
);
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getExamples() {
$params = $this->getAllowedParams();
$allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] );
@@ -222,7 +231,23 @@ class ApiQueryGadgets extends ApiQueryBase {
);
}
- public function getVersion() {
- return __CLASS__ . ': $Id$';
+ /**
+ * @see ApiBase::getExamplesMessages()
+ */
+ protected function getExamplesMessages() {
+ $params = $this->getAllowedParams();
+ $allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] );
+ return array(
+ 'action=query&list=gadgets&gaprop=id|desc'
+ => 'apihelp-query+gadgets-example-1',
+ "action=query&list=gadgets&gaprop=$allProps"
+ => 'apihelp-query+gadgets-example-2',
+ 'action=query&list=gadgets&gacategories=foo'
+ => 'apihelp-query+gadgets-example-3',
+ 'action=query&list=gadgets&gaids=foo|bar&gaprop=id|desc|metadata'
+ => 'apihelp-query+gadgets-example-4',
+ 'action=query&list=gadgets&gaenabledonly'
+ => 'apihelp-query+gadgets-example-5',
+ );
}
}