Jump to content

API

本頁使用了標題或全文手工轉換
From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page API and the translation is 80% complete.

MediaWiki拥有多种应用程序接口API)。

MediaWiki提供以下Web API:

The Action API provides a much broader set of functionality, while the REST API (which is newer) has better-structured URLs and runs faster.

MediaWiki also includes the following software APIs:

请注意,MediaWiki Action API和MediaWiki JavaScript API都是模块化的:两者都可以通过扩展进行扩展,因此可用的API模块可能因wiki而异。[1] 虽然MediaWiki Core 内置的API模块在大多数MediaWiki wiki中都可用,但内置的Action API模块也可以禁用

在MediaWiki网站的上下文中,可以通过mw.Api的JavaScript API从JavaScript访问Action API。 (mw.ForeignApi用于允许的跨网站请求,例如WMF wiki之间的请求。) 对于从您喜欢的编程语言访问MediaWiki Action API的库,请参阅API:客户端代码

APIs for Wikimedia wikis

For information about APIs available for Wikimedia wikis, see Wikimedia APIs .

参阅

对MediaWiki API的建议和想法可在Phabricator 上跟踪:

脚注

  1. 有关扩展Action API,请参阅API:扩展 。 有关JavaScript模块的信息,请参阅资源加载器