fetchTasks

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

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

This function retrieves tasks belonging to the connected user. If a category is specified, only tasks belonging to that category will be fetched. If no category is provided, all tasks will be retrieved.

The results are delivered to the provided listener as a map, where the key is the category name and the value is a list of tasks in that category. However, if you have already subscribed to changes in the taskList property, you can ignore the listener as the property will be updated automatically.

Parameters

category

An optional string representing the category to filter tasks by. If null, all tasks are fetched.

listener

An optional listener that will receive the results of the fetch operation. The listener receives a map of category names to lists of Task objects as its result.