todoist

package
v0.0.0-...-a68581b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string, httpClient HTTPClient, retriesCount int, retriesDelay time.Duration, log Logger) *Client

func (*Client) GetTasksV2

func (c *Client) GetTasksV2(ctx context.Context, isCompleted bool) ([]Task, error)

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type Logger

type Logger interface {
	DebugContext(ctx context.Context, msg string, fields ...any)
	InfoContext(ctx context.Context, msg string, fields ...any)
	WarnContext(ctx context.Context, msg string, fields ...any)
}

type Task

type Task struct {
	ID        string   `json:"id"`
	ProjectID string   `json:"project_id"`
	Content   string   `json:"content"`
	Priority  int      `json:"priority"`
	Due       *TaskDue `json:"due"`
}

type TaskDue

type TaskDue struct {
	Date string `json:"date"`
}

Jump to

Keyboard shortcuts

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