Pomoc API MediaWiki
To jest automatycznie wygenerowana strona dokumentacji API MediaWiki.
Dokumentacja i przykÅady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
prop=templates (tl)
- Ten moduÅ wymaga praw odczytu.
- Ten moduÅ może byÄ użyty jako generator.
- ŹródÅo: MediaWiki
- Licencja: GPL-2.0-or-later
Zwraca wszystkie strony osadzone w danych stronach.
Parametry:
- tlnamespace
Pokaż szablony tylko w tych przestrzeniach nazw.
- WartoÅci (oddziel za pomocÄ | lub alternatywy): -1, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 420, 421, 710, 711, 828, 829, 2300, 2301, 2302, 2303
- Aby wskazaÄ wszystkie wartoÅci, użyj *.
- tllimit
Ile szablonów zwróciÄ?
- Type: integer or max
- WartoÅÄ musi znajdowaÄ siÄ pomiÄdzy 1 a 500.
- DomyÅlnie: 10
- tlcontinue
Gdy bÄdzie dostÄpnych wiÄcej wyników, użyj tego do kontynuowania.
- tltemplates
Only list these templates. Useful for checking whether a certain page uses a certain template.
- Oddziel wartoÅci za pomocÄ | lub alternatywy.
- Maksymalna liczba wartoÅci to 50 (500 dla klientów z podwyższonymi limitami).
- tldir
The direction in which to list.
- Jedna z nastÄpujÄ cych wartoÅci: ascending, descending
- DomyÅlnie: ascending
PrzykÅady:
- Get the templates used on the page Main Page.
- api.php?action=query&prop=templates&titles=Main%20Page [otwórz w brudnopisie]
- Get information about the template pages used on Main Page.
- api.php?action=query&generator=templates&titles=Main%20Page&prop=info [otwórz w brudnopisie]
- Get pages in the Użytkownik and Szablon namespaces that are transcluded on the page Main Page.
- api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10 [otwórz w brudnopisie]