diff options
Diffstat (limited to 'extensions/Gadgets/api')
-rw-r--r-- | extensions/Gadgets/api/ApiQueryGadgetCategories.php | 21 | ||||
-rw-r--r-- | extensions/Gadgets/api/ApiQueryGadgets.php | 29 |
2 files changed, 46 insertions, 4 deletions
diff --git a/extensions/Gadgets/api/ApiQueryGadgetCategories.php b/extensions/Gadgets/api/ApiQueryGadgetCategories.php index 73628085..23257f12 100644 --- a/extensions/Gadgets/api/ApiQueryGadgetCategories.php +++ b/extensions/Gadgets/api/ApiQueryGadgetCategories.php @@ -88,10 +88,16 @@ class ApiQueryGadgetCategories extends ApiQueryBase { ); } + /** + * @deprecated since MediaWiki core 1.25 + */ public function getDescription() { return 'Returns a list of gadget categories'; } + /** + * @deprecated since MediaWiki core 1.25 + */ public function getParamDescription() { return array( 'prop' => array( @@ -104,6 +110,9 @@ class ApiQueryGadgetCategories extends ApiQueryBase { ); } + /** + * @deprecated since MediaWiki core 1.25 + */ public function getExamples() { $params = $this->getAllowedParams(); $allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] ); @@ -116,7 +125,15 @@ class ApiQueryGadgetCategories extends ApiQueryBase { ); } - public function getVersion() { - return __CLASS__ . ': $Id$'; + /** + * @see ApiBase::getExamplesMessages() + */ + protected function getExamplesMessages() { + return array( + 'action=query&list=gadgetcategories' + => 'apihelp-query+gadgetcategories-example-1', + 'action=query&list=gadgetcategories&gcnames=foo|bar&gcprop=name|title|members' + => 'apihelp-query+gadgetcategories-example-2', + ); } } 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', + ); } } |