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

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

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

prop=categories (cl)

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

List all categories the pages belong to.

پارامترها:
Other general parameters are available.
clprop

Which additional properties to get for each category:

sortkey
Adds the sortkey (hexadecimal string) and sortkey prefix (human-readable part) for the category.
timestamp
Adds timestamp of when the category was added.
hidden
Tags categories that are hidden with __HIDDENCAT__.
مقدارهای (جداشده با | یا جایگزین‌های آن): hidden، sortkey، timestamp
clshow

کدام نوع رده‌ها نمایش داده‌شود.

مقدارهای (جداشده با | یا جایگزین‌های آن): !hidden، hidden
cllimit

چه میزان رده بازگردانده شود.

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

When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.

clcategories

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

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

The direction in which to list.

یکی از مقدارهای زیر: ascending، descending
پیش‌فرض: ascending
نمونه‌ها:
Get a list of categories the page Albert Einstein belongs to.
api.php?action=query&prop=categories&titles=Albert%20Einstein [باز کردن در صفحهٔ تمرین]
Get information about all categories used in the page Albert Einstein.
api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info [باز کردن در صفحهٔ تمرین]