Todo API
The todo module of the @codebolt/plugin-sdk.
import plugin from '@codebolt/plugin-sdk';
Quick Reference
| Method | Description |
|---|---|
addTodo | addTodo |
exportTodos | exportTodos |
getAllIncompleteTodos | getAllIncompleteTodos |
getTodoList | getTodoList |
importTodos | importTodos |
updateTodo | updateTodo |
Methods
addTodo
plugin.todo.addTodo(params: object): Promise<AddTodoResponse>
addTodo
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | The parameters for adding a todo. |
Returns: Promise<AddTodoResponse> — A promise that resolves with the server response.
exportTodos
plugin.todo.exportTodos(params?: object): Promise<ExportTodosResponse>
exportTodos
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | No | The parameters for exporting todos. |
Returns: Promise<ExportTodosResponse> — A promise that resolves with the exported data.
getAllIncompleteTodos
plugin.todo.getAllIncompleteTodos(): Promise<GetAllIncompleteTodosResponse>
getAllIncompleteTodos
No parameters.
Returns: Promise<GetAllIncompleteTodosResponse> — A promise that resolves with the server response.
getTodoList
plugin.todo.getTodoList(params?: any): Promise<GetTodoListResponse>
getTodoList
| Parameter | Type | Required | Description |
|---|---|---|---|
params | any | No | The parameters for getting the todo list. |
Returns: Promise<GetTodoListResponse> — A promise that resolves with the server response.
importTodos
plugin.todo.importTodos(params: object): Promise<ImportTodosResponse>
importTodos
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | The parameters for importing todos. |
Returns: Promise<ImportTodosResponse> — A promise that resolves with the import result.
updateTodo
plugin.todo.updateTodo(params: object): Promise<UpdateTodoResponse>
updateTodo
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | The parameters for updating a todo. |
Returns: Promise<UpdateTodoResponse> — A promise that resolves with the server response.