راهنمای واسط برنامه‌نویسی کاربردی مدیاویکی

این یک صفحهٔ مستندات برای واسط برنامه‌نویسی کاربردی مدیاویکی است که به‌طور خودکار ایجاد شده‌است.

مستندات و نمونه‌ها: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

prop=templates (tl)

(main | query | templates)
  • این پودمان نیازمند اختیارات خواندن است.
  • This module can be used as a generator.
  • منبع: MediaWiki
  • مجوز: GPL-2.0-or-later

Returns all pages transcluded on the given pages.

پارامترها:
tlnamespace

Show templates in these namespaces only.

مقدارهای (جداشده با | یا جایگزین‌های آن): -1، -2، 0، 1، 2، 3، 4، 5، 6، 7، 8، 9، 10، 11، 12، 13، 14، 15، 828، 829، 2300، 2301، 2302، 2303، 3000، 3001
برای تعیین همهٔ مقدارها از * استفاده کنید.
tllimit

How many templates to return.

نوع: عدد صحیح یا max
The value must be between ۱ and ۵۰۰.
پیش‌فرض: 10
tlcontinue

When more results are available, use this to continue.

tltemplates

Only list these templates. Useful for checking whether a certain page uses a certain template.

Separate values with | or alternative.
حداکثر تعداد مقدارها ۵۰ است (۵۰۰ برای متقضایانی که مجوز محدودیت‌های بالاتر را دارند).
tldir

The direction in which to list.

یکی از مقدارهای زیر: ascending، descending
پیش‌فرض: ascending
نمونه‌ها:
Get the templates used on the page Main Page.
api.php?action=query&prop=templates&titles=Main%20Page [باز کردن در صفحهٔ تمرین]
Get information about the template pages used on Main Page.
api.php?action=query&generator=templates&titles=Main%20Page&prop=info [باز کردن در صفحهٔ تمرین]
Get pages in the کاربر and الگو namespaces that are transcluded on the page Main Page.
api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10 [باز کردن در صفحهٔ تمرین]