Home Manual Reference Source
public class | source

Category

A category for a challenge. It is used to give a challenge front end attributes such as an icon, a color palette etc.

Constructor Summary

Public Constructor
public

constructor(id: string, parent: string, name: string, description: string, color: string, speechChallenges: Array<string>)

Create a category.

Member Summary

Public Members
public

Color code in hexadecimal format associated with this category.

public

Description associated with this category.

public

Download URL of the icon associated with this category.

public

Identifier of this category.

public

Download URL of the image associated with this category.

public

Name associated with this category.

public

Identifier of the parent category.

public

Challenges this category contains.

Public Constructors

public constructor(id: string, parent: string, name: string, description: string, color: string, speechChallenges: Array<string>) source

Create a category.

Params:

NameTypeAttributeDescription
id string
  • nullable: true

Identifier of this category. If none is given one is generated upon creation in the API.

parent string
  • nullable: true

Identifier of the parent category.

name string
  • nullable: true

Name associated with this category.

description string
  • nullable: true

Description associated with this category.

color string
  • nullable: true

Color code in hexadecimal format associated with this category.

speechChallenges Array<string>
  • nullable: true

Identifiers of the challenges this category contains. A category can only contain either more categories or challenges.

Throw:

Error

id parameter of type "string|null" is required.

Error

name parameter of type "string|null" is required.

Error

description parameter of type "string|null" is required.

Error

color parameter of type "string|null" is required.

Error

speechChallenges parameter of type "Array.<string>|null" is required.

Public Members

public color: string source

Color code in hexadecimal format associated with this category.

public description: string source

Description associated with this category.

public iconUrl: string source

Download URL of the icon associated with this category. This URL is only generated from the backend.

public id: string source

Identifier of this category. If none is given one is generated upon creation in the API.

public imageUrl: string source

Download URL of the image associated with this category. This URL is only generated from the backend.

public name: string source

Name associated with this category.

public parent: string source

Identifier of the parent category.

public speechChallenges: Array<string> source

Challenges this category contains. A category can only contain either more categories or challenges.