Reputation: 3466
Via http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&formatversion=2&format=json&siprop=extensions you can retrieve information about the MediaWiki extensions installed. The result format is documented at https://www.mediawiki.org/wiki/API:Siteinfo and states that for each extension descriptionmsg
contains a system message name. This is not the description itself but a key to a description string.
My question is: I have the key from descriptionmsg
, now how do I obtain the description string (via the API)?
Upvotes: 0
Views: 45
Reputation: 611
MediaWiki has an API module in its action API called allmessages, it can be called like https://en.wikipedia.org/w/api.php?action=query&format=json&meta=allmessages&ammessages=centralauth-desc
Check out its documentation here: https://www.mediawiki.org/wiki/API:Allmessages
Upvotes: 2
Reputation: 9096
You can retrieve the contents of https://en.wikipedia.org/wiki/MediaWiki:[descriptionmsg_value]
Replace [descriptionmsg_value]
with the actual value. For example given "descriptionmsg":"timedmediahandler-desc"
the related page is https://en.wikipedia.org/wiki/MediaWiki:timedmediahandler-desc.
There are several ways to get the contents of a page. Refer to API:Get the contents of a page for more information.
Upvotes: 0