Methods
Create todo.(content, categorynullable, tagsnullable) → {TodoItem}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
content |
string | ||
category |
string |
<nullable> |
|
tags |
Array.<string> |
<nullable> |
Returns:
- Type
- TodoItem
Delete all tag.(id) → {TodoItem}
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The id of the todo. |
Returns:
- return updated todoItem.
- Type
- TodoItem
Delete all todo.() → {void}
Returns:
- Type
- void
Delete tag by id.(id, tagId) → {TodoItem}
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The id of the todo. |
tagId |
string | The id of the tag. |
Returns:
- return updated todoItem.
- Type
- TodoItem
Delete todo by id.(id) → {void}
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The id of the todo. |
Returns:
- Type
- void
Read all of todos.() → {TodoList}
Returns:
- Type
- TodoList
Read specific todo by id.(id) → {TodoItem}
Parameters:
Name | Type | Description |
---|---|---|
id |
number |
Returns:
- Type
- TodoItem
UpdateTag(id, tagIdopt, tagNameopt) → {TodoItem}
Update specific todo's specific tag.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The id of the todo. | |
tagId |
number |
<optional> |
The tagId of the todo. |
tagName |
string |
<optional> |
The tag's name of the todo. |
Returns:
- return updated todoItem.
- Type
- TodoItem
UpdateTodo(id, contentopt, categoryopt) → {TodoItem}
Update todo.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The id of the todo. | |
content |
string |
<optional> |
The content of the todo. |
category |
string |
<optional> |
The category of the todo. |
Returns:
- return updated todoItem.
- Type
- TodoItem
Type Definitions
TagItem
Type of tag.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
tagId |
number | The id of the tag. |
tagName |
string | = the name of the tag. |
TagList
Type of tagList.
Type:
- Array.<TagItem>
TodoItem
Type of todo.
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number | The id of the todo. | |
content |
string | The content of the todo. | |
isDone |
boolean | Whether user did or not todo. | |
category |
string | The category of the todo. | |
tagList |
TagList |
<optional> |
The tags of the todo. |
TodoList
Type of todoList.
Type:
- Array.<TodoItem>