Jump to content

API/pl: Difference between revisions

From mediawiki.org
Content deleted Content added
FuzzyBot (talk | contribs)
Updating to match new version of source page
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(12 intermediate revisions by the same user not shown)
Line 5: Line 5:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
MediaWiki offers the following web APIs:
The three most important APIs of MediaWiki probably are:
</div>
</div>


* <span lang="en" dir="ltr" class="mw-content-ltr">the [[Special:MyLanguage/API:Main_page|MediaWiki Action API]] (''api.php''), which is a web API that lets you read and write content of a {{ll|MediaWiki wiki}}</span>
* <span lang="en" dir="ltr" class="mw-content-ltr">the [[Special:MyLanguage/API:Action API|MediaWiki Action API]] (<code>api.php</code>)</span>
* <span lang="en" dir="ltr" class="mw-content-ltr">the [https://doc.wikimedia.org/mediawiki-core/master/php/ MediaWiki PHP API], which can be used to develop {{ll|extensions}} for MediaWiki in {{ll|PHP}}</span>
* <span lang="en" dir="ltr" class="mw-content-ltr">the [[Special:MyLanguage/API:REST API|MediaWiki REST API]]</span> (<code>rest.php</code>)
* <span lang="en" dir="ltr" class="mw-content-ltr">the [https://doc.wikimedia.org/mediawiki-core/master/js/ MediaWiki JavaScript API] (''mw''), which can be used to develop</span> {{ll|user scripts|<span lang="en" dir="ltr" class="mw-content-ltr">user scripts and gadgets</span>}} <span lang="en" dir="ltr" class="mw-content-ltr">to extend the MediaWiki user interface</span>


<span lang="en" dir="ltr" class="mw-content-ltr">The Action API provides a much broader set of functionality, while the REST API (which is newer) has better-structured URLs and runs faster.</span>
<span lang="en" dir="ltr" class="mw-content-ltr">Note that the MediaWiki Action API and the MediaWiki JavaScript API are both modular: both can be extended by extensions, so the available API modules can differ from wiki to wiki.</span><ref><span lang="en" dir="ltr" class="mw-content-ltr">For extending the Action API, see {{ll|API:Extensions}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">For information about JavaScript modules, see {{ll|ResourceLoader}}.</span>

<span lang="en" dir="ltr" class="mw-content-ltr">MediaWiki also includes the following software APIs:</span>
* <span lang="en" dir="ltr" class="mw-content-ltr">the [[wmdoc:mediawiki-core/master/php/|MediaWiki PHP API]], which can be used to develop {{ll|Manual:Extensions|extensions}} for MediaWiki in {{ll|PHP}}</span>
* <span lang="en" dir="ltr" class="mw-content-ltr">the [[wmdoc:mediawiki-core/master/js/|MediaWiki JavaScript API]] (''mw''), which can be used to develop {{ll|user scripts|user scripts and gadgets}} to extend the MediaWiki user interface</span>

<span lang="en" dir="ltr" class="mw-content-ltr">Note that the MediaWiki Action API and the MediaWiki JavaScript API are both modular: both can be extended by extensions, so the available API modules can differ from wiki to wiki.</span><ref>
<span lang="en" dir="ltr" class="mw-content-ltr">For extending the Action API, see {{ll|API:Extensions}}.</span>
<span lang="en" dir="ltr" class="mw-content-ltr">For information about JavaScript modules, see {{ll|ResourceLoader}}.</span>
</ref>
</ref>
<span lang="en" dir="ltr" class="mw-content-ltr">While the API modules built into {{ll|MediaWiki Core}} are available in most MediaWiki wikis, built-in Action API modules</span> {{ll|API:Restricting API usage|<span lang="en" dir="ltr" class="mw-content-ltr">can also be disabled</span>}}.
<span lang="en" dir="ltr" class="mw-content-ltr">While the API modules built into {{ll|MediaWiki Core}} are available in most MediaWiki wikis, built-in Action API modules {{ll|API:Restricting API usage|can also be disabled}}.</span>


<span lang="en" dir="ltr" class="mw-content-ltr">Within the context of the MediaWiki website the Action API can be accessed from JavaScript via the [https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.Api mw.API] JavaScript API.</span>
<span lang="en" dir="ltr" class="mw-content-ltr">Within the context of the MediaWiki website the Action API can be accessed from JavaScript via the [[wmdoc:mediawiki-core/master/js/mw.Api.html|mw.Api]] JavaScript API.</span>
<span lang="en" dir="ltr" class="mw-content-ltr">([[wmdoc:mediawiki-core/master/js/mw.ForeignApi.html|mw.ForeignApi]] for allowed cross-site requests, e.g. between WMF wikis.)</span>
<span lang="en" dir="ltr" class="mw-content-ltr">For libraries to access the MediaWiki Action API from your favorite programming language, see {{ll|API:Client code}}.</span>
<span lang="en" dir="ltr" class="mw-content-ltr">For libraries to access the MediaWiki Action API from your favorite programming language, see {{ll|API:Client code}}.</span>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
== Other web APIs ==
== APIs for Wikimedia wikis ==
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
For information about APIs available for Wikimedia wikis, see {{ll|Wikimedia APIs}}.
</div>
</div>
{{API comparison}}


{{anchor|phabricator}}
{{anchor|phabricator}}
<span id="See_also"></span>
<span id="See_also"></span>
== Zobacz też ==
== Zobacz też ==

<span lang="en" dir="ltr" class="mw-content-ltr">Suggestions and ideas for the MediaWiki APIs are tracked on {{ll|Phabricator}}:</span>
<div lang="en" dir="ltr" class="mw-content-ltr">
Suggestions and ideas for the MediaWiki APIs are tracked on {{ll|Phabricator}}:
</div>


* [[phab:tag/MediaWiki-Action-API|<span lang="en" dir="ltr" class="mw-content-ltr">Phabricator tasks for the MediaWiki-Action-API</span>]]
* [[phab:tag/MediaWiki-Action-API|<span lang="en" dir="ltr" class="mw-content-ltr">Phabricator tasks for the MediaWiki-Action-API</span>]]
Line 38: Line 52:
<references/>
<references/>


{{dab}}
[[Category:MediaWiki development{{#translation:}}]]
[[Category:MediaWiki development{{#translation:}}]]
[[Category:Manual{{#translation:}}]]
[[Category:Manual{{#translation:}}]]

Latest revision as of 15:24, 5 April 2026

MediaWiki has several application programming interfaces (APIs).

MediaWiki offers the following web APIs:

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:

Note that the MediaWiki Action API and the MediaWiki JavaScript API are both modular: both can be extended by extensions, so the available API modules can differ from wiki to wiki.[1] While the API modules built into MediaWiki Core are available in most MediaWiki wikis, built-in Action API modules can also be disabled .

Within the context of the MediaWiki website the Action API can be accessed from JavaScript via the mw.Api JavaScript API. (mw.ForeignApi for allowed cross-site requests, e.g. between WMF wikis.) For libraries to access the MediaWiki Action API from your favorite programming language, see API:Client code .

APIs for Wikimedia wikis

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

Zobacz też

Suggestions and ideas for the MediaWiki APIs are tracked on Phabricator :

Przypisy

  1. For extending the Action API, see API:Rozszerzenia . For information about JavaScript modules, see ResourceLoader .