-
Notifications
You must be signed in to change notification settings - Fork 78
Request actions
Steve edited this page Sep 20, 2017
·
30 revisions
Getting data in wptools centers on request "actions". We make API requests to get data, and then we assign values from the data to select data members. Most actions map to a get_{action}
method that attempts to get as much information as possible through that API entry point.
Action | Method | Description |
---|---|---|
* | get | some mix of all actions below |
claims | get_claims | Wikidata:API action=wbgetentities request for Q entity labels |
imageinfo | get_imageinfo | Mediawiki API:Imageinfo request for image info |
parse | get_parse | MediaWiki:API action=parse request for parsetree/infobox data |
query | get_query | MediaWiki:API action=query request for extracts, image files, etc. |
random | get_random | Mediawiki API:Random for random page |
rest | get_restbase | RESTBase /page/ requests for page content |
wikidata | get_wikidata | Wikidata:API action=wbgetentities for page wikidata |
Action | Method | Description |
---|---|---|
categorymembers | get_members | Mediawiki API:Categorymembers for category members |
random:14 | get_random | Mediawiki API:Random for random category (ns=14) |
Action | Method | Description |
---|---|---|
siteinfo | get_info | Mediawiki API:Siteinfo and Extension:PageViewInfo for site info |
sitematrix | get_sites | Wikimedia Commons Extension:SiteMatrix for sitematrix |
siteviews | get_info | Mediawiki Extension:PageViewInfo for sitewide unique visitors |