问题
I have a new installation of mediawiki. I am trying to use the API to simply get an article. The API url I am using is:
https://example.com/mediawiki/api.php?action=query&format=json&prop=extracts&titles=Vendor_cisco
Upon going to that URL I get: Unrecognized value for parameter 'prop': extracts
This seems odd because all of the following urls do work and return the right data:
https://example.com/mediawiki/api.php?action=query&format=json&prop=links&titles=Vendor_cisco https://example.com/mediawiki/api.php?action=query&format=json&prop=categories&titles=Vendor_cisco https://example.com/mediawiki/api.php?action=query&format=json&prop=revisions&titles=Vendor_cisco
How do I get the body and text from my article? I was under the impression prop=extracts is what is used.
回答1:
prop=extracts is part of TextExtracts extension (formerly MobileFrontend extension). If you don't have that extension installed, you won't be able to use prop=extracts
.
来源:https://stackoverflow.com/questions/15960533/mediawiki-api-error-unrecognized-value-for-parameter-prop-extracts