X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryStashImageInfo.php;h=1debb2e14cb01d6482970346424b492c82b846dc;hb=87070fc6743bfe5da7b49f07561fc1e0b03897c4;hp=db9285602aa38837c7da7e292c9b7dc0ce175c42;hpb=04d7d46b1d39340121698ba76fd8e433f60929c9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryStashImageInfo.php b/includes/api/ApiQueryStashImageInfo.php index db9285602a..1debb2e14c 100644 --- a/includes/api/ApiQueryStashImageInfo.php +++ b/includes/api/ApiQueryStashImageInfo.php @@ -90,50 +90,38 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo { 'prop' => array( ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_DFLT => 'timestamp|url', - ApiBase::PARAM_TYPE => self::getPropertyNames( $this->propertyFilter ) + ApiBase::PARAM_TYPE => self::getPropertyNames( $this->propertyFilter ), + ApiBase::PARAM_HELP_MSG => 'apihelp-query+imageinfo-param-prop', + ApiBase::PARAM_HELP_MSG_PER_VALUE => self::getPropertyMessages( $this->propertyFilter ) ), 'urlwidth' => array( ApiBase::PARAM_TYPE => 'integer', - ApiBase::PARAM_DFLT => -1 + ApiBase::PARAM_DFLT => -1, + ApiBase::PARAM_HELP_MSG => array( + 'apihelp-query+imageinfo-param-urlwidth', + ApiQueryImageInfo::TRANSFORM_LIMIT, + ), ), 'urlheight' => array( ApiBase::PARAM_TYPE => 'integer', - ApiBase::PARAM_DFLT => -1 + ApiBase::PARAM_DFLT => -1, + ApiBase::PARAM_HELP_MSG => 'apihelp-query+imageinfo-param-urlheight', ), 'urlparam' => array( ApiBase::PARAM_TYPE => 'string', ApiBase::PARAM_DFLT => '', + ApiBase::PARAM_HELP_MSG => 'apihelp-query+imageinfo-param-urlparam', ), ); } - /** - * Return the API documentation for the parameters. - * @return array Parameter documentation. - */ - public function getParamDescription() { - $p = $this->getModulePrefix(); - - return array( - 'prop' => self::getPropertyDescriptions( $this->propertyFilter, $p ), - 'filekey' => 'Key that identifies a previous upload that was stashed temporarily.', - 'sessionkey' => 'Alias for filekey, for backward compatibility.', - 'urlwidth' => "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.", - 'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth", - 'urlparam' => array( "A handler specific parameter string. For example, pdf's ", - "might use 'page15-100px'. {$p}urlwidth must be used and be consistent with {$p}urlparam" ), - ); - } - - public function getDescription() { - return 'Returns image information for stashed images.'; - } - - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567', - 'api.php?action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&' . - 'siiurlwidth=120&siiprop=url', + 'action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567' + => 'apihelp-query+stashimageinfo-example-simple', + 'action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&' . + 'siiurlwidth=120&siiprop=url' + => 'apihelp-query+stashimageinfo-example-params', ); } }