Pomoc MediaWiki API

To jest automatycznie wygenerowana strona dokumentacji MediaWiki API.

Dokumentacja i przykłady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_pag

prop=categories (cl)

(main | query | categories)
  • Ten moduł wymaga praw odczytu.
  • Ten moduł może być użyty jako generator.
  • Źródło: MediaWiki
  • Licencja: GPL-2.0-or-later

Lista kategorii, do których należą strony

Parametry:
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
Dodaje znacznik czasu dodania kategorii.
hidden
Tags categories that are hidden with __HIDDENCAT__.
Wartości (oddziel za pomocą | lub alternatywy): hidden, sortkey, timestamp
clshow

Which kind of categories to show.

Wartości (oddziel za pomocą | lub alternatywy): !hidden, hidden
cllimit

Liczba kategorii do zwrócenia.

Type: integer or max
The value must be between 1 and 500.
Default: 10
clcontinue

Gdy będzie dostępnych więcej wyników, użyj tego do kontynuowania.

clcategories

Only list these categories. Useful for checking whether a certain page is in a certain category.

Oddziel wartości za pomocą | lub alternatywy.
Maximum number of values is 50 (500 for clients allowed higher limits).
cldir

The direction in which to list.

Jedna z następujących wartości: ascending, descending
Default: ascending
Przykłady:
Get a list of categories the page Albert Einstein belongs to.
api.php?action=query&prop=categories&titles=Albert%20Einstein [otwórz w brudnopisie]
Get information about all categories used in the page Albert Einstein.
api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info [otwórz w brudnopisie]