api

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearTasks added in v0.12.0

func ClearTasks(srv *tasks.Service, tasklistID string) error

ClearTasks clears all completed tasks from a task list. Completed tasks are marked as hidden and no longer returned by default.

func CreateTask

func CreateTask(srv *tasks.Service, task *tasks.Task, tasklistID string) (*tasks.Task, error)

CreateTask used to create tasks

func DeleteTask

func DeleteTask(srv *tasks.Service, id string, tid string) error

DeleteTask used to delete a task

func DeleteTaskList

func DeleteTaskList(srv *tasks.Service, tID string) error

func GetService added in v0.9.7

func GetService() (*tasks.Service, error)

GetService creates a Google Tasks service client

func GetTaskInfo

func GetTaskInfo(srv *tasks.Service, id string, taskID string) (*tasks.Task, error)

GetTaskInfo to get more info about a task

func GetTaskLists

func GetTaskLists(srv *tasks.Service) ([]tasks.TaskList, error)

func GetTasks

func GetTasks(srv *tasks.Service, id string, includeCompleted bool, maxResults int) ([]*tasks.Task, error)

GetTasks used to retreive tasks. If maxResults is 0, fetches all tasks with pagination. If maxResults > 0, limits the number of tasks returned.

func Login added in v0.9.7

func Login() error

Login performs OAuth2 authentication using PKCE + localhost flow

func Logout added in v0.9.7

func Logout() error

Logout removes stored authentication token

func MakeMap

func MakeMap(taskList []*tasks.Task) map[string]tasks.Task

func UpdateTask

func UpdateTask(srv *tasks.Service, t *tasks.Task, tListID string) (*tasks.Task, error)

UpdateTask used to update task data

func UpdateTaskList

func UpdateTaskList(srv *tasks.Service, tl *tasks.TaskList) (*tasks.TaskList, error)

Types

type TaskList

type TaskList []tasks.TaskList

func (TaskList) Len

func (e TaskList) Len() int

func (TaskList) Less

func (e TaskList) Less(i, j int) bool

func (TaskList) Swap

func (e TaskList) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL