api

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(clientID, clientSecret, code string) (string, error)

func GetAuthURL

func GetAuthURL(clientID string) string

Types

type Client

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

func GetClient

func GetClient() (*Client, error)

func NewClient

func NewClient(token string) *Client

func (*Client) CompleteTask

func (c *Client) CompleteTask(taskID string) error

func (*Client) CreateProject

func (c *Client) CreateProject(project *types.Project) (*types.Project, error)

func (*Client) CreateTask

func (c *Client) CreateTask(task *types.Task) (*types.Task, error)

func (*Client) DeleteProject

func (c *Client) DeleteProject(projectID string) error

func (*Client) DeleteTask

func (c *Client) DeleteTask(taskID string) error

func (*Client) FilterTasks added in v0.0.11

func (c *Client) FilterTasks(filter TaskFilter) ([]types.Task, error)

FilterTasks retrieves tasks using the filter endpoint (single API call).

func (*Client) GetProject

func (c *Client) GetProject(id string) (types.Project, error)

func (*Client) GetProjectWithTasks

func (c *Client) GetProjectWithTasks(projectID string) (*types.ProjectData, error)

func (*Client) GetTask

func (c *Client) GetTask(taskID string) (*types.Task, error)

GetTask fetches a task by ID, searching across all projects if needed.

func (*Client) ListProjects

func (c *Client) ListProjects() ([]types.Project, error)

func (*Client) ListTasks

func (c *Client) ListTasks(projectID string) ([]types.Task, error)

func (*Client) MoveTask added in v0.0.5

func (c *Client) MoveTask(taskID, fromProjectID, toProjectID string) error

MoveTask moves a task to a different project using the dedicated move endpoint.

func (*Client) ResolveProject

func (c *Client) ResolveProject(nameOrID string) (types.Project, error)

ResolveProject finds a project by ID or name. It tries an exact ID lookup first, then falls back to fuzzy name matching across all projects (exact → prefix → contains → Levenshtein).

func (*Client) UpdateProject

func (c *Client) UpdateProject(project types.Project) (types.Project, error)

func (*Client) UpdateTask

func (c *Client) UpdateTask(task *types.Task) (*types.Task, error)

type TaskFilter added in v0.0.11

type TaskFilter struct {
	ProjectIDs []string `json:"projectIds,omitempty"`
	StartDate  string   `json:"startDate,omitempty"`
	EndDate    string   `json:"endDate,omitempty"`
	Priority   []int    `json:"priority,omitempty"`
	Tag        []string `json:"tag,omitempty"`
	Status     []int    `json:"status,omitempty"`
}

TaskFilter specifies criteria for the filter tasks endpoint.

Jump to

Keyboard shortcuts

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