Pomoc MediaWiki API
To jest automatycznie wygenerowana strona dokumentacji MediaWiki API.
Dokumentacja i przykłady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_pag
action=wbsetsitelink
- Ten moduł wymaga praw odczytu.
- Ten moduł wymaga praw zapisu.
- Ten moduł akceptuje tylko żądania POST.
- Źródło: WikibaseClient
- Licencja: GPL-2.0-or-later
Associates a page on a wiki with a Wikibase item or removes an already made such association.
- id
The identifier for the entity, including the prefix. Use either id or site and title together.
- new
If set, a new entity will be created. Set this to the type of the entity you want to create.
- Jedna z następujących wartości: item, property
- site
An identifier for the site on which the page resides. Use together with title to make a complete sitelink.
- Jedna z następujących wartości:
- title
Title of the page to associate. Use together with site to make a complete sitelink.
- baserevid
The numeric identifier for the revision to base the modification on. This is used for detecting conflicts during save.
- Type: integer
- summary
Summary for the edit. Will be prepended by an automatically generated comment. The length limit of the autocomment together with the summary is 260 characters. Be aware that everything above that limit will be cut off.
- tags
Change tags to apply to the revision.
- Wartości (oddziel za pomocą | lub alternatywy):
- token
Token „csrf” pobrany z action=query&meta=tokens
- This parameter is required.
- bot
Oznacz tę zmianę jako wykonaną przez bota. Ten znacznik adresu URL będzie brany pod uwagę tylko, jeśli użytkownik należy do grupy „bot”.
- Type: boolean (details)
- linksite
Identyfikator strony, na którą przekierowują linki
- This parameter is required.
- Jedna z następujących wartości:
- linktitle
The title of the page to link. If this parameter is an empty string or both linktitle and badges are not set, the link will be removed.
- badges
The IDs of items to be set as badges. They will replace the current ones. If this parameter is not set, the badges will not be changed
- Wartości (oddziel za pomocą | lub alternatywy):
- Add a sitelink to the English page "Hydrogen" to the item with ID "Q42", if the sitelink does not exist
- api.php?action=wbsetsitelink&id=Q42&linksite=enwiki&linktitle=Hydrogen [otwórz w brudnopisie]
- Dodaj link do Angielskiej strony "Hydrogen" do elementu z ID "Q42", jeśli link nie istnieje. Dodaj też etykietę "Kocha Tlen" w opisie zmian.
- api.php?action=wbsetsitelink&id=Q42&linksite=enwiki&linktitle=Hydrogen&summary=Loves%20Oxygen [otwórz w brudnopisie]
- Add a sitelink to the German page "Wasserstoff" to the item that is linked with the English page "Hydrogen", if the sitelink does not exist
- api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=dewiki&linktitle=Wasserstoff [otwórz w brudnopisie]
- Usuń z elementu link do języka niemieckiego
- api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=dewiki [otwórz w brudnopisie]
- Dodaj link do polskiej strony "Wodór" do elementu ze stroną angielską "Hydrogen" z jednym oznaczeniem wskazującym na obiekt z ID "Q149"
- api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=plwiki&linktitle=Wodór&badges=Q149 [otwórz w brudnopisie]
- Change badges for the link to the Polish page from the item with ID "Q42" to two badges pointing to the items with IDs "Q2" and "Q149" without providing the link title
- api.php?action=wbsetsitelink&id=Q42&linksite=plwiki&badges=Q2|Q149 [otwórz w brudnopisie]
- Change the link to the Polish page from the item with ID "Q42" without changing badges
- api.php?action=wbsetsitelink&id=Q42&linksite=plwiki&linktitle=Warszawa [otwórz w brudnopisie]
- Change the link to the Polish page from the item with ID "Q42" and remove all of its badges
- api.php?action=wbsetsitelink&id=Q42&linksite=plwiki&linktitle=Wodór&badges= [otwórz w brudnopisie]