Merge "Followup I888c616e: one more string to localize."
[lhc/web/wiklou.git] / includes / api / ApiTokens.php
index c56d646..518bfce 100644 (file)
  */
 class ApiTokens extends ApiBase {
 
-       public function __construct( $main, $action ) {
-               parent::__construct( $main, $action );
-       }
-
        public function execute() {
                wfProfileIn( __METHOD__ );
                $params = $this->extractRequestParams();
@@ -84,6 +80,57 @@ class ApiTokens extends ApiBase {
                );
        }
 
+       public function getResultProperties() {
+               return array(
+                       '' => array(
+                               'patroltoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'edittoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'deletetoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'protecttoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'movetoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'blocktoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'unblocktoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'emailtoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'importtoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'watchtoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'optionstoken' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       )
+               );
+       }
+
        public function getParamDescription() {
                return array(
                        'type' => 'Type of token(s) to request'
@@ -100,8 +147,4 @@ class ApiTokens extends ApiBase {
                        'api.php?action=tokens&type=email|move' => 'Retrieve an email token and a move token'
                );
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }