# Category
Represents a category on FakeYou
# Constructor
new Category(client, data);
PARAMETER | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
client | Client | The client that instantiated this | No |
data | APIData | The category API data | No |
# Properties
# client
The client that instantiated this
- Type: Client
# createdAt
The date the category was created
# createdTimestamp
The timestamp in seconds the category was created
# features
The data about features this category has
- Type: CategoryFeatures
# models
The group of models this belongs to
- Type: Group <ModelToken, Model>
# name
An alternative title if is contextually different
# partial
Checks if has partial data
- Type: Boolean
# subCategories
The group of children categories this belongs to
- Type: Group <CategoryToken, Category>
# superCategory
The parent category in which this category is located
# superCategoryToken
The parent category token in which this category is located
- Type: CategoryToken or null
# token
The category token
- Type: CategoryToken
# type
The type of this category
- Type: String
# updatedAt
The date that category was last updated
# updatedTimestamp
The timestamp in seconds the category was last updated
# user
The user was created the category
# userToken
The user token was created the category
# Methods
# isSuperCategory()
Checks if is a super category
- Return: Boolean
# isSubCategory()
Checks if is a sub category (has parent)
- Return: Boolean
# fetch()
Get all data about this category