Obiekt kategorii
Obiekt kategorii to obiekt JSON z następującymi właściwościami:
{
"id": string,
"title": string,
"slug": string,
"description": string,
"workspace": string,
"parent": object | string, // absent on a root category
"path": [
{
"id": string,
"doc": string, // category id this crumb points at; sometimes absent on create
"url": string,
"label": string
}
],
"pathLabel": string, // breadcrumb titles joined with " / "
"videoCount": number,
"videoCountWithSubcategories": number,
"createdAt": Date,
"updatedAt": Date
}parent to kategoria nadrzędna. Przy domyślnej głębokości jest obiektem kategorii. Przy depth=0 jest identyfikatorem. Kategoria główna nie ma pola parent. path to breadcrumb. pathLabel łączy te tytuły separatorem /. videoCount to liczba wideo w tej kategorii. videoCountWithSubcategories obejmuje wideo w kategoriach podrzędnych.
Pola do zapisu to title (maks. 100), slug, description (maks. 2000) i parent (id kategorii). Gdy tworzysz kategorię bez slug, jest on generowany z title.