API:Documentation template: Difference between revisions
Appearance
Content deleted Content added
SSethi (WMF) (talk | contribs) No edit summary |
SSethi (WMF) (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
{{Page in progress}}{{API}} |
|||
== Overview == |
== Overview == |
||
'''<big><span style="color: #00693E" class="">(TYPE OF REQUEST) Request</span> </big>'''<big>to (purpose of the API). </big> |
'''<big><span style="color: #00693E" class="">(TYPE OF REQUEST) Request</span> </big>'''<big>to (purpose of the API). </big> |
||
Revision as of 02:03, 1 September 2018
| This page is in progress Please check back later for additional changes. |
| This page is part of the MediaWiki Action API documentation. |
Overview
(TYPE OF REQUEST) Request to (purpose of the API).
API documentation
To embed the documentation of an API module, use the template below. Remember to replace "module name" with the name of an actual module. All main modules are here.
|
Example
GET Request
Response
{
"batchcomplete":""
}
Sample code
hello.py
#!/usr/bin/python3
"""
hello.py
MediaWiki Action API Code Samples
Demo of `...` module
MIT license
"""
import requests
S = requests.Session()
URL = "https://en.wikipedia.org/w/api.php"
PARAMS = {
'action':"query",
'format':"json"
}
R = S.get(url=URL, params=PARAMS)
DATA = R.json()
print(DATA)
Demo app(s)
- Add a link to the demo app. Embed an image of the demo if applicable
Possible errors
| Code | Info |
|---|---|
Additional notes
See also
- Add link to documentation of related modules
