Tasks

interface Tasks

This module provides methods for managing tasks associated with the connected user.

Tasks act as to-do items, each containing a title, description, category, position, and a boolean flag indicating whether the task has been completed. You can create, update, retrieve, and delete tasks through this interface.

Tasks can also be created from Instant Messaging (IM) messages, enabling a smooth integration between user conversations and task tracking. Additionally, tasks can be created offline and will automatically synchronize with the server when the connection is restored.

Each task is represented by a Task object, which encapsulates all relevant data for individual tasks.

Samples

com.ale.rainbowsdk.samples.TasksSample

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val taskList: ArrayItemList<Task>

Retrieves the user's tasks.

Functions

Link copied to clipboard
abstract fun createTask(    text: String,     category: String,     additionalDescription: String? = null,     position: Int? = 0,     listener: RainbowListener<Task, TaskRepository.CreateTaskError>? = null)

Creates a Task associated with a specified category.

Link copied to clipboard
abstract fun createTaskFromMessage(    message: IMMessage,     conversation: IRainbowConversation,     category: String,     position: Int? = 0,     listener: RainbowListener<Task, TaskRepository.CreateTaskError>? = null)

Creates a Task associated with an IMMessage and a specific category.

Link copied to clipboard
abstract fun deleteTask(taskId: String, listener: RainbowListener<Unit, Unit>? = null)

Deletes a Task based on its unique ID.

Link copied to clipboard
abstract fun deleteTaskFromMessage(messageId: String, listener: RainbowListener<Unit, Unit>?)

Deletes a Task associated with a specific instant message.

Link copied to clipboard
abstract fun fetchTasks(category: String? = null, listener: RainbowListener<Map<String, List<Task>>, Unit>? = null)

Fetches tasks associated with the user, optionally filtered by category.

Link copied to clipboard
abstract fun updateTask(task: Task, listener: RainbowListener<Unit, Unit>? = null)

Updates the specified Task by directly modifying its properties.