Documentation
¶
Index ¶
- func GetAccessToken(clientID, clientSecret, code string) (string, error)
- func GetAuthURL(clientID string) string
- type Client
- func (c *Client) CompleteTask(taskID string) error
- func (c *Client) CreateProject(project *types.Project) (*types.Project, error)
- func (c *Client) CreateTask(task *types.Task) (*types.Task, error)
- func (c *Client) DeleteProject(projectID string) error
- func (c *Client) DeleteTask(taskID string) error
- func (c *Client) FilterTasks(filter TaskFilter) ([]types.Task, error)
- func (c *Client) GetProject(id string) (types.Project, error)
- func (c *Client) GetProjectWithTasks(projectID string) (*types.ProjectData, error)
- func (c *Client) GetTask(taskID string) (*types.Task, error)
- func (c *Client) ListProjects() ([]types.Project, error)
- func (c *Client) ListTasks(projectID string) ([]types.Task, error)
- func (c *Client) MoveTask(taskID, fromProjectID, toProjectID string) error
- func (c *Client) ResolveProject(nameOrID string) (types.Project, error)
- func (c *Client) UpdateProject(project types.Project) (types.Project, error)
- func (c *Client) UpdateTask(task *types.Task) (*types.Task, error)
- type TaskFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccessToken ¶
func GetAuthURL ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CompleteTask ¶
func (*Client) CreateProject ¶
func (*Client) DeleteProject ¶
func (*Client) DeleteTask ¶
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) GetProjectWithTasks ¶
func (c *Client) GetProjectWithTasks(projectID string) (*types.ProjectData, error)
func (*Client) GetTask ¶
GetTask fetches a task by ID.
It locates the task's project with a single filter call, then fetches the authoritative task from that project. This avoids the previous O(N) scan that issued one request per project. The filter endpoint omits some tasks (notably completed ones), so it falls back to scanning every project.
func (*Client) MoveTask ¶ added in v0.0.5
MoveTask moves a task to a different project using the dedicated move endpoint.
func (*Client) ResolveProject ¶
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 ¶
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.