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
- Aby wskazać wszystkie wartości, użyj *.
- tllimit
Ile szablonów zwrócić?
- Type: integer or max
- The value must be between 1 and 500.
- Default: 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.
- Maximum number of values is 50 (500 for clients allowed higher limits).
- tldir
The direction in which to list.
- Jedna z następujących wartości: ascending, descending
- Default: 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]