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)

(main | query | templates)
  • 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, 102, 103, 106, 107, 108, 109, 112, 113, 114, 115, 420, 421, 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]