Index: trunk/phase3/includes/api/ApiWatch.php |
— | — | @@ -114,8 +114,8 @@ |
115 | 115 | |
116 | 116 | public function getExamples() { |
117 | 117 | return array( |
118 | | - 'api.php?action=watch&title=Main_Page', |
119 | | - 'api.php?action=watch&title=Main_Page&unwatch=', |
| 118 | + 'api.php?action=watch&title=Main_Page' => 'Watch the page "Main Page"', |
| 119 | + 'api.php?action=watch&title=Main_Page&unwatch=' => 'Unwatch the page "Main Page"', |
120 | 120 | ); |
121 | 121 | } |
122 | 122 | |
Index: trunk/phase3/includes/api/ApiQueryLinks.php |
— | — | @@ -231,13 +231,12 @@ |
232 | 232 | } |
233 | 233 | |
234 | 234 | public function getExamples() { |
| 235 | + $desc = $this->description; |
| 236 | + $name = $this->getModuleName(); |
235 | 237 | return array( |
236 | | - "Get {$this->description}s from the [[Main Page]]:", |
237 | | - " api.php?action=query&prop={$this->getModuleName()}&titles=Main%20Page", |
238 | | - "Get information about the {$this->description} pages in the [[Main Page]]:", |
239 | | - " api.php?action=query&generator={$this->getModuleName()}&titles=Main%20Page&prop=info", |
240 | | - "Get {$this->description}s from the Main Page in the User and Template namespaces:", |
241 | | - " api.php?action=query&prop={$this->getModuleName()}&titles=Main%20Page&{$this->prefix}namespace=2|10" |
| 238 | + "api.php?action=query&prop={$name}&titles=Main%20Page" => "Get {$desc}s from the [[Main Page]]:", |
| 239 | + "api.php?action=query&generator={$name}&titles=Main%20Page&prop=info" => "Get information about the {$desc} pages in the [[Main Page]]:", |
| 240 | + "api.php?action=query&prop={$name}&titles=Main%20Page&{$this->prefix}namespace=2|10" => "Get {$desc}s from the Main Page in the User and Template namespaces:", |
242 | 241 | ); |
243 | 242 | } |
244 | 243 | |
Index: trunk/phase3/includes/api/ApiQueryAllpages.php |
— | — | @@ -309,14 +309,17 @@ |
310 | 310 | |
311 | 311 | public function getExamples() { |
312 | 312 | return array( |
313 | | - 'Simple Use', |
314 | | - ' Show a list of pages starting at the letter "B"', |
315 | | - ' api.php?action=query&list=allpages&apfrom=B', |
316 | | - 'Using as Generator', |
317 | | - ' Show info about 4 pages starting at the letter "T"', |
318 | | - ' api.php?action=query&generator=allpages&gaplimit=4&gapfrom=T&prop=info', |
319 | | - ' Show content of first 2 non-redirect pages begining at "Re"', |
320 | | - ' api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content' |
| 313 | + 'api.php?action=query&list=allpages&apfrom=B' => array( |
| 314 | + 'Simple Use', |
| 315 | + 'Show a list of pages starting at the letter "B"', |
| 316 | + ), |
| 317 | + 'api.php?action=query&generator=allpages&gaplimit=4&gapfrom=T&prop=info' => array( |
| 318 | + 'Using as Generator', |
| 319 | + 'Show info about 4 pages starting at the letter "T"', |
| 320 | + ), |
| 321 | + 'api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content' => array( |
| 322 | + 'Show content of first 2 non-redirect pages begining at "Re"', |
| 323 | + ) |
321 | 324 | ); |
322 | 325 | } |
323 | 326 | |
Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -382,14 +382,14 @@ |
383 | 383 | |
384 | 384 | public function getExamples() { |
385 | 385 | return array( |
386 | | - 'List the last deleted revisions of Main Page and Talk:Main Page, with content (mode 1):', |
387 | | - ' api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&drprop=user|comment|content', |
388 | | - 'List the last 50 deleted contributions by Bob (mode 2):', |
389 | | - ' api.php?action=query&list=deletedrevs&druser=Bob&drlimit=50', |
390 | | - 'List the first 50 deleted revisions in the main namespace (mode 3):', |
391 | | - ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50', |
392 | | - 'List the first 50 deleted pages in the Talk namespace (mode 3):', |
393 | | - ' api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique=', |
| 386 | + 'api.php?action=query&list=deletedrevs&titles=Main%20Page|Talk:Main%20Page&drprop=user|comment|content' |
| 387 | + => 'List the last deleted revisions of Main Page and Talk:Main Page, with content (mode 1):', |
| 388 | + 'api.php?action=query&list=deletedrevs&druser=Bob&drlimit=50' |
| 389 | + => 'List the last 50 deleted contributions by Bob (mode 2):', |
| 390 | + 'api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50' |
| 391 | + => 'List the first 50 deleted revisions in the main namespace (mode 3):', |
| 392 | + 'api.php?action=query&list=deletedrevs&drdir=newer&drlimit=50&drnamespace=1&drunique=' |
| 393 | + => 'List the first 50 deleted pages in the Talk namespace (mode 3):', |
394 | 394 | ); |
395 | 395 | } |
396 | 396 | |
Index: trunk/phase3/includes/api/ApiQueryFilearchive.php |
— | — | @@ -282,9 +282,10 @@ |
283 | 283 | |
284 | 284 | public function getExamples() { |
285 | 285 | return array( |
286 | | - 'Simple Use', |
287 | | - ' Show a list of all deleted files', |
288 | | - ' api.php?action=query&list=filearchive', |
| 286 | + 'api.php?action=query&list=filearchive' => array( |
| 287 | + 'Simple Use', |
| 288 | + 'Show a list of all deleted files', |
| 289 | + ), |
289 | 290 | ); |
290 | 291 | } |
291 | 292 | |
Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php |
— | — | @@ -389,10 +389,8 @@ |
390 | 390 | |
391 | 391 | public function getExamples() { |
392 | 392 | return array( |
393 | | - 'Get first 10 pages in [[Category:Physics]]:', |
394 | | - ' api.php?action=query&list=categorymembers&cmtitle=Category:Physics', |
395 | | - 'Get page info about first 10 pages in [[Category:Physics]]:', |
396 | | - ' api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info', |
| 393 | + 'api.php?action=query&list=categorymembers&cmtitle=Category:Physics' => 'Get first 10 pages in [[Category:Physics]]:', |
| 394 | + 'api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info' => 'Get page info about first 10 pages in [[Category:Physics]]:', |
397 | 395 | ); |
398 | 396 | } |
399 | 397 | |
Index: trunk/phase3/includes/api/ApiQueryIWLinks.php |
— | — | @@ -178,8 +178,7 @@ |
179 | 179 | |
180 | 180 | public function getExamples() { |
181 | 181 | return array( |
182 | | - 'Get interwiki links from the [[Main Page]]:', |
183 | | - ' api.php?action=query&prop=iwlinks&titles=Main%20Page', |
| 182 | + 'api.php?action=query&prop=iwlinks&titles=Main%20Page' => 'Get interwiki links from the [[Main Page]]:', |
184 | 183 | ); |
185 | 184 | } |
186 | 185 | |
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php |
— | — | @@ -171,8 +171,7 @@ |
172 | 172 | |
173 | 173 | public function getExamples() { |
174 | 174 | return array( |
175 | | - 'Get interlanguage links from the [[Main Page]]:', |
176 | | - ' api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=', |
| 175 | + 'api.php?action=query&prop=langlinks&titles=Main%20Page&redirects=' => 'Get interlanguage links from the [[Main Page]]:', |
177 | 176 | ); |
178 | 177 | } |
179 | 178 | |
Index: trunk/phase3/includes/api/ApiQueryExternalLinks.php |
— | — | @@ -145,8 +145,7 @@ |
146 | 146 | |
147 | 147 | public function getExamples() { |
148 | 148 | return array( |
149 | | - 'Get a list of external links on the [[Main Page]]:', |
150 | | - ' api.php?action=query&prop=extlinks&titles=Main%20Page', |
| 149 | + 'api.php?action=query&prop=extlinks&titles=Main%20Page' => 'Get a list of external links on the [[Main Page]]:', |
151 | 150 | ); |
152 | 151 | } |
153 | 152 | |
Index: trunk/phase3/includes/api/ApiQueryCategories.php |
— | — | @@ -251,10 +251,8 @@ |
252 | 252 | |
253 | 253 | public function getExamples() { |
254 | 254 | return array( |
255 | | - 'Get a list of categories [[Albert Einstein]] belongs to:', |
256 | | - ' api.php?action=query&prop=categories&titles=Albert%20Einstein', |
257 | | - 'Get information about all categories used in the [[Albert Einstein]]:', |
258 | | - ' api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info' |
| 255 | + 'api.php?action=query&prop=categories&titles=Albert%20Einstein' => 'Get a list of categories [[Albert Einstein]] belongs to:', |
| 256 | + 'api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info' => 'Get information about all categories used in the [[Albert Einstein]]:', |
259 | 257 | ); |
260 | 258 | } |
261 | 259 | |
Index: trunk/phase3/includes/api/ApiQueryImages.php |
— | — | @@ -185,10 +185,8 @@ |
186 | 186 | |
187 | 187 | public function getExamples() { |
188 | 188 | return array( |
189 | | - 'Get a list of images used in the [[Main Page]]:', |
190 | | - ' api.php?action=query&prop=images&titles=Main%20Page', |
191 | | - 'Get information about all images used in the [[Main Page]]:', |
192 | | - ' api.php?action=query&generator=images&titles=Main%20Page&prop=info' |
| 189 | + 'api.php?action=query&prop=images&titles=Main%20Page' => 'Get a list of images used in the [[Main Page]]:', |
| 190 | + 'api.php?action=query&generator=images&titles=Main%20Page&prop=info' => 'Get information about all images used in the [[Main Page]]:', |
193 | 191 | ); |
194 | 192 | } |
195 | 193 | |