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

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

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

submodule=setsorting

(main | collection | setsorting)
  • این پودمان نیازمند اختیارات خواندن است.
  • منبع: Collection
  • مجوز: GPL-2.0-or-later

API module for reordering items in a collection

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

Items should be listed using their old index and ordered by their new position

این پارامتر الزامی است.
نوع: فهرستی از اعداد صحیح
Separate values with | or alternative.
حداکثر تعداد مقدارها ۵۰ است (۵۰۰ برای متقضایانی که مجوز محدودیت‌های بالاتر را دارند).
نمونه‌ها:
In a collection of 3 items, swap the first and second item
api.php?action=collection&submodule=setsorting&items=1|0|2 [باز کردن در صفحهٔ تمرین]
In a collection of 3 items, make the 3rd item first, and delete the 2nd item
api.php?action=collection-setsorting&items=2|0 [باز کردن در صفحهٔ تمرین]