O objeto de categoria
O objeto de categoria é um objeto JSON com as seguintes propriedades:
{
"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 é a categoria pai. Com a profundidade predefinida é um objeto de categoria. Com depth=0 é um id. Uma categoria raiz omite parent. path é o breadcrumb. pathLabel junta esses títulos com /. videoCount é o número de vídeos nesta categoria. videoCountWithSubcategories inclui os vídeos nas categorias filhas.
Os campos graváveis são title (máx. 100), slug, description (máx. 2000) e parent (um id de categoria). Ao criares uma categoria sem slug, este é gerado a partir de title.