Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -39,6 +39,7 @@ |
40 | 40 | 'months' => 'string', |
41 | 41 | 'normalized' => 'bool', |
42 | 42 | 'data' => array( |
| 43 | + ApiBase::PARAM_DFLT => 'timeseries', |
43 | 44 | ApiBase::PARAM_ISMULTI => true, |
44 | 45 | ApiBase::PARAM_TYPE => array( |
45 | 46 | 'timeseries', |
— | — | @@ -73,7 +74,257 @@ |
74 | 75 | ), |
75 | 76 | 'selectcountries' => array( |
76 | 77 | ApiBase::PARAM_ISMULTI => false, |
77 | | - ApiBase::PARAM_TYPE => 'string', |
| 78 | + ApiBase::PARAM_TYPE => array( |
| 79 | + 'AF', |
| 80 | + 'AX', |
| 81 | + 'AL', |
| 82 | + 'DZ', |
| 83 | + 'AS', |
| 84 | + 'AD', |
| 85 | + 'AO', |
| 86 | + 'AI', |
| 87 | + 'AQ', |
| 88 | + 'AG', |
| 89 | + 'AR', |
| 90 | + 'AM', |
| 91 | + 'AW', |
| 92 | + 'AU', |
| 93 | + 'AT', |
| 94 | + 'AZ', |
| 95 | + 'BS', |
| 96 | + 'BH', |
| 97 | + 'BD', |
| 98 | + 'BB', |
| 99 | + 'BY', |
| 100 | + 'BE', |
| 101 | + 'BZ', |
| 102 | + 'BJ', |
| 103 | + 'BM', |
| 104 | + 'BT', |
| 105 | + 'BO', |
| 106 | + 'BQ', |
| 107 | + 'BA', |
| 108 | + 'BW', |
| 109 | + 'BV', |
| 110 | + 'BR', |
| 111 | + 'IO', |
| 112 | + 'BN', |
| 113 | + 'BG', |
| 114 | + 'BF', |
| 115 | + 'BI', |
| 116 | + 'KH', |
| 117 | + 'CM', |
| 118 | + 'CA', |
| 119 | + 'CV', |
| 120 | + 'KY', |
| 121 | + 'CF', |
| 122 | + 'TD', |
| 123 | + 'CL', |
| 124 | + 'CN', |
| 125 | + 'CX', |
| 126 | + 'CC', |
| 127 | + 'CO', |
| 128 | + 'KM', |
| 129 | + 'CG', |
| 130 | + 'CD', |
| 131 | + 'CK', |
| 132 | + 'CR', |
| 133 | + 'CI', |
| 134 | + 'HR', |
| 135 | + 'CU', |
| 136 | + 'CW', |
| 137 | + 'CY', |
| 138 | + 'CZ', |
| 139 | + 'DK', |
| 140 | + 'DJ', |
| 141 | + 'DM', |
| 142 | + 'DO', |
| 143 | + 'EC', |
| 144 | + 'EG', |
| 145 | + 'SV', |
| 146 | + 'GQ', |
| 147 | + 'ER', |
| 148 | + 'EE', |
| 149 | + 'ET', |
| 150 | + 'FK', |
| 151 | + 'FO', |
| 152 | + 'FJ', |
| 153 | + 'FI', |
| 154 | + 'FR', |
| 155 | + 'GF', |
| 156 | + 'PF', |
| 157 | + 'TF', |
| 158 | + 'GA', |
| 159 | + 'GM', |
| 160 | + 'GE', |
| 161 | + 'DE', |
| 162 | + 'GH', |
| 163 | + 'GI', |
| 164 | + 'GR', |
| 165 | + 'GL', |
| 166 | + 'GD', |
| 167 | + 'GP', |
| 168 | + 'GU', |
| 169 | + 'GT', |
| 170 | + 'GG', |
| 171 | + 'GN', |
| 172 | + 'GW', |
| 173 | + 'GY', |
| 174 | + 'HT', |
| 175 | + 'HM', |
| 176 | + 'VA', |
| 177 | + 'HN', |
| 178 | + 'HK', |
| 179 | + 'HU', |
| 180 | + 'IS', |
| 181 | + 'IN', |
| 182 | + 'ID', |
| 183 | + 'IR', |
| 184 | + 'IQ', |
| 185 | + 'IE', |
| 186 | + 'IM', |
| 187 | + 'IL', |
| 188 | + 'IT', |
| 189 | + 'JM', |
| 190 | + 'JP', |
| 191 | + 'JE', |
| 192 | + 'JO', |
| 193 | + 'KZ', |
| 194 | + 'KE', |
| 195 | + 'KI', |
| 196 | + 'KP', |
| 197 | + 'KR', |
| 198 | + 'KW', |
| 199 | + 'KG', |
| 200 | + 'LA', |
| 201 | + 'LV', |
| 202 | + 'LB', |
| 203 | + 'LS', |
| 204 | + 'LR', |
| 205 | + 'LY', |
| 206 | + 'LI', |
| 207 | + 'LT', |
| 208 | + 'LU', |
| 209 | + 'MO', |
| 210 | + 'MK', |
| 211 | + 'MG', |
| 212 | + 'MW', |
| 213 | + 'MY', |
| 214 | + 'MV', |
| 215 | + 'ML', |
| 216 | + 'MT', |
| 217 | + 'MH', |
| 218 | + 'MQ', |
| 219 | + 'MR', |
| 220 | + 'MU', |
| 221 | + 'YT', |
| 222 | + 'MX', |
| 223 | + 'FM', |
| 224 | + 'MD', |
| 225 | + 'MC', |
| 226 | + 'MN', |
| 227 | + 'ME', |
| 228 | + 'MS', |
| 229 | + 'MA', |
| 230 | + 'MZ', |
| 231 | + 'MM', |
| 232 | + 'NA', |
| 233 | + 'NR', |
| 234 | + 'NP', |
| 235 | + 'NL', |
| 236 | + 'NC', |
| 237 | + 'NZ', |
| 238 | + 'NI', |
| 239 | + 'NE', |
| 240 | + 'NG', |
| 241 | + 'NU', |
| 242 | + 'NF', |
| 243 | + 'MP', |
| 244 | + 'NO', |
| 245 | + 'OM', |
| 246 | + 'PK', |
| 247 | + 'PW', |
| 248 | + 'PS', |
| 249 | + 'PA', |
| 250 | + 'PG', |
| 251 | + 'PY', |
| 252 | + 'PE', |
| 253 | + 'PH', |
| 254 | + 'PN', |
| 255 | + 'PL', |
| 256 | + 'PT', |
| 257 | + 'PR', |
| 258 | + 'QA', |
| 259 | + 'RE', |
| 260 | + 'RO', |
| 261 | + 'RU', |
| 262 | + 'RW', |
| 263 | + 'BL', |
| 264 | + 'SH', |
| 265 | + 'KN', |
| 266 | + 'LC', |
| 267 | + 'MF', |
| 268 | + 'PM', |
| 269 | + 'VC', |
| 270 | + 'WS', |
| 271 | + 'SM', |
| 272 | + 'ST', |
| 273 | + 'SA', |
| 274 | + 'SN', |
| 275 | + 'RS', |
| 276 | + 'SC', |
| 277 | + 'SL', |
| 278 | + 'SG', |
| 279 | + 'SX', |
| 280 | + 'SK', |
| 281 | + 'SI', |
| 282 | + 'SB', |
| 283 | + 'SO', |
| 284 | + 'ZA', |
| 285 | + 'GS', |
| 286 | + 'ES', |
| 287 | + 'LK', |
| 288 | + 'SD', |
| 289 | + 'SR', |
| 290 | + 'SJ', |
| 291 | + 'SZ', |
| 292 | + 'SE', |
| 293 | + 'CH', |
| 294 | + 'SY', |
| 295 | + 'TW', |
| 296 | + 'TJ', |
| 297 | + 'TZ', |
| 298 | + 'TH', |
| 299 | + 'TL', |
| 300 | + 'TG', |
| 301 | + 'TK', |
| 302 | + 'TO', |
| 303 | + 'TT', |
| 304 | + 'TN', |
| 305 | + 'TR', |
| 306 | + 'TM', |
| 307 | + 'TC', |
| 308 | + 'TV', |
| 309 | + 'UG', |
| 310 | + 'UA', |
| 311 | + 'AE', |
| 312 | + 'GB', |
| 313 | + 'US', |
| 314 | + 'UM', |
| 315 | + 'UY', |
| 316 | + 'UZ', |
| 317 | + 'VU', |
| 318 | + 'VE', |
| 319 | + 'VN', |
| 320 | + 'VG', |
| 321 | + 'VI', |
| 322 | + 'WF', |
| 323 | + 'EH', |
| 324 | + 'YE', |
| 325 | + 'ZM', |
| 326 | + 'ZW', |
| 327 | + |
| 328 | + ), |
78 | 329 | ), |
79 | 330 | 'selectwebproperties' => array( |
80 | 331 | ApiBase::PARAM_ISMULTI => false, |
— | — | @@ -128,12 +379,16 @@ |
129 | 380 | return array( |
130 | 381 | 'months' => 'First and last month to include in time series', |
131 | 382 | 'normalized' => array( |
132 | | - |
| 383 | + 'Only applies to squidpageviews, where data for each month are recalculated to 30 days (other metrics may follow)', |
| 384 | + '(WMF Report Card will use normalized time series when available)', |
133 | 385 | ), |
134 | 386 | 'data' => array( |
135 | | - |
| 387 | + ' timeseries - returns ordered list of value pairs, on efor each month within range', |
| 388 | + ' timeseriesindexed - like timeseries, but each month\'s value will be relative to oldest month\'s value which is always 100', |
| 389 | + ' percentagegrowthlastmonth, percentagegrowthlastyear, percentagegrowthfullperiod', |
| 390 | + ' growth percentages are relative to oldest value (80->100=25%) although trivial, requesting these metrics through API ensures all clients use same calculation', |
136 | 391 | ), |
137 | | - 'reportlanguage' => '', |
| 392 | + 'reportlanguage' => 'Language code, used to expand region and country codes into region and country name', |
138 | 393 | 'selectregions' => '', |
139 | 394 | 'selectcountries' => '', |
140 | 395 | 'selectwebproperties' => '', |
Index: trunk/extensions/MetricsReporting/ApiAnalytics.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | |
88 | 88 | $querySeparator = str_repeat( '--- ', 12 ); |
89 | 89 | $moduleSeparator = str_repeat( '*** ', 14 ); |
90 | | - $msg .= "\n$querySeparator Analytics: Metric $querySeparator\n\n"; |
| 90 | + $msg .= "\n$querySeparator Analytics: Metrics $querySeparator\n\n"; |
91 | 91 | $msg .= $this->makeHelpMsgHelper( $this->metricModules, 'metric' ); |
92 | 92 | $msg .= "\n\n$moduleSeparator Modules: continuation $moduleSeparator\n\n"; |
93 | 93 | |