Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -39,7 +39,10 @@ |
40 | 40 | |
41 | 41 | public function getAllowedParams() { |
42 | 42 | $params = array( |
43 | | - 'months' => 'string', |
| 43 | + 'months' => array( |
| 44 | + ApiBase::PARAM_TYPE => 'string', |
| 45 | + ApiBase::PARAM_REQUIRED => true, |
| 46 | + ), |
44 | 47 | 'normalized' => 'bool', |
45 | 48 | 'data' => array( |
46 | 49 | ApiBase::PARAM_DFLT => 'timeseries', |
— | — | @@ -397,9 +400,9 @@ |
398 | 401 | 'selectwebproperties' => '', |
399 | 402 | 'selectprojects' => '', |
400 | 403 | 'selectwikis' => '', |
401 | | - 'selecteditors' => '', |
402 | | - 'selectedits' => '', |
403 | | - 'selectplatform' => '', |
| 404 | + 'selecteditors' => 'a for anonymous, r for registered, b for bot', |
| 405 | + 'selectedits' => 'm for manual, b for bot-induced', |
| 406 | + 'selectplatform' => 'm for mobile, n for non-mobile', |
404 | 407 | ); |
405 | 408 | } |
406 | 409 | |
Index: trunk/extensions/MetricsReporting/metrics/DumpNewRegisteredEditorsMetric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'All registered editors that in a certain month for the first time crossed the threshold of 10 edits since signing up'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/ComScoreReachPercentageMetric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'Percentage of total unique visitors to any web property which also visited a Wikimedia wiki'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/DumpActiveEditors100Metric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'All registered editors that made 100 or more edits in a certain month'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/DumpEditsMetric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'All edits on articles (as defined by dumparticlecount)'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/DumpActiveEditors5Metric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'All registered editors that made 5 or more edits in a certain month'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/SquidPageViewsMetric.php |
— | — | @@ -14,6 +14,12 @@ |
15 | 15 | ); |
16 | 16 | } |
17 | 17 | |
| 18 | + protected function getExamples() { |
| 19 | + return array( |
| 20 | + 'api.php?action=analytics&metric=', |
| 21 | + ); |
| 22 | + } |
| 23 | + |
18 | 24 | public function getVersion() { |
19 | 25 | return __CLASS__ . ': $Id$'; |
20 | 26 | } |
Index: trunk/extensions/MetricsReporting/metrics/ComScoreUniqueVisitorMetric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'Unique persons that visited one of the Wikimedia wikis at least once in a certain month'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/DumpArticleCountMetric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'All namespace 0 pages which contain an internal link minus redirect pages (for some projects extra namespaces qualify)'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |
Index: trunk/extensions/MetricsReporting/metrics/DumpBinaryCountMetric.php |
— | — | @@ -13,6 +13,12 @@ |
14 | 14 | return 'All binary files (nearly all of which are multimedia files) available for download/article inclusion on a wiki'; |
15 | 15 | } |
16 | 16 | |
| 17 | + protected function getExamples() { |
| 18 | + return array( |
| 19 | + 'api.php?action=analytics&metric=', |
| 20 | + ); |
| 21 | + } |
| 22 | + |
17 | 23 | public function getVersion() { |
18 | 24 | return __CLASS__ . ': $Id$'; |
19 | 25 | } |