Documentation
¶
Overview ¶
Package apiv2 provides typed wrappers for ClickUp API v2 operations that are missing from the go-clickup library.
go-clickup handles most V2 operations correctly. This package fills the gaps documented in api/GO_CLICKUP_GAPS.md:
- UpdateTask with points and markdown_content
- Time entry CRUD
- Comment replies (threaded comments)
- Space tags
All wrappers use the existing api.Client for HTTP transport (auth, rate limiting) and auto-generated clickupv2 types for request/response serialization.
Index ¶
- func AddDependencyLocal(ctx context.Context, client *api.Client, taskID string, body any, qs string) error
- func CreateTaskLocal(ctx context.Context, client *api.Client, listID string, ...) (*clickup.Task, error)
- func DeleteDependencyLocal(ctx context.Context, client *api.Client, taskID, qs string) error
- func DeleteTaskLocal(ctx context.Context, client *api.Client, taskID, qs string) error
- func DependencyQuery(dependsOn, dependencyOf string, customTaskIDs bool, teamID string) string
- func Do(ctx context.Context, client *api.Client, method, path string, body any, ...) error
- func FetchTeamTasks(ctx context.Context, client *api.Client, teamID string, page int, ...) ([]clickup.Task, error)
- func GetAccessibleCustomFieldsLocal(ctx context.Context, client *api.Client, listID string) ([]clickup.CustomField, error)
- func GetFilteredTeamTasksLocal(ctx context.Context, client *api.Client, teamID string, ...) ([]clickup.Task, error)
- func GetFolderlessListsLocal(ctx context.Context, client *api.Client, spaceID string, archived bool) ([]clickup.List, error)
- func GetFoldersLocal(ctx context.Context, client *api.Client, spaceID string, archived bool) ([]clickup.Folder, error)
- func GetListLocal(ctx context.Context, client *api.Client, listID string) (*clickup.List, error)
- func GetListsLocal(ctx context.Context, client *api.Client, folderID string, archived bool) ([]clickup.List, error)
- func GetSpacesLocal(ctx context.Context, client *api.Client, teamID string, archived bool) ([]clickup.Space, error)
- func GetTaskLocal(ctx context.Context, client *api.Client, taskID, qs string) (*clickup.Task, error)
- func GetTasksLocal(ctx context.Context, client *api.Client, listID, qs string) ([]clickup.Task, error)
- func GetTeamsLocal(ctx context.Context, client *api.Client) ([]clickup.Team, error)
- func RemoveCustomFieldValueLocal(ctx context.Context, client *api.Client, taskID, fieldID, qs string) error
- func SetCustomFieldValueLocal(ctx context.Context, client *api.Client, taskID, fieldID string, value any, ...) error
- func TaskQuery(customTaskIDs bool, teamID string, includeSubtasks bool) string
- func TaskQueryMD(customTaskIDs bool, teamID string) string
- func UpdateTaskLocal(ctx context.Context, client *api.Client, taskID string, req any, qs string) (*clickup.Task, error)
- type AttachmentResponse
- type CreateTaskAttachmentParams
- type FilteredTeamTasksParams
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDependencyLocal ¶
func AddDependencyLocal(ctx context.Context, client *api.Client, taskID string, body any, qs string) error
AddDependencyLocal adds a dependency to a task.
func CreateTaskLocal ¶
func CreateTaskLocal(ctx context.Context, client *api.Client, listID string, req *clickup.TaskRequest, qs string) (*clickup.Task, error)
CreateTaskLocal creates a task in a list.
func DeleteDependencyLocal ¶
DeleteDependencyLocal deletes a dependency from a task.
func DeleteTaskLocal ¶
DeleteTaskLocal deletes a task.
func DependencyQuery ¶
DependencyQuery builds a query string for dependency endpoints.
func Do ¶
Do is a public wrapper around the unexported do() helper, for use by the attachments module.
func FetchTeamTasks ¶
func FetchTeamTasks(ctx context.Context, client *api.Client, teamID string, page int, extraParams string) ([]clickup.Task, error)
FetchTeamTasks fetches one page of tasks from the team endpoint with optional extra query params. Used by inbox and view for paginated team task fetching.
func GetAccessibleCustomFieldsLocal ¶
func GetAccessibleCustomFieldsLocal(ctx context.Context, client *api.Client, listID string) ([]clickup.CustomField, error)
GetAccessibleCustomFieldsLocal fetches accessible custom fields for a list.
func GetFilteredTeamTasksLocal ¶
func GetFilteredTeamTasksLocal(ctx context.Context, client *api.Client, teamID string, params FilteredTeamTasksParams) ([]clickup.Task, error)
GetFilteredTeamTasksLocal fetches filtered tasks across a team/workspace.
func GetFolderlessListsLocal ¶
func GetFolderlessListsLocal(ctx context.Context, client *api.Client, spaceID string, archived bool) ([]clickup.List, error)
GetFolderlessListsLocal fetches folderless lists for a space.
func GetFoldersLocal ¶
func GetFoldersLocal(ctx context.Context, client *api.Client, spaceID string, archived bool) ([]clickup.Folder, error)
GetFoldersLocal fetches folders for a space.
func GetListLocal ¶
GetListLocal fetches a single list.
func GetListsLocal ¶
func GetListsLocal(ctx context.Context, client *api.Client, folderID string, archived bool) ([]clickup.List, error)
GetListsLocal fetches lists for a folder.
func GetSpacesLocal ¶
func GetSpacesLocal(ctx context.Context, client *api.Client, teamID string, archived bool) ([]clickup.Space, error)
GetSpacesLocal fetches spaces for a team.
func GetTaskLocal ¶
func GetTaskLocal(ctx context.Context, client *api.Client, taskID, qs string) (*clickup.Task, error)
GetTaskLocal fetches a single task. qs is a query string (e.g. from TaskQuery).
func GetTasksLocal ¶
func GetTasksLocal(ctx context.Context, client *api.Client, listID, qs string) ([]clickup.Task, error)
GetTasksLocal fetches tasks from a list. qs is a query string.
func GetTeamsLocal ¶
GetTeamsLocal fetches all teams (workspaces).
func RemoveCustomFieldValueLocal ¶
func RemoveCustomFieldValueLocal(ctx context.Context, client *api.Client, taskID, fieldID, qs string) error
RemoveCustomFieldValueLocal removes a custom field value from a task.
func SetCustomFieldValueLocal ¶
func SetCustomFieldValueLocal(ctx context.Context, client *api.Client, taskID, fieldID string, value any, qs string) error
SetCustomFieldValueLocal sets a custom field value on a task.
func TaskQuery ¶
TaskQuery builds a query string for task endpoints supporting custom task IDs and optional subtask inclusion.
func TaskQueryMD ¶
TaskQueryMD builds a query string like TaskQuery but also includes include_markdown_description=true.
Types ¶
type AttachmentResponse ¶
type AttachmentResponse struct {
ID string `json:"id"`
Version string `json:"version"`
Date int `json:"date"`
Title string `json:"title"`
Extension string `json:"extension"`
ThumbnailSmall string `json:"thumbnail_small"`
ThumbnailLarge string `json:"thumbnail_large"`
URL string `json:"url"`
}
AttachmentResponse is the response from CreateTaskAttachment.
func CreateTaskAttachment ¶
func CreateTaskAttachment(ctx context.Context, client *api.Client, taskID, filename string, reader io.Reader, params ...CreateTaskAttachmentParams) (*AttachmentResponse, error)
CreateTaskAttachment uploads a file as an attachment to a task.
type CreateTaskAttachmentParams ¶
CreateTaskAttachmentParams holds optional parameters for attachment upload.
type FilteredTeamTasksParams ¶
type FilteredTeamTasksParams struct {
OrderBy string
Reverse bool
Subtasks bool
Assignees []string
Page int
ListIDs []string
Statuses []string
Tags []string
DateUpdGt int64
DateUpdLt int64
DateCreatedGt int64
DateCreatedLt int64
DueDateGt int64
DueDateLt int64
IncludeClosed bool
Archived bool
}
FilteredTeamTasksParams holds parameters for GetFilteredTeamTasksLocal.