Label
To interact with labels, the labelService object is defined.
The label entity contains the following data:
class Label {...}
| Name | Data Type | Description | 
|---|---|---|
| id | string | Label UUID | 
| projectId | string | Project UUID where the label is located | 
| value | string | Label name | 
| description | string | Label description | 
| hexColor | string | Label color code in HEX format | 
Methods for Working with Labels
The following methods exist for working with the label entity:
Creating a Label
labelService.create(toCreate: Label) => Label
This method creates a label and returns it. You need to provide the following values:
| Name | Data Type | Description | 
|---|---|---|
| projectId | string | Project UUID where the label will be created | 
| value | string | Label name | 
| description | string | Label description | 
| hexColor | string | Label color code in HEX format | 
Editing a Label
labelService.edit(toEdit: Label) => Label
This method edits a label and returns it. You need to provide the following values:
| Name | Data Type | Description | 
|---|---|---|
| id | string | Label UUID | 
| projectId | string | Project UUID where the label will be edited | 
| value | string | Optional. Label name | 
| description | string | Optional. Label description | 
| hexColor | string | Optional. Label color code in HEX format | 
Getting a List of All Labels
labelService.getAll({projectId}, {startPage}, {pageSize}) => Page<Label>
This method returns an object with all labels in a project. You need to provide the following values:
| Name | Data Type | Description | 
|---|---|---|
| projectId | string | Project UUID to search in | 
| startPage | number | Requested page number | 
| pageSize | number | Page size | 
Getting a List of Labels by UUID
labelService.findAllByIds({projectId}, {ids}) => Label[]
This method returns a list of specified labels in a project. You need to provide the following values:
| Name | Data Type | Description | 
|---|---|---|
| projectId | string | Project UUID to search in | 
| ids | []string | List of label UUIDs to retrieve | 
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.