Documentation ¶
Index ¶
- Constants
- Variables
- func VerifyWebhookSignature(webhookRequest *http.Request, secret string) (*webhookVerifyResult, error)
- type APITokenAuthenticator
- type AddDependencyRequest
- type AddTaskLinkRequest
- type AttachmentParams
- type Attributes
- type Authenticator
- type ChecklistResponse
- type Checklists
- type Client
- func (c *Client) AddDependencyForTask(ctx context.Context, dependency AddDependencyRequest) error
- func (c *Client) AddTaskLinkForTask(ctx context.Context, link AddTaskLinkRequest) (*TaskLinkResponse, error)
- func (c *Client) AuthenticateFor(req *http.Request) error
- func (c *Client) BulkTaskTimeInStatus(ctx context.Context, taskIDs []string, workspaceID string, ...) (map[string]TaskTimeInStatusResponse, error)
- func (c *Client) ChatViewComments(ctx context.Context, query CommentsForTaskViewQuery) (CommentsResponse, error)
- func (c *Client) CreateChatViewComment(ctx context.Context, comment CreateChatViewCommentRequest) (*CreateChatViewCommentResponse, error)
- func (c *Client) CreateChecklist(ctx context.Context, request *CreateChecklistRequest) (*ChecklistResponse, error)
- func (c *Client) CreateChecklistItem(ctx context.Context, request *CreateChecklistItemRequest) (*ChecklistResponse, error)
- func (c *Client) CreateGoal(ctx context.Context, goal CreateGoalRequest) (*CreateGoalResponse, error)
- func (c *Client) CreateGroup(ctx context.Context, group CreateGroupRequest) (*CreateGroupResponse, error)
- func (c *Client) CreateKeyResultForGoal(ctx context.Context, keyResult CreateKeyResultRequest) (*CreateKeyResultResponse, error)
- func (c *Client) CreateListComment(ctx context.Context, comment CreateListCommentRequest) (*CreateListCommentResponse, error)
- func (c *Client) CreateSpaceForWorkspace(ctx context.Context, space CreateSpaceRequest) (*SingleSpace, error)
- func (c *Client) CreateSpaceTag(ctx context.Context, spaceID string, tag Tag) error
- func (c *Client) CreateTask(ctx context.Context, listID string, task TaskRequest) (*SingleTask, error)
- func (c *Client) CreateTaskAttachment(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs bool, ...) (*CreateAttachmentResponse, error)
- func (c *Client) CreateTaskComment(ctx context.Context, comment CreateTaskCommentRequest) (*CreateTaskCommentResponse, error)
- func (c *Client) CreateTaskFromTemplate(ctx context.Context, task TaskFromTemplateRequest) (*TaskFromTemplateResponse, error)
- func (c *Client) CreateWebhook(ctx context.Context, workspaceID string, webhook *CreateWebhookRequest) (*CreateWebhookResponse, error)
- func (c *Client) DeleteChecklist(ctx context.Context, checklistID string) error
- func (c *Client) DeleteChecklistItem(ctx context.Context, checklistID, checklistItemID string) error
- func (c *Client) DeleteComment(ctx context.Context, commentID string) error
- func (c *Client) DeleteGoal(ctx context.Context, goalID string) error
- func (c *Client) DeleteGroup(ctx context.Context, groupID string) error
- func (c *Client) DeleteKeyResult(ctx context.Context, keyResultID string) error
- func (c *Client) DeleteSpace(ctx context.Context, spaceID string) error
- func (c *Client) DeleteTask(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs bool) error
- func (c *Client) DeleteView(ctx context.Context, viewID string) error
- func (c *Client) DeleteWebhook(ctx context.Context, webhookID string) error
- func (c *Client) FolderByID(ctx context.Context, folderID string) (*SingleFolder, error)
- func (c *Client) FoldersForSpace(ctx context.Context, workspaceID string, includeArchived bool) (*FoldersResponse, error)
- func (c *Client) GoalForWorkSpace(ctx context.Context, goalID string) (*GoalResponse, error)
- func (c *Client) GoalsForWorkspace(ctx context.Context, workspaceID string, includeCompleted bool) (*GetGoalsResponse, error)
- func (c *Client) GroupsForWorkspace(ctx context.Context, workspaceID string, optionalGroupIDs ...string) (*GroupsQueryResponse, error)
- func (c *Client) ListByID(ctx context.Context, listID string) (*SingleList, error)
- func (c *Client) ListComments(ctx context.Context, query CommentsForListQuery) (CommentsResponse, error)
- func (c *Client) ListsForFolder(ctx context.Context, folderID string, includeArchived bool) (*ListsResponse, error)
- func (c *Client) SharedHierarchy(ctx context.Context, workspaceID string) (*SharedHierarchyResponse, error)
- func (c *Client) SpaceByID(ctx context.Context, spaceID string) (*SingleSpace, error)
- func (c *Client) SpacesForWorkspace(ctx context.Context, teamID string, includeArchived bool) (*SpacesResponse, error)
- func (c *Client) TagsForSpace(ctx context.Context, spaceID string) (*TagsQueryResponse, error)
- func (c *Client) TaskByID(ctx context.Context, taskID, workspaceID string, ...) (*SingleTask, error)
- func (c *Client) TaskComments(ctx context.Context, query CommentsForTaskQuery) (CommentsResponse, error)
- func (c *Client) TaskTimeInStatus(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs bool) (*TaskTimeInStatusResponse, error)
- func (c *Client) TasksForList(ctx context.Context, listID string, queryOpts *TaskQueryOptions) (*GetTasksResponse, error)
- func (c *Client) TasksForView(ctx context.Context, viewID string, page int) (*TasksForViewResponse, error)
- func (c *Client) Teams(ctx context.Context) (*TeamsResponse, error)
- func (c *Client) TeamsForWorkspace(ctx context.Context) (*TeamsResponse, error)
- func (c *Client) TemplatesForWorkspace(ctx context.Context, workspaceID string, page int) (*TemplatesResponse, error)
- func (c *Client) UpdateChecklist(ctx context.Context, request *UpdateChecklistRequest) (*ChecklistResponse, error)
- func (c *Client) UpdateChecklistItem(ctx context.Context, request *UpdateChecklistItemRequest) (*ChecklistResponse, error)
- func (c *Client) UpdateComment(ctx context.Context, comment UpdateCommentRequest) error
- func (c *Client) UpdateGoal(ctx context.Context, goal UpdateGoalRequest) (*UpdateGoalResponse, error)
- func (c *Client) UpdateGroup(ctx context.Context, group UpdateGroupRequest) (*UpdateGroupResponse, error)
- func (c *Client) UpdateKeyResult(ctx context.Context, keyResult UpdateKeyResultRequest) (*UpdateKeyResultResponse, error)
- func (c *Client) UpdateSpaceForWorkspace(ctx context.Context, space UpdateSpaceRequest) (*SingleSpace, error)
- func (c *Client) UpdateSpaceTag(ctx context.Context, spacID, tag Tag) error
- func (c *Client) UpdateTask(ctx context.Context, task *TaskUpdateRequest, workspaceID string, ...) (*SingleTask, error)
- func (c *Client) UpdateWebhook(ctx context.Context, webhook *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
- func (c *Client) ViewByID(ctx context.Context, viewID string) (*GetViewResponse, error)
- func (c *Client) ViewsFor(ctx context.Context, viewListType ViewListType, id string) (*GetViewsResponse, error)
- func (c *Client) WebhooksFor(ctx context.Context, workspaceID string) (*WebhooksQueryResponse, error)
- type ClientDoer
- type ClientOpts
- type CodeBlock
- type CommentsForListQuery
- type CommentsForTaskQuery
- type CommentsForTaskViewQuery
- type CommentsQuery
- type CommentsResponse
- type ComplexComment
- type CreateAttachmentResponse
- type CreateChatViewCommentRequest
- type CreateChatViewCommentResponse
- type CreateChecklistItemRequest
- type CreateChecklistRequest
- type CreateCommentRequest
- type CreateCommentResponse
- type CreateGoalRequest
- type CreateGoalResponse
- type CreateGroupRequest
- type CreateGroupResponse
- type CreateKeyResultRequest
- type CreateKeyResultResponse
- type CreateListCommentRequest
- type CreateListCommentResponse
- type CreateSpaceRequest
- type CreateTaskCommentRequest
- type CreateTaskCommentResponse
- type CreateWebhookRequest
- type CreateWebhookResponse
- type CustomFieldInfo
- type CustomFields
- type DependencyWarning
- type DueDates
- type Emoticon
- type ErrClickupResponse
- type Features
- type FoldersResponse
- type GetGoalsResponse
- type GetTasksResponse
- type GetViewResponse
- type GetViewsResponse
- type GoalResponse
- type Group
- type GroupsQueryResponse
- type HTTPError
- type KeyResult
- type KeyResultType
- type List
- type ListsResponse
- type OrderByVal
- type Portfolios
- type RateLimitError
- type RemapDependencies
- type SharedHierarchyResponse
- type SingleFolder
- type SingleList
- type SingleSpace
- type SingleTask
- type SingleView
- type SpacesResponse
- type Status
- type Tag
- type Tags
- type TagsQueryResponse
- type TaskFromTemplateRequest
- type TaskFromTemplateResponse
- type TaskLinkResponse
- type TaskQueryOptions
- type TaskRequest
- type TaskTimeInStatusResponse
- type TaskUpdateRequest
- type TasksForViewResponse
- type Team
- type TeamMember
- type TeamUser
- type TeamsResponse
- type Template
- type TemplatesResponse
- type TimeEstimates
- type TimeTracking
- type UpdateChecklistItemRequest
- type UpdateChecklistRequest
- type UpdateCommentRequest
- type UpdateGoalRequest
- type UpdateGoalResponse
- type UpdateGroupRequest
- type UpdateGroupResponse
- type UpdateKeyResultRequest
- type UpdateKeyResultResponse
- type UpdateSpaceRequest
- type UpdateWebhookRequest
- type UpdateWebhookResponse
- type ViewListType
- type Webhook
- type WebhookEvent
- type WebhookEventMessage
- type WebhookHealth
- type WebhooksQueryResponse
Constants ¶
const (
MaxPageSize = 100
)
Variables ¶
var ErrValidation = errors.New("invalid input provided")
Functions ¶
func VerifyWebhookSignature ¶
func VerifyWebhookSignature(webhookRequest *http.Request, secret string) (*webhookVerifyResult, error)
VerifyWebhookSignature compares a generated signature using secret that is returned with the webhook CRUD operations with the x-signature http header that is sent with the http request to the webhook endpoint. It should be noted that err will be nil even if the signature is not valid, thus the WebhookVerifyResult.ValidSignature() should be called.
Types ¶
type APITokenAuthenticator ¶
type APITokenAuthenticator struct {
APIToken string
}
func (*APITokenAuthenticator) AuthenticateFor ¶
func (d *APITokenAuthenticator) AuthenticateFor(req *http.Request) error
AuthenticateFor adds an API token to the Authorization header of req.
type AddDependencyRequest ¶
type AddTaskLinkRequest ¶
type AttachmentParams ¶
type Attributes ¶
type Authenticator ¶
Authenticator adds authentication details to an http.Request. Typically the Authorization header will be added by the implementation.
type ChecklistResponse ¶
type ChecklistResponse struct { Checklist struct { ID string `json:"id"` TaskID string `json:"task_id"` Name string `json:"name"` DateCreated string `json:"date_created"` Orderindex int `json:"-"` Creator int `json:"creator"` Resolved int `json:"resolved"` Unresolved int `json:"unresolved"` Items []struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` Assignee TeamUser `json:"assignee"` Resolved bool `json:"resolved"` DateCreated string `json:"date_created"` } `json:"items"` } `json:"checklist"` }
type Checklists ¶
type Checklists struct {
Enabled bool `json:"enabled,omitempty"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts *ClientOpts) *Client
NewClient initializes and returns a pointer to a Client. If opts.Doer is not provided, an http.Client with a 20 seconds timeout is used. If opts.Authenticator is not provided, an APITokenAuthenticator is used.
func (*Client) AddDependencyForTask ¶
func (c *Client) AddDependencyForTask(ctx context.Context, dependency AddDependencyRequest) error
func (*Client) AddTaskLinkForTask ¶
func (c *Client) AddTaskLinkForTask(ctx context.Context, link AddTaskLinkRequest) (*TaskLinkResponse, error)
func (*Client) AuthenticateFor ¶
wrapper for internal authenticator for convenience <shrug>.
func (*Client) BulkTaskTimeInStatus ¶
func (c *Client) BulkTaskTimeInStatus(ctx context.Context, taskIDs []string, workspaceID string, useCustomTaskIDs bool) (map[string]TaskTimeInStatusResponse, error)
BulkTaskTimeInStatus returns task status history data for the provided taskIDs. Must provide >= 2 and <= 100 task IDs at a time.
func (*Client) ChatViewComments ¶
func (c *Client) ChatViewComments(ctx context.Context, query CommentsForTaskViewQuery) (CommentsResponse, error)
func (*Client) CreateChatViewComment ¶
func (c *Client) CreateChatViewComment(ctx context.Context, comment CreateChatViewCommentRequest) (*CreateChatViewCommentResponse, error)
CreateChatViewComment appends a new comment to a chat that on a view.
func (*Client) CreateChecklist ¶
func (c *Client) CreateChecklist(ctx context.Context, request *CreateChecklistRequest) (*ChecklistResponse, error)
CreateChecklist adds a new checklist to the specified task id in request.
func (*Client) CreateChecklistItem ¶
func (c *Client) CreateChecklistItem(ctx context.Context, request *CreateChecklistItemRequest) (*ChecklistResponse, error)
CreateChecklistItem appends a line item to an existing checklist using ChecklistID on request.
func (*Client) CreateGoal ¶
func (c *Client) CreateGoal(ctx context.Context, goal CreateGoalRequest) (*CreateGoalResponse, error)
CreateGoal adds a new goal to the Clickup workspace using goal.WorkspaceID.
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(ctx context.Context, group CreateGroupRequest) (*CreateGroupResponse, error)
CreateGroup adds a new group to a workspace using group.WorkspaceID.
func (*Client) CreateKeyResultForGoal ¶
func (c *Client) CreateKeyResultForGoal(ctx context.Context, keyResult CreateKeyResultRequest) (*CreateKeyResultResponse, error)
CreateKeyResultForGoal appends a key result to a goal with keyResult.GoalID.
func (*Client) CreateListComment ¶
func (c *Client) CreateListComment(ctx context.Context, comment CreateListCommentRequest) (*CreateListCommentResponse, error)
CreateListComment appends a new comment to a List.
func (*Client) CreateSpaceForWorkspace ¶
func (c *Client) CreateSpaceForWorkspace(ctx context.Context, space CreateSpaceRequest) (*SingleSpace, error)
CreateSpaceForWorkspace uses the parameters from space to create a new space in the specified workspace.
func (*Client) CreateSpaceTag ¶
CreateSpaceTag adds a new tag to the space with spaceID.
func (*Client) CreateTask ¶
func (c *Client) CreateTask(ctx context.Context, listID string, task TaskRequest) (*SingleTask, error)
CreateTask inserts a new task into the specified list.
func (*Client) CreateTaskAttachment ¶
func (c *Client) CreateTaskAttachment(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs bool, params *AttachmentParams) (*CreateAttachmentResponse, error)
CreateTaskAttachment attaches a binary document such as an image, text file, etc. to a specific Clickup task using the io.Reader on params.
func (*Client) CreateTaskComment ¶
func (c *Client) CreateTaskComment(ctx context.Context, comment CreateTaskCommentRequest) (*CreateTaskCommentResponse, error)
CreateTaskComment appends a new comment to the task specified in comment.
func (*Client) CreateTaskFromTemplate ¶
func (c *Client) CreateTaskFromTemplate(ctx context.Context, task TaskFromTemplateRequest) (*TaskFromTemplateResponse, error)
CreateTaskFromTemplate creates a new task based on the template id specified in the TaskFromTemplateRequest. The new task will be created in the list specified by ListID in the TaskFromTemplateRequest.
func (*Client) CreateWebhook ¶
func (c *Client) CreateWebhook(ctx context.Context, workspaceID string, webhook *CreateWebhookRequest) (*CreateWebhookResponse, error)
CreateWebhook activates a new webhook for workspaceID using the parameters of webhook. You can scope the webhook to a list, folder, or even specific task by setting the appropriate ID fields on webhook (CreateWebhookRequest). See WebhookEvent for a listing of optional event types. The caller should keep track of the Secret provided with the CreateWebhookResponse to compare against the signature sent in a webhook's message body.
func (*Client) DeleteChecklist ¶
DeleteChecklist removes an existing checklist based on checklistID.
func (*Client) DeleteChecklistItem ¶
func (c *Client) DeleteChecklistItem(ctx context.Context, checklistID, checklistItemID string) error
DeleteChecklistItem removes an existing checklist item using checklistID and checklistItemID.
func (*Client) DeleteComment ¶
DeleteComment deletes the existing comment specified with commentID.
func (*Client) DeleteGoal ¶
DeleteGoal removes an existing goal from the workspace based on goalID.
func (*Client) DeleteGroup ¶
DeleteGroup removes an existing group with an id of groupID.
func (*Client) DeleteKeyResult ¶
DeleteKeyResult removes an existing key result from a goal.
func (*Client) DeleteSpace ¶
DeleteSpace removes an existing space using spaceID.
func (*Client) DeleteTask ¶
func (c *Client) DeleteTask(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs bool) error
DeleteTask removes an existing task.
func (*Client) DeleteView ¶
DeleteView removes an existing view with viewID.
func (*Client) DeleteWebhook ¶
DeleteWebhook removes an existing webhook.
func (*Client) FolderByID ¶
FolderByID queries a single folder with folderID.
func (*Client) FoldersForSpace ¶
func (c *Client) FoldersForSpace(ctx context.Context, workspaceID string, includeArchived bool) (*FoldersResponse, error)
FoldersForSpace queries all folders for a workspace.
func (*Client) GoalForWorkSpace ¶
GoalForWorkSpace returns data about a single goal based on goalID.
func (*Client) GoalsForWorkspace ¶
func (c *Client) GoalsForWorkspace(ctx context.Context, workspaceID string, includeCompleted bool) (*GetGoalsResponse, error)
GoalsForWorkspace queries all goals in a workspace using workspaceID. Completed goals will be returned if includeCompleted is true.
func (*Client) GroupsForWorkspace ¶
func (c *Client) GroupsForWorkspace(ctx context.Context, workspaceID string, optionalGroupIDs ...string) (*GroupsQueryResponse, error)
GroupsForWorkspace queries for any groups in a workspace and returns their corresponding data. optionalGroupIDs can be provided to narrow the data returned to the explicit groups quried.
func (*Client) ListComments ¶
func (c *Client) ListComments(ctx context.Context, query CommentsForListQuery) (CommentsResponse, error)
func (*Client) ListsForFolder ¶
func (c *Client) ListsForFolder(ctx context.Context, folderID string, includeArchived bool) (*ListsResponse, error)
ListsForfolder returns any lists associated to folderID. Use includeArchived to return archived lists.
func (*Client) SharedHierarchy ¶
func (c *Client) SharedHierarchy(ctx context.Context, workspaceID string) (*SharedHierarchyResponse, error)
SharedHierarchy returns resources that the authenticated user has access to, but not to its parent. From the ClickUp documentation: "Returns all resources you have access to where you don't have access to its parent. For example, if you have a access to a shared task, but don't have access to its parent list, it will come back in this request."
func (*Client) SpacesForWorkspace ¶
func (*Client) TagsForSpace ¶
TagsForSpace returns a listing of tags associated to the space using spaceID.
func (*Client) TaskByID ¶
func (c *Client) TaskByID(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs, includeSubtasks bool) (*SingleTask, error)
TaskByID queries a single task.
func (*Client) TaskComments ¶
func (c *Client) TaskComments(ctx context.Context, query CommentsForTaskQuery) (CommentsResponse, error)
func (*Client) TaskTimeInStatus ¶
func (c *Client) TaskTimeInStatus(ctx context.Context, taskID, workspaceID string, useCustomTaskIDs bool) (*TaskTimeInStatusResponse, error)
TaskTimeInStatus returns status history for taskID. useCustomTaskIDs should be true if querying with a custom ID.
func (*Client) TasksForList ¶
func (c *Client) TasksForList(ctx context.Context, listID string, queryOpts *TaskQueryOptions) (*GetTasksResponse, error)
TasksForList returns a listing of tasks that belong to the specified listID and fall withing the constraints of queryOpts. Clickup has some rather informal paging, so the caller is responsible for inspecting the count of tasks returned, and incrementing the Page in queryOpts if the number of tasks is 100. ie. if the current page returns 100 tasks (the maximum page size), then another query should be made to get the next page.
func (*Client) TasksForView ¶
func (c *Client) TasksForView(ctx context.Context, viewID string, page int) (*TasksForViewResponse, error)
TasksForView requires possible pagination. Clickup documents that a page will have a maximum of 30 tasks per page, defaulting to page 0. This endpoint returns a boolean specifying whether or not the response consists of the last page (TasksForViewResponse.LastPage = true/false).
func (*Client) Teams ¶
func (c *Client) Teams(ctx context.Context) (*TeamsResponse, error)
Teams returns a listing of teams for the authenticated user (the Client).
func (*Client) TeamsForWorkspace ¶
func (c *Client) TeamsForWorkspace(ctx context.Context) (*TeamsResponse, error)
TeamsForWorkspace is exactly the same as Teams() and simply calls it. This method is to maintain consistent naming with other Teams related parts of the API. I would do it differently if I went back in time.
func (*Client) TemplatesForWorkspace ¶
func (c *Client) TemplatesForWorkspace(ctx context.Context, workspaceID string, page int) (*TemplatesResponse, error)
TemplatesForWorkspace returns all templates for the workspace ID provided that the authenticated user is authorized to see. Specify the page number with page, starting with 0. TODO: ClickUp does not document what the max page is and there is no straightforward way to know. At this time, the page parameter doesn't seem to do anything.
func (*Client) UpdateChecklist ¶
func (c *Client) UpdateChecklist(ctx context.Context, request *UpdateChecklistRequest) (*ChecklistResponse, error)
UpdateChecklist makes changes to an existing checklist based on the fields set in request.
func (*Client) UpdateChecklistItem ¶
func (c *Client) UpdateChecklistItem(ctx context.Context, request *UpdateChecklistItemRequest) (*ChecklistResponse, error)
UpdateChecklistItem updates an existing checklist item based on ChecklistID and ChecklistItemID on request.
func (*Client) UpdateComment ¶
func (c *Client) UpdateComment(ctx context.Context, comment UpdateCommentRequest) error
UpdateComment changes an existing comment based on comment.CommentID.
func (*Client) UpdateGoal ¶
func (c *Client) UpdateGoal(ctx context.Context, goal UpdateGoalRequest) (*UpdateGoalResponse, error)
UpdateGoal uses goal.ID to change an existing goal in the workspace.
func (*Client) UpdateGroup ¶
func (c *Client) UpdateGroup(ctx context.Context, group UpdateGroupRequest) (*UpdateGroupResponse, error)
UpdateGroup changes an existing group using group.ID.
func (*Client) UpdateKeyResult ¶
func (c *Client) UpdateKeyResult(ctx context.Context, keyResult UpdateKeyResultRequest) (*UpdateKeyResultResponse, error)
UpdateKeyResult changes an existing key result based on keyResult.ID.
func (*Client) UpdateSpaceForWorkspace ¶
func (c *Client) UpdateSpaceForWorkspace(ctx context.Context, space UpdateSpaceRequest) (*SingleSpace, error)
UpdateSpaceForWorkspace makes changes to an existing space using parameters specified in space.
func (*Client) UpdateSpaceTag ¶
UpdateSpaceTag updates an existing tag in the specified space with the parameters from tag.
func (*Client) UpdateTask ¶
func (c *Client) UpdateTask(ctx context.Context, task *TaskUpdateRequest, workspaceID string, useCustomTaskIDs bool) (*SingleTask, error)
UpdateTask changes an existing task.
func (*Client) UpdateWebhook ¶
func (c *Client) UpdateWebhook(ctx context.Context, webhook *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
UpdateWebhook changes an existing webhook.
func (*Client) ViewsFor ¶
func (c *Client) ViewsFor(ctx context.Context, viewListType ViewListType, id string) (*GetViewsResponse, error)
ViewsFor uses viewListType to return views for a team, space, forlder, or list. See ViewListType. id represents the id of the corresponding ViewListType.
func (*Client) WebhooksFor ¶
func (c *Client) WebhooksFor(ctx context.Context, workspaceID string) (*WebhooksQueryResponse, error)
WebhooksFor returns a listing of all webhooks for a workspace.
type ClientOpts ¶
type ClientOpts struct { Doer ClientDoer Authenticator Authenticator }
type CommentsForListQuery ¶
type CommentsForListQuery struct {
CommentsQuery
}
type CommentsForTaskQuery ¶
type CommentsForTaskQuery struct {
CommentsQuery
}
type CommentsForTaskViewQuery ¶
type CommentsForTaskViewQuery struct {
CommentsQuery
}
type CommentsQuery ¶
type CommentsResponse ¶
type CommentsResponse struct { Comments []struct { ID string `json:"id"` Comment []ComplexComment `json:"comment"` CommentText string `json:"comment_text"` User *TeamUser `json:"user"` Assignee *TeamUser `json:"assignee"` AssignedBy *TeamUser `json:"assigned_by"` Reactions []struct { Reaction string `json:"reaction"` Date string `json:"date"` User TeamUser `json:"user"` } `json:"reactions"` Date string `json:"date"` } `json:"comments"` }
type ComplexComment ¶
type ComplexComment struct { Text string `json:"text"` Type string `json:"type,omitempty"` Attributes *Attributes `json:"attributes,omitempty"` Emoticon *Emoticon `json:"emoticon,omitempty"` }
type CreateChatViewCommentRequest ¶
type CreateChatViewCommentRequest struct { CreateCommentRequest ViewID string `json:"-"` }
func NewCreateChatViewCommentRequest ¶
func NewCreateChatViewCommentRequest(viewID string) *CreateChatViewCommentRequest
type CreateChatViewCommentResponse ¶
type CreateChatViewCommentResponse struct {
CreateCommentResponse
}
type CreateChecklistRequest ¶
type CreateCommentRequest ¶
type CreateCommentRequest struct { CommentText string `json:"comment_text,omitempty"` // plain text Comment []ComplexComment `json:"comment,omitempty"` Assignee int `json:"assignee,omitempty"` NotifyAll bool `json:"notify_all,omitempty"` }
func (*CreateCommentRequest) BulletedListItem ¶
func (c *CreateCommentRequest) BulletedListItem(text string, attributes *Attributes)
BulletedListItem appends a bullet list item to c with text and attributes.
func (*CreateCommentRequest) ChecklistItem ¶
func (c *CreateCommentRequest) ChecklistItem(text string, checked bool, attributes *Attributes)
ChecklistItem appends a checklist line item to c with text, attributes, and can be checked or not with checked.
func (*CreateCommentRequest) NumberedListItem ¶
func (c *CreateCommentRequest) NumberedListItem(text string, attributes *Attributes)
NumberedListItem appends an ordered list item to c with text and attributes.
type CreateCommentResponse ¶
type CreateGoalRequest ¶
type CreateGoalResponse ¶
type CreateGoalResponse struct { Goal struct { ID string `json:"id"` Name string `json:"name"` TeamID string `json:"team_id"` DateCreated string `json:"date_created"` StartDate string `json:"start_date"` DueDate string `json:"due_date"` Description string `json:"description"` Private bool `json:"private"` Archived bool `json:"archived"` Creator int `json:"creator"` Color string `json:"color"` PrettyID string `json:"pretty_id"` MultipleOwners bool `json:"multiple_owners"` Members []TeamUser `json:"members"` Owners []TeamUser `json:"owners"` KeyResults []KeyResult `json:"key_results"` PercentCompleted int `json:"percent_completed"` PrettyURL string `json:"pretty_url"` } `json:"goal"` }
type CreateGroupRequest ¶
type CreateGroupResponse ¶
type CreateKeyResultRequest ¶
type CreateKeyResultRequest struct { GoalID string `json:"-"` Name string `json:"name"` Owners []int `json:"owners"` Type KeyResultType `json:"type"` StepsStart int `json:"steps_start"` StepsEnd int `json:"steps_end"` Unit string `json:"unit"` TaskIds []string `json:"task_ids"` ListIds []string `json:"list_ids"` }
type CreateKeyResultResponse ¶
type CreateKeyResultResponse struct {
KeyResult KeyResult `json:"key_result"`
}
type CreateListCommentRequest ¶
type CreateListCommentRequest struct { CreateCommentRequest ListID string `json:"-"` }
func NewCreateListCommentRequest ¶
func NewCreateListCommentRequest(listID string) *CreateListCommentRequest
type CreateListCommentResponse ¶
type CreateListCommentResponse struct {
CreateCommentResponse
}
type CreateSpaceRequest ¶
type CreateTaskCommentRequest ¶
type CreateTaskCommentRequest struct { CreateCommentRequest TaskID string `json:"-"` UseCustomTaskIDs bool `json:"-"` WorkspaceID string `json:"-"` }
func NewCreateTaskCommentRequest ¶
func NewCreateTaskCommentRequest(taskID string, useCustomTaskIDs bool, workspaceID string) *CreateTaskCommentRequest
type CreateTaskCommentResponse ¶
type CreateTaskCommentResponse struct {
CreateCommentResponse
}
type CreateWebhookRequest ¶
type CreateWebhookRequest struct { Endpoint string `json:"endpoint,omitempty"` Events []WebhookEvent `json:"events,omitempty"` TaskID string `json:"task_id,omitempty"` ListID string `json:"list_id,omitempty"` FolderID string `json:"folder_id,omitempty"` }
type CreateWebhookResponse ¶
type CreateWebhookResponse struct { ID string `json:"id"` Webhook struct { ID string `json:"id"` UserID int `json:"userid"` TeamID int `json:"team_id"` Endpoint string `json:"endpoint"` ClientID string `json:"client_id"` Events []WebhookEvent `json:"events"` TaskID int `json:"task_id"` ListID int `json:"list_id"` FolderID int `json:"folder_id"` SpaceID int `json:"space_id"` Health *WebhookHealth `json:"health"` Secret string `json:"secret"` } `json:"webhook"` }
type CustomFieldInfo ¶
type CustomFieldInfo struct {
// contains filtered or unexported fields
}
type CustomFields ¶
type CustomFields struct {
Enabled bool `json:"enabled,omitempty"`
}
type DependencyWarning ¶
type DependencyWarning struct {
Enabled bool `json:"enabled,omitempty"`
}
type ErrClickupResponse ¶
type ErrClickupResponse struct { ECode string `json:"ECODE"` Err string `json:"err"` StatusCode int Status string }
func (*ErrClickupResponse) Error ¶
func (e *ErrClickupResponse) Error() string
type Features ¶
type Features struct { DueDates *DueDates `json:"due_dates,omitempty"` TimeTracking *TimeTracking `json:"time_tracking,omitempty"` Tags *Tags `json:"tags,omitempty"` TimeEstimates *TimeEstimates `json:"time_estimates,omitempty"` Checklists *Checklists `json:"checklists,omitempty"` CustomFields *CustomFields `json:"custom_fields,omitempty"` RemapDependencies *RemapDependencies `json:"remap_dependencies,omitempty"` DependencyWarning *DependencyWarning `json:"dependency_warning,omitempty"` Portfolios *Portfolios `json:"portfolios,omitempty"` }
type FoldersResponse ¶
type FoldersResponse struct {
Folders []SingleFolder `json:"folders"`
}
type GetGoalsResponse ¶
type GetGoalsResponse struct {
Goals []GoalResponse `json:"goals"`
}
type GetTasksResponse ¶
type GetTasksResponse struct {
Tasks []SingleTask `json:"tasks"`
}
type GetViewResponse ¶
type GetViewResponse struct {
View SingleView `json:"view"`
}
type GetViewsResponse ¶
type GetViewsResponse struct {
Views []SingleView `json:"views"`
}
type GoalResponse ¶
type GoalResponse struct { ID string `json:"id"` PrettyID string `json:"pretty_id"` Name string `json:"name"` TeamID string `json:"team_id"` Creator int `json:"creator"` Color string `json:"color"` DateCreated string `json:"date_created"` StartDate string `json:"start_date"` DueDate string `json:"due_date"` Description string `json:"description"` Private bool `json:"private"` Archived bool `json:"archived"` MultipleOwners bool `json:"multiple_owners"` EditorToken string `json:"editor_token"` DateUpdated string `json:"date_updated"` LastUpdate string `json:"last_update"` FolderID string `json:"folder_id"` Pinned bool `json:"pinned"` Owners []TeamUser `json:"owners"` KeyResultCount int `json:"key_result_count"` PercentCompleted int `json:"percent_completed"` }
type GroupsQueryResponse ¶
type GroupsQueryResponse struct {
Groups []Group `json:"groups"`
}
type KeyResult ¶
type KeyResult struct { ID string `json:"id"` GoalID string `json:"goal_id"` Name string `json:"name"` Creator int `json:"creator"` Type string `json:"type"` DateCreated string `json:"date_created"` GoalPrettyID string `json:"goal_pretty_id"` PercentCompleted int `json:"percent_completed"` Completed bool `json:"completed"` TaskIds []string `json:"task_ids"` Owners []TeamUser `json:"owners"` LastAction struct { ID string `json:"id"` KeyResultID string `json:"key_result_id"` Userid int `json:"userid"` Note string `json:"note"` DateModified string `json:"date_modified"` } `json:"last_action"` }
type KeyResultType ¶
type KeyResultType string
const ( KeyResultNumber KeyResultType = "number" KeyResultCurrency KeyResultType = "currency" KeyResultBoolean KeyResultType = "boolean" KeyResultPercentage KeyResultType = "percentage" KeyResultAutomatic KeyResultType = "automatic" )
type ListsResponse ¶
type ListsResponse struct {
Lists []SingleList `json:"lists"`
}
type OrderByVal ¶
type OrderByVal string
const ( OrderByID OrderByVal = "id" OrderByCreated OrderByVal = "created" OrderByUpdated OrderByVal = "updated" OrderByDueDate OrderByVal = "due_date" )
type Portfolios ¶
type Portfolios struct {
Enabled bool `json:"enabled,omitempty"`
}
type RateLimitError ¶
type RateLimitError struct {
// contains filtered or unexported fields
}
func (*RateLimitError) Error ¶
func (r *RateLimitError) Error() string
func (*RateLimitError) Unwrap ¶
func (r *RateLimitError) Unwrap() error
type RemapDependencies ¶
type RemapDependencies struct {
Enabled bool `json:"enabled,omitempty"`
}
type SharedHierarchyResponse ¶
type SharedHierarchyResponse struct { string `json:"id"` CustomID struct { } `json:"custom_id"` Name string `json:"name"` Status struct { Status string `json:"status"` Color string `json:"color"` Type string `json:"type"` Orderindex int `json:"-"` } `json:"status"` Orderindex string `json:"-"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` DateClosed string `json:"date_closed"` Archived bool `json:"archived"` Creator struct { ID int `json:"id"` Username string `json:"username"` Color string `json:"color"` Email string `json:"email"` ProfilePicture string `json:"profilePicture"` } `json:"creator"` Assignees []struct { ID int `json:"id"` Username string `json:"username"` Color string `json:"color"` Initials string `json:"initials"` Email string `json:"email"` ProfilePicture string `json:"profilePicture"` } `json:"assignees"` Parent struct { } `json:"parent"` Priority struct { } `json:"priority"` DueDate struct { } `json:"due_date"` StartDate struct { } `json:"start_date"` Points struct { } `json:"points"` TimeEstimate struct { } `json:"time_estimate"` CustomFields []struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` TypeConfig struct { NewDropDown bool `json:"new_drop_down"` Options []struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` Orderindex int `json:"-"` } `json:"options"` } `json:"type_config"` DateCreated string `json:"date_created"` HideFromGuests bool `json:"hide_from_guests"` Required bool `json:"required"` } `json:"custom_fields"` TeamID string `json:"team_id"` URL string `json:"url"` PermissionLevel string `json:"permission_level"` List struct { ID string `json:"id"` Name string `json:"name"` Access bool `json:"access"` } `json:"list"` Project struct { ID string `json:"id"` Name string `json:"name"` Hidden bool `json:"hidden"` Access bool `json:"access"` } `json:"project"` Folder struct { ID string `json:"id"` Name string `json:"name"` Hidden bool `json:"hidden"` Access bool `json:"access"` } `json:"folder"` Space struct { ID string `json:"id"` } `json:"space"` } `json:"tasks"` Lists []struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` TaskCount string `json:"task_count"` Archived bool `json:"archived"` } `json:"lists"` Folders []struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` TaskCount string `json:"task_count"` Archived bool `json:"archived"` } `json:"folders"` } `json:"shared"` }Tasks []struct { ID
type SingleFolder ¶
type SingleFolder struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` OverrideStatuses bool `json:"override_statuses"` Hidden bool `json:"hidden"` Space struct { ID string `json:"id"` Name string `json:"name"` } `json:"space"` TaskCount string `json:"task_count"` Archived bool `json:"archived"` Lists []struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` Status struct { } `json:"status"` Priority struct { } `json:"priority"` Assignee struct { } `json:"assignee"` TaskCount int `json:"task_count"` DueDate struct { } `json:"due_date"` StartDate struct { } `json:"start_date"` Space struct { ID string `json:"id"` Name string `json:"name"` Access bool `json:"access"` } `json:"space"` Archived bool `json:"archived"` OverrideStatuses bool `json:"override_statuses"` Statuses []struct { ID string `json:"id"` Status string `json:"status"` Orderindex int `json:"-"` Color string `json:"color"` Type string `json:"type"` } `json:"statuses"` PermissionLevel string `json:"permission_level"` } `json:"lists"` PermissionLevel string `json:"permission_level"` }
type SingleList ¶
type SingleList struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` Status struct { } `json:"status"` Priority struct { } `json:"priority"` Assignee struct { } `json:"assignee"` TaskCount int `json:"task_count"` DueDate struct { } `json:"due_date"` StartDate struct { } `json:"start_date"` Folder struct { ID string `json:"id"` Name string `json:"name"` Hidden bool `json:"hidden"` Access bool `json:"access"` } `json:"folder"` Space struct { ID string `json:"id"` Name string `json:"name"` Access bool `json:"access"` } `json:"space"` Archived bool `json:"archived"` OverrideStatuses bool `json:"override_statuses"` PermissionLevel string `json:"permission_level"` }
type SingleSpace ¶
type SingleSpace struct { ID string `json:"id"` Name string `json:"name"` Private bool `json:"private"` Statuses []struct { ID string `json:"id"` Status string `json:"status"` Type string `json:"type"` Orderindex int `json:"-"` Color string `json:"color"` } `json:"statuses"` MultipleAssignees bool `json:"multiple_assignees"` Features struct { DueDates struct { Enabled bool `json:"enabled"` StartDate bool `json:"start_date"` RemapDueDates bool `json:"remap_due_dates"` RemapClosedDueDate bool `json:"remap_closed_due_date"` } `json:"due_dates"` Sprints struct { Enabled bool `json:"enabled"` } `json:"sprints"` Points struct { Enabled bool `json:"enabled"` } `json:"points"` CustomItems struct { Enabled bool `json:"enabled"` } `json:"custom_items"` Priorities struct { Enabled bool `json:"enabled"` Priorities []struct { ID string `json:"id"` Priority string `json:"priority"` Color string `json:"color"` Orderindex string `json:"-"` } `json:"priorities"` } `json:"priorities"` Tags struct { Enabled bool `json:"enabled"` } `json:"tags"` CheckUnresolved struct { Enabled bool `json:"enabled"` Subtasks struct { } `json:"subtasks"` Checklists struct { } `json:"checklists"` Comments struct { } `json:"comments"` } `json:"check_unresolved"` Zoom struct { Enabled bool `json:"enabled"` } `json:"zoom"` Milestones struct { Enabled bool `json:"enabled"` } `json:"milestones"` CustomFields struct { Enabled bool `json:"enabled"` } `json:"custom_fields"` DependencyWarning struct { Enabled bool `json:"enabled"` } `json:"dependency_warning"` } `json:"features"` Archived bool `json:"archived"` Members []struct { User struct { ID int `json:"id"` Username string `json:"username"` Color string `json:"color"` ProfilePicture string `json:"profilePicture"` Initials string `json:"initials"` } `json:"user"` } `json:"members"` }
type SingleTask ¶
type SingleTask struct { ID string `json:"id"` CustomID string `json:"custom_id"` Name string `json:"name"` TextContent string `json:"text_content"` Description string `json:"description"` Status Status `json:"status"` Orderindex string `json:"-"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` DateClosed string `json:"date_closed"` Archived bool `json:"archived"` Creator TeamUser `json:"creator"` Assignees []TeamUser `json:"assignees"` Watchers []TeamUser `json:"watchers"` Checklists []struct { ID string `json:"id"` TaskID string `json:"task_id"` Name string `json:"name"` DateCreated string `json:"date_created"` Orderindex int `json:"-"` Creator int `json:"creator"` Resolved int `json:"resolved"` Unresolved int `json:"unresolved"` Items []struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"-"` Assignee struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` Color string `json:"color"` Initials string `json:"initials"` ProfilePicture string `json:"profilePicture"` } `json:"assignee"` Resolved bool `json:"resolved"` DateCreated string `json:"date_created"` } `json:"items"` } `json:"checklists"` Tags []Tag `json:"tags"` Parent string `json:"parent"` Priority struct { ID string `json:"id"` Priority string `json:"priority"` Color string `json:"color"` Orderindex string `json:"-"` } `json:"priority"` DueDate string `json:"due_date"` StartDate string `json:"start_date"` Points int `json:"points"` TimeEstimate int `json:"time_estimate"` TimeSpent int `json:"time_spent"` CustomFields []struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` TypeConfig struct { Simple bool `json:"simple"` Default int `json:"default"` Placeholder string `json:"placeholder"` NewDropDown bool `json:"new_drop_down"` SingleUser bool `json:"single_user"` IncludeGroups bool `json:"include_groups"` IncludeGuests bool `json:"include_guests"` IncludeTeamMembers bool `json:"include_team_members"` Formula string `json:"formula"` CompleteOn int `json:"complete_on"` SubtaskRollup bool `json:"subtask_rollup"` Options []struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` Orderindex int `json:"-"` } `json:"options"` Fields []interface{} `json:"fields"` Tracking struct { Subtasks bool `json:"subtasks"` Checklists bool `json:"checklists"` } `json:"tracking"` } `json:"type_config"` DateCreated string `json:"date_created"` HideFromGuests bool `json:"hide_from_guests"` Required bool `json:"required"` Value interface{} `json:"value"` } `json:"custom_fields"` Dependencies []struct { TaskID string `json:"task_id"` DependsOn string `json:"depends_on"` Type int `json:"type"` DateCreated string `json:"date_created"` Userid string `json:"userid"` } `json:"dependencies"` LinkedTasks []struct { TaskID string `json:"task_id"` LinkID string `json:"link_id"` DateCreated string `json:"date_created"` Userid string `json:"userid"` } `json:"linked_tasks"` TeamID string `json:"team_id"` URL string `json:"url"` PermissionLevel string `json:"permission_level"` List struct { ID string `json:"id"` Name string `json:"name"` Access bool `json:"access"` } `json:"list"` Project struct { ID string `json:"id"` Name string `json:"name"` Hidden bool `json:"hidden"` Access bool `json:"access"` } `json:"project"` Folder struct { ID string `json:"id"` Name string `json:"name"` Hidden bool `json:"hidden"` Access bool `json:"access"` } `json:"folder"` Space struct { ID string `json:"id"` } `json:"space"` Subtasks []SingleTask `json:"subtasks"` Attachments []struct{} `json:"attachments"` }
func (*SingleTask) CustomFieldVal ¶
func (t *SingleTask) CustomFieldVal(fieldName string) *CustomFieldInfo
CustomFieldVal finds the value from a list of arbitrary custome fields and types from the task t. fieldName is used as the target field to extract. Custom fields that are of type "date" will be returned in the CustomFieldInfo as a string of unix milliseconds. CustomFieldInfo is an interface{} and should be handled accordingly. The consumer of this library can do any of this themselves with the SingleTask model. This is simply a utility function.
type SingleView ¶
type SingleView struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` Parent struct { ID string `json:"id"` Type int `json:"type"` } `json:"parent"` Grouping struct { Field string `json:"field"` Dir int `json:"dir"` Collapsed []string `json:"collapsed"` Ignore bool `json:"ignore"` } `json:"grouping"` Filters struct { Op string `json:"op"` Fields []struct { Field string `json:"field"` Op string `json:"op"` Idx int `json:"idx"` } `json:"fields"` Search string `json:"search"` SearchCustomFields bool `json:"search_custom_fields"` SearchDescription bool `json:"search_description"` SearchName bool `json:"search_name"` ShowClosed bool `json:"show_closed"` } `json:"filters"` Columns struct { Fields []struct { Field string `json:"field"` Idx int `json:"idx"` Width int `json:"width"` Hidden bool `json:"hidden"` } `json:"fields"` } `json:"columns"` TeamSidebar struct { AssignedComments bool `json:"assigned_comments"` UnassignedTasks bool `json:"unassigned_tasks"` } `json:"team_sidebar"` Settings struct { ShowTaskLocations bool `json:"show_task_locations"` ShowSubtasks int `json:"show_subtasks"` ShowSubtaskParentNames bool `json:"show_subtask_parent_names"` ShowClosedSubtasks bool `json:"show_closed_subtasks"` ShowAssignees bool `json:"show_assignees"` ShowImages bool `json:"show_images"` ShowTimer bool `json:"show_timer"` MeComments bool `json:"me_comments"` MeSubtasks bool `json:"me_subtasks"` MeChecklists bool `json:"me_checklists"` ShowEmptyStatuses bool `json:"show_empty_statuses"` AutoWrap bool `json:"auto_wrap"` TimeInStatusView int `json:"time_in_status_view"` } `json:"settings"` DateCreated string `json:"date_created"` Creator int `json:"creator"` Visibility string `json:"visibility"` Protected bool `json:"protected"` Orderindex int `json:"-"` }
type SpacesResponse ¶
type SpacesResponse struct {
Spaces []SingleSpace `json:"spaces"`
}
type TagsQueryResponse ¶
type TagsQueryResponse struct {
Tags []Tag `json:"tags"`
}
type TaskFromTemplateRequest ¶
type TaskFromTemplateResponse ¶
type TaskFromTemplateResponse struct {
ID string `json:"id"`
}
type TaskLinkResponse ¶
type TaskLinkResponse struct {
Task *SingleTask `json:"task"`
}
type TaskQueryOptions ¶
type TaskQueryOptions struct { IncludeArchived bool Page int OrderBy OrderByVal Reverse bool IncludeSubtasks bool Statuses []string // statuses to query IncludeClosed bool Assignees []string DueDateGreaterThan int DueDateLessThan int DateCreatedGreaterThan int DateCreatedLessThan int DateUpdatedGreaterThan int DateUpdatedLessThan int }
type TaskRequest ¶
type TaskRequest struct { Name string `json:"name"` Description string `json:"description,omitempty"` Tags []string `json:"tags,omitempty"` Status string `json:"status,omitempty"` DueDate int `json:"due_date,omitempty"` DueDateTime bool `json:"due_date_time,omitempty"` StartDate int `json:"start_date,omitempty"` StartDateTime bool `json:"start_date_time,omitempty"` }
type TaskTimeInStatusResponse ¶
type TaskTimeInStatusResponse struct { CurrentStatus struct { Status string `json:"status"` Color string `json:"color"` TotalTime struct { ByMinute int `json:"by_minute"` Since string `json:"since"` } `json:"total_time"` } `json:"current_status"` StatusHistory []struct { Status string `json:"status"` Color string `json:"color"` Type string `json:"type"` TotalTime struct { ByMinute int `json:"by_minute"` Since string `json:"since"` } `json:"total_time"` Orderindex int `json:"-"` } `json:"status_history"` }
type TaskUpdateRequest ¶
type TaskUpdateRequest struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Tags []string `json:"tags,omitempty"` Status string `json:"status,omitempty"` DueDate int `json:"due_date,omitempty"` DueDateTime bool `json:"due_date_time,omitempty"` StartDate int `json:"start_date,omitempty"` StartDateTime bool `json:"start_date_time,omitempty"` }
type TasksForViewResponse ¶
type TasksForViewResponse struct { Tasks []SingleTask `json:"tasks"` LastPage bool `json:"last_page"` }
type Team ¶
type Team struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` Avatar string `json:"avatar"` Members []TeamMember `json:"members"` }
type TeamMember ¶
type TeamUser ¶
type TeamUser struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` Color string `json:"color"` ProfilePicture string `json:"profilePicture"` Initials string `json:"initials"` Role int `json:"role"` CustomRole string `json:"custom_role"` LastActive string `json:"last_active"` DateJoined string `json:"date_joined"` DateInvited string `json:"date_invited"` }
type TeamsResponse ¶
type TeamsResponse struct {
Teams []Team `json:"teams"`
}
type TemplatesResponse ¶
type TemplatesResponse struct {
Templates []Template `json:"templates"`
}
type TimeEstimates ¶
type TimeEstimates struct {
Enabled bool `json:"enabled,omitempty"`
}
type TimeTracking ¶
type TimeTracking struct {
Enabled bool `json:"enabled"`
}
type UpdateChecklistItemRequest ¶
type UpdateChecklistItemRequest struct { ChecklistID string `json:"checklist_id"` ChecklistItemID string `json:"checklist_item_id"` Name string `json:"name"` Assignee TeamMember `json:"assignee"` Resolved bool `json:"resolved"` }
type UpdateChecklistRequest ¶
type UpdateCommentRequest ¶
type UpdateGoalRequest ¶
type UpdateGoalRequest struct { ID string `json:"-"` Name string `json:"name,omitempty"` DueDate int `json:"due_date,omitempty"` Description string `json:"description,omitempty"` MultipleOwners bool `json:"multiple_owners,omitempty"` Owners []int `json:"owners,omitempty"` Color string `json:"color,omitempty"` }
type UpdateGoalResponse ¶
type UpdateGoalResponse struct { Goal struct { ID string `json:"id"` Name string `json:"name"` TeamID string `json:"team_id"` DateCreated string `json:"date_created"` StartDate string `json:"start_date"` DueDate string `json:"due_date"` Description string `json:"description"` Private bool `json:"private"` Archived bool `json:"archived"` Creator int `json:"creator"` Color string `json:"color"` PrettyID string `json:"pretty_id"` MultipleOwners bool `json:"multiple_owners"` Members []TeamUser `json:"members"` Owners []TeamUser `json:"owners"` KeyResults []KeyResult `json:"key_results"` PercentCompleted int `json:"percent_completed"` PrettyURL string `json:"pretty_url"` } `json:"goal"` }
type UpdateGroupRequest ¶
type UpdateGroupResponse ¶
type UpdateKeyResultRequest ¶
type UpdateKeyResultRequest struct { ID string `json:"-"` GoalID string `json:"goal_id,omitempty"` Name string `json:"name,omitempty"` Creator int `json:"creator,omitempty"` Type string `json:"type,omitempty"` DateCreated string `json:"date_created,omitempty"` GoalPrettyID string `json:"goal_pretty_id,omitempty"` PercentCompleted int `json:"percent_completed,omitempty"` Completed bool `json:"completed,omitempty"` TaskIds []string `json:"task_ids,omitempty"` Owners []TeamUser `json:"owners,omitempty"` }
type UpdateKeyResultResponse ¶
type UpdateKeyResultResponse struct {
KeyResult KeyResult `json:"key_result"`
}
type UpdateSpaceRequest ¶
type UpdateWebhookRequest ¶
type UpdateWebhookRequest struct { ID string `json:"id"` Endpoint string `json:"endpoint,omitempty"` Events []WebhookEvent `json:"events,omitempty"` TaskID string `json:"task_id,omitempty"` ListID string `json:"list_id,omitempty"` FolderID string `json:"folder_id,omitempty"` Status string `json:"status,omitempty"` }
type UpdateWebhookResponse ¶
type UpdateWebhookResponse struct {
CreateWebhookResponse
}
type ViewListType ¶
type ViewListType int
const ( TypeTeam ViewListType = iota TypeSpace TypeFolder TypeList )
func (ViewListType) String ¶
func (v ViewListType) String() string
type Webhook ¶
type Webhook struct { ID string `json:"id"` UserID int `json:"userid"` TeamID int `json:"team_id"` Endpoint string `json:"endpoint"` ClientID string `json:"client_id"` Events []WebhookEvent `json:"events"` TaskID int `json:"task_id"` ListID int `json:"list_id"` FolderID int `json:"folder_id"` SpaceID int `json:"space_id"` Health *WebhookHealth `json:"health"` Secret string `json:"secret"` }
type WebhookEvent ¶
type WebhookEvent string
const ( EventAll WebhookEvent = "*" EventTaskCreated WebhookEvent = "taskCreated" EventTaskUpdated WebhookEvent = "taskUpdated" EventTaskDeleted WebhookEvent = "taskDeleted" EventTaskPriorityUpdated WebhookEvent = "taskPriorityUpdated" EventTaskStatusUpdated WebhookEvent = "taskStatusUpdated" EventTaskAssigneeUpdated WebhookEvent = "taskAssigneeUpdated" EventTaskDueDateUpdated WebhookEvent = "taskDueDateUpdated" EventTaskTagUpdated WebhookEvent = "taskTagUpdated" EventTaskMoved WebhookEvent = "taskMoved" EventTaskCommentPosted WebhookEvent = "taskCommentPosted" EventTaskCommentUpdated WebhookEvent = "taskCommentUpdated" EventTaskTimeEstimateUpdated WebhookEvent = "taskTimeEstimateUpdated" EventTaskTimeTrackedUpdated WebhookEvent = "taskTimeTrackedUpdated" EventListCreated WebhookEvent = "listCreated" EventListUpdated WebhookEvent = "listUpdated" EventListDeleted WebhookEvent = "listDeleted" EventFolderCreated WebhookEvent = "folderCreated" EventFolderUpdated WebhookEvent = "folderUpdated" EventFolderDeleted WebhookEvent = "folderDeleted" EventSpaceCreated WebhookEvent = "spaceCreated" EventSpaceUpdated WebhookEvent = "spaceUpdated" EventSpaceDeleted WebhookEvent = "spaceDeleted" EventGoalCreated WebhookEvent = "goalCreated" EventGoalUpdated WebhookEvent = "goalUpdated" EventGoalDeleted WebhookEvent = "goalDeleted" EventKeyResultCreated WebhookEvent = "keyResultCreated" EventKeyResultUpdated WebhookEvent = "keyResultUpdated" EventKeyResultDeleted WebhookEvent = "keyResultDeleted" )
type WebhookEventMessage ¶
type WebhookEventMessage struct { Event WebhookEvent `json:"event"` HistoryItems []struct { ID string `json:"id"` Type int `json:"type"` Date string `json:"date"` Field string `json:"field"` ParentID string `json:"parent_id"` Data struct { StatusType string `json:"status_type"` } `json:"data"` User struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` Color string `json:"color"` Initials string `json:"initials"` ProfilePicture string `json:"profilePicture"` } `json:"user"` Before struct { Status string `json:"status"` Color string `json:"color"` Orderindex int `json:"-"` Type string `json:"type"` } `json:"before"` After struct { Status string `json:"status"` Color string `json:"color"` Orderindex int `json:"-"` Type string `json:"type"` } `json:"after"` } `json:"history_items"` TaskID string `json:"task_id"` WebhookID string `json:"webhook_id"` }
type WebhookHealth ¶
type WebhooksQueryResponse ¶
type WebhooksQueryResponse struct {
Webhooks []Webhook `json:"webhooks"`
}