forked from wikimedia/mediawiki-api-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules.json
370 lines (369 loc) · 11.3 KB
/
modules.json
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
[{
"filename": "tokens.py",
"docstring": "Demo of `Token` module: Fetch token of type `login`",
"endpoint": "https://mediawiki.org/w/api.php",
"params": {
"action": "query",
"meta": "tokens",
"type": "login",
"format": "json"
}
},
{
"filename": "geocoordinates.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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": "parse.py",
"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.py",
"docstring": "Demo of `Revisions` module: Get revision data with content for pages with titles [[API]] and [[Main Page]]",
"endpoint": "https://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.py",
"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://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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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.py",
"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": "logout.py",
"docstring": "Demo of `Logout` module: Log out and clear session data.",
"endpoint": "https://en.wikipedia.org/w/api.php",
"params": {
"action": "logout",
"format": "json"
}
},
{
"filename": "get_random.py",
"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.py",
"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+blah"
}
},
{
"filename": "get_user_watchlist_feed.py",
"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.py",
"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.py",
"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"
}
}
]