api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 14 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
}

Client wraps the ClickUp API client

func NewClient

func NewClient() (*Client, error)

NewClient creates a new API client

func (*Client) CreateTask

func (c *Client) CreateTask(ctx context.Context, listID string, options *TaskCreateOptions) (*clickup.Task, error)

CreateTask creates a new task with simplified options

func (*Client) CreateTaskComment

func (c *Client) CreateTaskComment(ctx context.Context, taskID string, text string, assignee string, notifyAll bool) (*clickup.CreateCommentResponse, error)

CreateTaskComment creates a new comment on a task

func (*Client) DeleteTask

func (c *Client) DeleteTask(ctx context.Context, taskID string) error

DeleteTask deletes a task

func (*Client) DeleteTaskComment

func (c *Client) DeleteTaskComment(ctx context.Context, commentID string) error

DeleteTaskComment deletes a comment

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (*clickup.User, error)

GetCurrentUser returns the authenticated user

func (*Client) GetFolderlessLists

func (c *Client) GetFolderlessLists(ctx context.Context, spaceID string) ([]clickup.List, error)

GetFolderlessLists returns lists directly in a space (not in folders)

func (*Client) GetFolders

func (c *Client) GetFolders(ctx context.Context, spaceID string) ([]clickup.Folder, error)

GetFolders returns all folders in a space

func (*Client) GetLists

func (c *Client) GetLists(ctx context.Context, folderID string) ([]clickup.List, error)

GetLists returns all lists in a folder or space

func (*Client) GetSpaces

func (c *Client) GetSpaces(ctx context.Context, workspaceID string) ([]clickup.Space, error)

GetSpaces returns all spaces in a workspace

func (*Client) GetTask

func (c *Client) GetTask(ctx context.Context, taskID string) (*clickup.Task, error)

GetTask returns a single task

func (*Client) GetTaskComments

func (c *Client) GetTaskComments(ctx context.Context, taskID string) ([]clickup.Comment, error)

GetTaskComments retrieves all comments for a task

func (*Client) GetTasks

func (c *Client) GetTasks(ctx context.Context, listID string, options *TaskQueryOptions) ([]clickup.Task, error)

GetTasks returns tasks based on query options

func (*Client) GetWorkspaceMembers

func (c *Client) GetWorkspaceMembers(ctx context.Context, workspaceID string) ([]clickup.TeamUser, error)

GetWorkspaceMembers returns all members of a workspace

func (*Client) GetWorkspaces

func (c *Client) GetWorkspaces(ctx context.Context) ([]clickup.Team, error)

GetWorkspaces returns all workspaces the user has access to

func (*Client) UpdateTask

func (c *Client) UpdateTask(ctx context.Context, taskID string, options *TaskUpdateOptions) (*clickup.Task, error)

UpdateTask updates an existing task with simplified options

func (*Client) UpdateTaskComment

func (c *Client) UpdateTaskComment(ctx context.Context, commentID string, text string, resolved bool) error

UpdateTaskComment updates an existing comment

func (*Client) UserLookup

func (c *Client) UserLookup() *UserLookup

UserLookup returns the user lookup service

type RateLimiter

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

RateLimiter implements a token bucket rate limiter

func NewRateLimiter

func NewRateLimiter(maxRequests int, per time.Duration) *RateLimiter

NewRateLimiter creates a new rate limiter

func (*RateLimiter) Wait

func (r *RateLimiter) Wait(ctx context.Context) error

Wait blocks until a token is available or context is cancelled

type TaskCreateOptions

type TaskCreateOptions struct {
	Name        string
	Description string
	Assignees   []string
	Status      string
	Priority    string
	Tags        []string
	DueDate     string
}

TaskCreateOptions represents options for creating a task

type TaskQueryOptions

type TaskQueryOptions struct {
	Page      int
	Assignees []string
	Statuses  []string
	Tags      []string
	Priority  *int
	DueDate   *time.Time
}

TaskQueryOptions represents options for querying tasks

type TaskUpdateOptions

type TaskUpdateOptions struct {
	Name            string
	Description     string
	Status          string
	Priority        string
	Tags            []string
	DueDate         string
	AddAssignees    []string
	RemoveAssignees []string
}

TaskUpdateOptions represents options for updating a task

func (*TaskUpdateOptions) HasUpdates

func (o *TaskUpdateOptions) HasUpdates() bool

HasUpdates checks if any updates are specified

type UserLookup

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

UserLookup provides user ID lookup functionality

func NewUserLookup

func NewUserLookup(client *Client) *UserLookup

NewUserLookup creates a new user lookup service

func (*UserLookup) ConvertUsernamesToIDs

func (ul *UserLookup) ConvertUsernamesToIDs(usernames []string) ([]int, error)

ConvertUsernamesToIDs converts a list of usernames to user IDs

func (*UserLookup) GetAllUsers

func (ul *UserLookup) GetAllUsers() []*clickup.TeamUser

GetAllUsers returns all cached users

func (*UserLookup) LoadWorkspaceUsers

func (ul *UserLookup) LoadWorkspaceUsers(ctx context.Context, workspaceID string) error

LoadWorkspaceUsers loads all users from a workspace into cache

func (*UserLookup) LookupByID

func (ul *UserLookup) LookupByID(userID int) (*clickup.TeamUser, error)

LookupByID finds a user by ID

func (*UserLookup) LookupByUsername

func (ul *UserLookup) LookupByUsername(username string) (*clickup.TeamUser, error)

LookupByUsername finds a user by username (case-insensitive)

Jump to

Keyboard shortcuts

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