forked from wikimedia/mediawiki-api-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodules.json
More file actions
605 lines (605 loc) · 16.5 KB
/
modules.json
File metadata and controls
605 lines (605 loc) · 16.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
[
{
"filename": "tokens",
"docstring": "Demo of `Token` module: Fetch token of type `login`",
"endpoint": "https://www.mediawiki.org/w/api.php",
"params": {
"action": "query",
"meta": "tokens",
"type": "login",
"format": "json"
}
},
{
"filename": "geocoordinates",
"docstring": "Demo of `Geosearch` module: Obtain coordinates for wiki pages nearby",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"prop": "coordinates",
"titles": "Wikimedia Foundation",
"format": "json"
}
},
{
"filename": "geoimagesearch",
"docstring": "Demo of `Geosearch` module: Use generator module\n\tto get search results for pages near Wikimedia HQ\n\twith images",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"generator": "geosearch",
"prop": "coordinates|pageimages",
"ggscoord": "37.7891838|-122.4033522",
"format": "json"
}
},
{
"filename": "geosearch",
"docstring": "Demo of `Geosearch` module: Search for wiki pages nearby",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "geosearch",
"gscoord": "37.7891838|-122.4033522",
"gsradius": "10000",
"gslimit": "10",
"format": "json"
}
},
{
"filename": "get_category_items",
"docstring": "Demo of `Categorymembers` module : List twenty items in a category",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "categorymembers",
"cmtitle": "Category:Physics",
"cmlimit": "20",
"format": "json"
}
},
{
"filename": "get_page_images",
"docstring": "Demo of `Images` module: Send a GET request to obtain a JSON\n\tobject listing all of the image files embedded on a single page",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"prop": "images",
"titles": "Albert Einstein",
"format": "json"
}
},
{
"filename": "get_recent_category_items",
"docstring": "Demo of `Categorymembers` module : Get the ten articles most recently added to a category",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "categorymembers",
"cmtitle": "Category:Physics",
"cmsort": "timestamp",
"cmdir": "desc",
"format": "json"
}
},
{
"filename": "get_redirects",
"docstring": "Demo of `Redirects` module: Get all redirects to the given page(s)",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"titles": "Jacques Kallis",
"prop": "redirects",
"format": "json"
}
},
{
"filename": "get_subcategories",
"docstring": "Demo of `Categorymembers` module : Get ten subcategories of a category",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "categorymembers",
"cmtitle": "Category:Wikipedia",
"cmtype": "subcat",
"format": "json"
}
},
{
"filename": "languagesearch",
"docstring": "Demo of `Languagesearch` module: Search for a language in any language",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "languagesearch",
"search": "Gu",
"format": "json"
}
},
{
"filename": "search",
"docstring": "Demo of `Search` module: Search for a text or title",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "search",
"srsearch": "Nelson Mandela",
"format": "json"
}
},
{
"filename": "opensearch",
"docstring": "Demo of `Opensearch` module: Search the wiki and obtain\n\tresults in an OpenSearch (http://www.opensearch.org) format",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "opensearch",
"search": "Hampi",
"limit": "5",
"namespace": "0",
"format": "json"
}
},
{
"filename": "prefixsearch",
"docstring": "Demo of `Prefixsearch` module: Perform a prefix search for page titles",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "prefixsearch",
"pssearch": "Star Wars",
"format": "json"
}
},
{
"filename": "get_category_info",
"docstring": "Demo of `Categoryinfo` module: Get information about a few categories",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"titles": "Category:Foo|Category:Infobox templates",
"prop": "categoryinfo"
}
},
{
"filename": "parse",
"docstring": "Demo of `Parse` module: Parse content of a page",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "parse",
"page": "Pet door",
"format": "json"
}
},
{
"filename": "get_pages_revisions",
"docstring": "Demo of `Revisions` module: Get revision data with content for pages with titles [[API]] and [[Main Page]]",
"endpoint": "https://www.mediawiki.org/w/api.php",
"params": {
"action": "query",
"prop": "revisions",
"titles": "API|Main Page",
"rvprop": "timestamp|user|comment|content",
"rvslots": "main",
"formatversion": "2",
"format": "json"
}
},
{
"filename": "get_filtered_page_revisions",
"docstring": "Demo of `Revisions` module: Get data including content of last 5 revisions of the title [[API:Geosearch]] made after July 1st 2018 excluding changes made by the user SSethi (WMF)",
"endpoint": "https://www.mediawiki.org/w/api.php",
"params": {
"action": "query",
"prop": "revisions",
"titles": "API:Geosearch",
"rvlimit": "5",
"rvprop": "timestamp|user|comment|content",
"rvdir": "newer",
"rvstart": "2018-07-01T00:00:00Z",
"rvexcludeuser": "SSethi (WMF)",
"rvslots": "main",
"formatversion": "2",
"format": "json"
}
},
{
"filename": "get_links",
"docstring": "Demo of `Links` module: Get all links on the given page(s)",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"titles": "Albert Einstein",
"prop": "links"
}
},
{
"filename": "get_info",
"docstring": "Demo of `Info` module: Send a GET request to display information about a page.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"titles": "Albert Einstein",
"prop": "info",
"inprop": "url|talkid"
}
},
{
"filename": "get_allpages",
"docstring": "Demo of `Allpages` module: Get all pages whose title contains the text \"Jungle,\" in whole or part.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allpages",
"apfrom": "jungle"
}
},
{
"filename": "get_allimages_by_name",
"docstring": "List all images in the namespace, starting from files that begin with 'Graffiti_000'. Limit the initial response to just the first three images.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allimages",
"aifrom": "Graffiti_000",
"ailimit": "3"
}
},
{
"filename": "get_allimages_by_date",
"docstring": "List all images in the namespace, starting from January 1, 2010, at 18:05:46 UTC.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allimages",
"aisort": "timestamp",
"aistart": "2010-01-01T18:05:46Z"
}
},
{
"filename": "get_imageinfo",
"docstring": "Demo of `Imageinfo` module: Get information about an image file.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"prop": "imageinfo",
"titles": "File:Billy Tipton.jpg"
}
},
{
"filename": "get_categories",
"docstring": "Demo of `Categories` module: Get categories associated with a page.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"prop": "categories",
"titles": "Janelle Monáe"
}
},
{
"filename": "get_allcategories",
"docstring": "Demo of `Allcategories` module: Get all categories, starting from a certian point, as ordered by category title.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allcategories",
"acfrom": "15th-century caliphs"
}
},
{
"filename": "get_allusers",
"docstring": "Demo of `Allusers` module: Get all users, starting from those whose name begins with the string, 'Drov'.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allusers",
"auprefix": "Drov"
}
},
{
"filename": "get_backlinks",
"docstring": "Demo of `Backlinks` module: Get request to list pages which link to a certain page.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "backlinks",
"bltitle": "philosophy"
}
},
{
"filename": "get_random",
"docstring": "Demo of `Random` module: Get request to list 5 random pages.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "random",
"rnlimit": "5"
}
},
{
"filename": "paraminfo",
"docstring": "Demo of `Paraminfo` module: Get information about other action API modules and their parameters.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "paraminfo",
"format": "json",
"modules": "parse|query+info|query"
}
},
{
"filename": "get_user_watchlist_feed",
"docstring": "Demo of `Feedwatchlist` module: Get a watchlist feed from another user.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "feedwatchlist",
"wlowner": "sample_user",
"wltoken": "sample_watchlist_token"
}
},
{
"filename": "get_alllinks",
"docstring": "Demo of `Alllinks` module: List links pointing to the given namespace.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "alllinks",
"alnamespace": "0",
"alunique": "1"
}
},
{
"filename": "get_usercontribs",
"docstring": "Demo of `Usercontribs` module: List user contributions.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "usercontribs",
"ucuser": "Jimbo Wales"
}
},
{
"filename": "get_allfileusages",
"docstring": "Demo of `allfileusage` module: List all file usages, including non-existing.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allfileusages",
"afprefix": "Icon",
"afprop": "ids|title"
}
},
{
"filename": "get_embedded_pages",
"docstring": "Demo of `Embeddedin` module: Get all page(s) that embed a given page",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "embeddedin",
"eititle": "Computer",
"eilimit": "20"
}
},
{
"filename": "get_exturlusage",
"docstring": "Demo of `Exturlusage` module: Enumerate pages that contain a given URL.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "exturlusage",
"euquery": "slashdot.org"
}
},
{
"filename": "get_allrevisions",
"docstring": "Demo of `Allrevisions` module: get revision data of multiple pages and users",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allrevisions",
"arvprop": "ids|flags|timestamp",
"arvuser": "Place holder"
}
},
{
"filename": "get_pagepropnames",
"docstring": "Demo of `Pagepropnames` module: List page property names on the given wiki.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "pagepropnames",
"format": "json"
}
},
{
"filename": "get_protectedtitles",
"docstring": "Demo of `Protectedtitles` module: Get the first 2 titles which only sysops can create",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "protectedtitles",
"ptlevel": "sysop",
"ptlimit": "2"
}
},
{
"filename": "get_imageusage",
"docstring": "Demo of `Imageusage` module: List the first 3 pages that use a given image title",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "imageusage",
"iutitle": "File:Wiki_logo_Nupedia.jpg",
"iulimit": "3"
}
},
{
"filename": "get_iwlinks",
"docstring": "Demo of `Iwlinks` module: Get the interwiki links from a given page.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"prop": "iwlinks",
"titles": "Albert Einstein"
}
},
{
"filename": "get_logevents",
"docstring": "Demo of `Logevents` module: Get the three most recent logevents.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "logevents",
"lelimit": "3"
}
},
{
"filename": "get_tags",
"docstring": "Demo of `Tags` module: Get the first three change tags and their hitcounts.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "tags",
"tgprop":"hitcount",
"tglimit": "3"
}
},
{
"filename": "get_allredirects",
"docstring": "Demo of `Allredirects` module: Get the first three unique pages containing redirects to the main namespace.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "allredirects",
"arunique": "1",
"arnamespace": "0",
"arlimit": "3"
}
},
{
"filename": "get_alltransclusions",
"docstring": "Demo of `Alltransclusions` module: Get three unique pages in the main namespace which contain transclusions.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"format": "json",
"list": "alltransclusions",
"atunique": "1",
"atnamespace": "0",
"atlimit": "3"
}
},
{
"filename": "get_blocked_users",
"docstring": "Demo of `Blocks` module: GET request to list recent blocked users.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "blocks",
"bklimit": "3",
"bkprop": "id|user|by|timestamp|expiry|reason|range|flags",
"format": "json"
}
},
{
"filename": "get_querypage_list",
"docstring": "Demo of `Querypage` module: List first 10 pages which are uncategorized",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "querypage",
"qppage": "Uncategorizedpages",
"qplimit": "10",
"format": "json"
}
},
{
"filename": "get_recent_changes",
"docstring": "Demo of `RecentChanges` module: Get the three most recent changes with sizes and flags",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "recentchanges",
"rcprop": "title|ids|sizes|flags|user",
"rclimit": "3",
"format": "json"
}
},
{
"filename": "get_red_links",
"docstring": "Demo of `Links` module to identify red or missing links on a page.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"generator": "links",
"titles": "Wikipedia:Most-wanted_articles",
"gpllimit": "20",
"format": "json"
}
},
{
"filename": "get_users",
"docstring": "Demo of `Users` module: Get information about several users: [[1.2.3.4]], [[Catrope]], [[Vandal01]], and [[Bob]]",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "users",
"ususers": "Catrope|Bob",
"usprop": "blockinfo|groups|editcount|registration|emailable|gender",
"format": "json"
}
},
{
"filename": "get_contributors",
"docstring": "Demo of `Contributors` module: Get request to list all logged-in contributors and count of anonymous contributors to a page.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"titles": "MediaWiki",
"prop": "contributors",
"format": "json"
}
},
{
"filename": "get_alldeletedrevs",
"docstring": "Demo of `alldeletedrevisions` module: List the all deleted revisions from User",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "query",
"list": "alldeletedrevisions",
"adruser": "Mahesh",
"adrprop": "ids|user|comment",
"format": "json"
}
},
{
"filename": "rsd",
"docstring": "Demo of `Rsd` module: Get request to export an RSD schema.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "rsd",
"format": "json"
}
}
]