aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiQueryAllUsers.php
diff options
context:
space:
mode:
authorPetr Onderka <gsvick@gmail.com>2012-05-02 17:00:30 +0200
committerPetr Onderka <gsvick@gmail.com>2012-06-06 19:24:59 +0200
commit80aa025528a152c67815a5a114f79418b63b99ff (patch)
tree693ce814754cdbf02f7abc12bfe38fa7843a3f6e /includes/api/ApiQueryAllUsers.php
parenta07531a628db58e4355c63725011af14cfb30dc7 (diff)
downloadmediawikicore-80aa025528a152c67815a5a114f79418b63b99ff.tar.gz
mediawikicore-80aa025528a152c67815a5a114f79418b63b99ff.zip
Added result properties to action=paraminfo
Added information about the properties of the results of API calls to action=paraminfo, including information about "property groups": what should the prop parameter be set to to get that property. Uses the same format for types as parameters already do. The output format of some modules doesn't fit this, so the result properties for them weren't added, or only partially. Partially implemented modules: * expandtemplates: parsetree is in its own tag * protect, allusers, backlinks, deletedrevs, info, imageinfo, logevents, querypage, recentchanges, revisions, searchinfo, usercontribs, userinfo, users, watchlist, upload: response with partially complex structure Not implemented modules: * feedcontributions, feedwatchlist, opensearch, rds: non-standard reponse * help: error is normal response; not very useful for automated tools anyway * paraminfo, parse, pageprops, siteinfo, userrights: response with complex structure Change-Id: Iff2a9bef79f994e73eef3062b4dd5461bff968ab
Diffstat (limited to 'includes/api/ApiQueryAllUsers.php')
-rw-r--r--includes/api/ApiQueryAllUsers.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php
index e110e6770b02..dda8c72950ec 100644
--- a/includes/api/ApiQueryAllUsers.php
+++ b/includes/api/ApiQueryAllUsers.php
@@ -377,6 +377,48 @@ class ApiQueryAllUsers extends ApiQueryBase {
);
}
+ public function getResultProperties() {
+ return array(
+ '' => array(
+ 'userid' => 'integer',
+ 'name' => 'string',
+ 'recenteditcount' => array(
+ ApiBase::PROP_TYPE => 'integer',
+ ApiBase::PROP_NULLABLE => true
+ )
+ ),
+ 'blockinfo' => array(
+ 'blockid' => array(
+ ApiBase::PROP_TYPE => 'integer',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'blockedby' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'blockedbyid' => array(
+ ApiBase::PROP_TYPE => 'integer',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'blockedreason' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'blockedexpiry' => array(
+ ApiBase::PROP_TYPE => 'string',
+ ApiBase::PROP_NULLABLE => true
+ ),
+ 'hidden' => 'boolean'
+ ),
+ 'editcount' => array(
+ 'editcount' => 'integer'
+ ),
+ 'registration' => array(
+ 'registration' => 'string'
+ )
+ );
+ }
+
public function getDescription() {
return 'Enumerate all registered users';
}