MediaWiki API súgó
Ez egy automatikusan generált MediaWiki-API-dokumentációs lap.
Dokumentáció és példák: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=wbsetsitelink
- Ez a modul olvasási jogot igényel.
- Ez a modul írási jogot igényel.
- Ez a modul csak POST kéréseket fogad el.
- Forrás: WikibaseClient
- Licenc: 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.
- A következő értékek egyike: item, property
- site
An identifier for the site on which the page resides. Use together with title to make a complete sitelink.
- A következő értékek egyike:
- title
Title of the page to associate. Use together with site to make a complete sitelink.
- baserevid
A módosítás alapjául szolgáló lapváltozat azonosítója (oldid-je). A szerkesztési ütközések felismerésére szolgál.
- Típus: egész szám
- summary
A szerkesztési összefoglaló. Elé kerül egy automatikusan generált megjegyzés. Az automatikus megjegyzés és az összefoglaló együttes hossza legfeljebb 260 bájt (az ékezetes karakterek két bájtot foglalnak el). A limitet túllépő összefoglaló vége le lesz vágva.
Change tags to apply to the revision.
- Értékek (elválasztó: | vagy más):
- token
Egy „csrf” token, az action=query&meta=tokens kéréssel lekérve
- Ez a paraméter kötelező.
- bot
A szerkesztés botszerkesztésnek jelölése. Csak akkor van hatása, ha a felhasználó tagja a „botok” csoportnak.
- Típus: logikai (részletek)
- returnto
Page title. If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to the given page, instead of the page that was edited.
- Típus: lapcím
- Nemlétező oldalakat is elfogad
- returntoquery
URL query parameters (with leading ?). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given query parameters.
- Alapértelmezett: (üres)
- returntoanchor
URL fragment (with leading #). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given fragment.
- Alapértelmezett: (üres)
- linksite
Az összekapcsolandó lap wikijének azonosítója
- Ez a paraméter kötelező.
- A következő értékek egyike:
- linktitle
Az összekapcsolandó lap címe. Ha üres, vagy a linktitle és a badges paraméter is hiányzik, a kapcsolat megszüntetése.
- 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
- Értékek (elválasztó: | vagy más):
- Add a sitelink to the English page "Hydrogen" to the item with ID Q999999998, if the sitelink does not exist
- api.php?action=wbsetsitelink&id=Q999999998&linksite=enwiki&linktitle=Hydrogen [megnyitás a homokozóban]
- Add a sitelink to the English page "Hydrogen" to the item with ID Q999999998, if the sitelink does not exist. Also appends "Loves Oxygen" to the edit summary.
- api.php?action=wbsetsitelink&id=Q999999998&linksite=enwiki&linktitle=Hydrogen&summary=Loves%20Oxygen [megnyitás a homokozóban]
- 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 [megnyitás a homokozóban]
- Remove the German sitelink from the item
- api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=dewiki [megnyitás a homokozóban]
- Add a sitelink to the Polish page "Wodór" to the item that is linked with the English page "Hydrogen", with one badge pointing to the item with ID "Q149"
- api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=plwiki&linktitle=Wodór&badges=Q149 [megnyitás a homokozóban]
- Change badges for the link to the Polish page from the item with ID Q999999998 to two badges pointing to the items with IDs "Q2" and "Q149" without providing the link title
- api.php?action=wbsetsitelink&id=Q999999998&linksite=plwiki&badges=Q2|Q149 [megnyitás a homokozóban]
- Change the link to the Polish page from the item with ID Q999999998 without changing badges
- api.php?action=wbsetsitelink&id=Q999999998&linksite=plwiki&linktitle=Warszawa [megnyitás a homokozóban]
- Change the link to the Polish page from the item with ID Q999999998 and remove all of its badges
- api.php?action=wbsetsitelink&id=Q999999998&linksite=plwiki&linktitle=Wodór&badges= [megnyitás a homokozóban]