Documentation ¶
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Int(v int) *int
- func Int64(v int64) *int64
- func String(v string) *string
- func Stringify(message interface{}) string
- type AbuseRateLimitError
- type AddDependencyOptions
- type AddDependencyRequest
- type Attachment
- type AttachmentsService
- type AuthorizationService
- func (s *AuthorizationService) GetAccessToken(ctx context.Context, clientID string, clientSecret string, clientCode string) (token string, resp *Response, err error)
- func (s *AuthorizationService) GetAuthorizedTeams(ctx context.Context) ([]Team, *Response, error)
- func (s *AuthorizationService) GetAuthorizedUser(ctx context.Context) (*User, *Response, error)
- type Checklist
- type ChecklistItemRequest
- type ChecklistOptions
- type ChecklistRequest
- type ChecklistResponse
- type Checklists
- type ChecklistsService
- func (s *ChecklistsService) CreateChecklist(ctx context.Context, taskID string, opts *ChecklistOptions, ...) (*Checklist, *Response, error)
- func (s *ChecklistsService) CreateChecklistItem(ctx context.Context, checklistID string, item *ChecklistItemRequest) (*Checklist, *Response, error)
- func (s *ChecklistsService) DeleteChecklist(ctx context.Context, checklistID string) (*Response, error)
- func (s *ChecklistsService) DeleteChecklistItem(ctx context.Context, checklistID string, checklistItemID string) (*Response, error)
- func (s *ChecklistsService) EditChecklist(ctx context.Context, checklistID string, checklist *ChecklistRequest) (*Checklist, *Response, error)
- func (s *ChecklistsService) EditChecklistItem(ctx context.Context, checklistID string, checklistItemID string, ...) (*Checklist, *Response, error)
- type Client
- func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, error)
- func (c *Client) Client() *http.Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)
- func (c *Client) NewMultiPartRequest(method, urlStr string, buf *bytes.Buffer) (*http.Request, error)
- func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)
- type Comment
- type CommentInComment
- type CommentRequest
- type CommentsService
- func (s *CommentsService) CreateChatViewComment(ctx context.Context, viewID string, comment *CommentRequest) (*CreateCommentResponse, *Response, error)
- func (s *CommentsService) CreateListComment(ctx context.Context, listID int, comment *CommentRequest) (*CreateCommentResponse, *Response, error)
- func (s *CommentsService) CreateTaskComment(ctx context.Context, taskID string, opts *TaskCommentOptions, ...) (*CreateCommentResponse, *Response, error)
- func (s *CommentsService) DeleteComment(ctx context.Context, commentID int) (*Response, error)
- func (s *CommentsService) GetChatViewComments(ctx context.Context, viewID string) ([]Comment, *Response, error)
- func (s *CommentsService) GetListComments(ctx context.Context, listID int) ([]Comment, *Response, error)
- func (s *CommentsService) GetTaskComments(ctx context.Context, taskID string, opts *TaskCommentOptions) ([]Comment, *Response, error)
- func (s *CommentsService) UpdateComment(ctx context.Context, commentID int, comment *UpdateCommentRequest) (*Response, error)
- type CreateAttachmentResponse
- type CreateCommentResponse
- type CreateGoalRequest
- type CreateKeyResultRequest
- type CreateTaskFromTemplateRequest
- type CreateTaskFromTemplateResponse
- type CurrentTaskStatus
- type CurrentTaskStatusTotalTime
- type CustomField
- type CustomFieldInTaskRequest
- type CustomFieldOptions
- type CustomFieldResponse
- type CustomFields
- type CustomFieldsService
- func (s *CustomFieldsService) GetAccessibleCustomFields(ctx context.Context, listID string) ([]CustomField, *Response, error)
- func (s *CustomFieldsService) RemoveCustomFieldValue(ctx context.Context, taskID string, fieldID string, opts *CustomFieldOptions) (*Response, error)
- func (s *CustomFieldsService) SetCustomFieldValue(ctx context.Context, taskID string, fieldID string, ...) (*Response, error)
- type DeleteDependencyOptions
- type Dependence
- type DependenciesService
- func (s *DependenciesService) AddDependency(ctx context.Context, taskID string, adr *AddDependencyRequest, ...) (*Response, error)
- func (s *DependenciesService) AddTaskLink(ctx context.Context, taskID string, linksTo string, opts *TaskLinkOptions) (*Task, *Response, error)
- func (s *DependenciesService) DeleteDependency(ctx context.Context, taskID string, opts *DeleteDependencyOptions) (*Response, error)
- func (s *DependenciesService) DeleteTaskLink(ctx context.Context, taskID string, linksTo string, opts *TaskLinkOptions) (*Task, *Response, error)
- type DependencyWarning
- type DueDates
- type EditKeyResultRequest
- type Error
- type ErrorBlock
- type ErrorResponse
- type Features
- type Folder
- type FolderOftaskBelonging
- type FolderRequest
- type FoldersService
- func (s *FoldersService) CreateFolder(ctx context.Context, spaceID int, folderRequest *FolderRequest) (*Folder, *Response, error)
- func (s *FoldersService) DeleteFolder(ctx context.Context, folderID int) (*Response, error)
- func (s *FoldersService) GetFolder(ctx context.Context, folderID string) (*Folder, *Response, error)
- func (s *FoldersService) GetFolders(ctx context.Context, spaceID string, archived bool) ([]Folder, *Response, error)
- func (s *FoldersService) UpdateFolder(ctx context.Context, folderID int, folderRequest *FolderRequest) (*Folder, *Response, error)
- type GetAccessTokenResponse
- type GetAuthorizedTeamsResponse
- type GetAuthorizedUserResponse
- type GetBulkTasksTimeInStatusOptions
- type GetBulkTasksTimeInStatusResponse
- type GetCommentsResponse
- type GetFolderResponse
- type GetFoldersResponse
- type GetGoalResponse
- type GetGoalsResponse
- type GetListsResponse
- type GetMembersResponse
- type GetSpacesResponse
- type GetTagsResponse
- type GetTaskOptions
- type GetTaskTemplateResponse
- type GetTasksOptions
- type GetTasksResponse
- type GetTeamsResponse
- type GetViewTasksResponse
- type GetViewsResponse
- type GetWebhooksResponse
- type Goal
- type GoalFolder
- type GoalMember
- type GoalOwner
- type GoalsService
- func (s *GoalsService) CreateGoal(ctx context.Context, teamID int, createGoalRequest *CreateGoalRequest) (*Goal, *Response, error)
- func (s *GoalsService) CreateKeyResult(ctx context.Context, goalID string, ...) (*KeyResult, *Response, error)
- func (s *GoalsService) DeleteGoal(ctx context.Context, goalID string) (resp *Response, err error)
- func (s *GoalsService) DeleteKeyResult(ctx context.Context, keyResultID string) (resp *Response, err error)
- func (s *GoalsService) EditKeyResult(ctx context.Context, keyResultID string, ...) (*KeyResult, *Response, error)
- func (s *GoalsService) GetGoal(ctx context.Context, goalID string) (*Goal, *Response, error)
- func (s *GoalsService) GetGoals(ctx context.Context, teamID string, includeCompleted bool) ([]Goal, []GoalFolder, *Response, error)
- func (s *GoalsService) UpdateGoal(ctx context.Context, goalID string, updateGoalRequest *UpdateGoalRequest) (*Goal, *Response, error)
- type InvitedBy
- type Item
- type KeyResult
- type KeyResultResponse
- type LastAction
- type LinkedTask
- type List
- type ListOfFolderBelonging
- type ListOfTaskBelonging
- type ListRequest
- type ListsService
- func (s *ListsService) AddTaskToList(ctx context.Context, listID string, taskID string) (*Response, error)
- func (s *ListsService) CreateFolderlessList(ctx context.Context, spaceID int, listRequest *ListRequest) (List, *Response, error)
- func (s *ListsService) CreateList(ctx context.Context, folderID string, listRequest *ListRequest) (List, *Response, error)
- func (s *ListsService) DeleteList(ctx context.Context, listID string) (*Response, error)
- func (s *ListsService) GetFolderlessLists(ctx context.Context, spaceID string, archived bool) ([]List, *Response, error)
- func (s *ListsService) GetList(ctx context.Context, listID string) (List, *Response, error)
- func (s *ListsService) GetLists(ctx context.Context, folderID string, archived bool) ([]List, *Response, error)
- func (s *ListsService) RemoveTaskFromList(ctx context.Context, listID string, taskID string) (*Response, error)
- func (s *ListsService) UpdateList(ctx context.Context, listID string, listRequest *ListRequest) (List, *Response, error)
- type Member
- type MembersService
- type Portfolios
- type ProjectOfTaskBelonging
- type Rate
- type RateLimitError
- type RawOptions
- type RawType
- type Reaction
- type RemapDependencies
- type Response
- type Shared
- type SharedHierarchyResponse
- type SharedHierarchyService
- type Space
- type SpaceOfFolderBelonging
- type SpaceOfTaskBelonging
- type SpaceRequest
- type SpacesService
- func (s *SpacesService) CreateSpace(ctx context.Context, teamID int, spaceRequest *SpaceRequest) (*Space, *Response, error)
- func (s *SpacesService) DeleteSpace(ctx context.Context, spaceID int) (*Response, error)
- func (s *SpacesService) GetSpace(ctx context.Context, spaceID string) (*Space, *Response, error)
- func (s *SpacesService) GetSpaces(ctx context.Context, teamID string) ([]Space, *Response, error)
- func (s *SpacesService) UpdateSpace(ctx context.Context, spaceID int, spaceRequest *SpaceRequest) (*Space, *Response, error)
- type Tag
- type TagOptions
- type TagRequest
- type Tags
- type TagsService
- func (s *TagsService) AddTagToTask(ctx context.Context, taskID string, tagName string, opts *TagOptions) (*Response, error)
- func (s *TagsService) CreateSpaceTag(ctx context.Context, spaceID string, tagReq *TagRequest) (*Response, error)
- func (s *TagsService) DeleteSpaceTag(ctx context.Context, spaceID string, tagName string) (*Response, error)
- func (s *TagsService) EditSpaceTag(ctx context.Context, spaceID string, tagName string, tagReq *TagRequest) (*Response, error)
- func (s *TagsService) GetTags(ctx context.Context, spaceID string) ([]Tag, *Response, error)
- func (s *TagsService) RemoveTagToTask(ctx context.Context, taskID string, tagName string, opts *TagOptions) (*Response, error)
- type Task
- type TaskAttachementOptions
- type TaskCommentOptions
- type TaskLinkOptions
- type TaskLinkResponse
- type TaskPriority
- type TaskRequest
- type TaskStatus
- type TaskStatusHistory
- type TaskTemplatesService
- type TasksInStatus
- type TasksService
- func (s *TasksService) CreateTask(ctx context.Context, listID string, tr *TaskRequest) (*Task, *Response, error)
- func (s *TasksService) DeleteTask(ctx context.Context, taskID string, opts *GetTaskOptions) (*Response, error)
- func (s *TasksService) GetBulkTasksTimeInStatus(ctx context.Context, taskIDs []string, opts *GetBulkTasksTimeInStatusOptions) ([]TasksInStatus, *Response, error)
- func (s *TasksService) GetFilteredTeamTasks(ctx context.Context, teamID string, opts *GetTasksOptions) ([]Task, *Response, error)
- func (s *TasksService) GetTask(ctx context.Context, taskID string, opts *GetTaskOptions) (*Task, *Response, error)
- func (s *TasksService) GetTasks(ctx context.Context, listID string, opts *GetTasksOptions) ([]Task, *Response, error)
- func (s *TasksService) GetTasksTimeInStatus(ctx context.Context, taskID string, opts *GetTaskOptions) (*TasksInStatus, *Response, error)
- func (s *TasksService) UpdateTask(ctx context.Context, taskID string, opts *GetTasksOptions, tr *TaskRequest) (*Task, *Response, error)
- type Team
- type TeamMember
- type TeamUser
- type TeamsService
- type Template
- type TimeEstimates
- type TimeTracking
- type Timestamp
- type UpdateCommentRequest
- type UpdateGoalRequest
- type User
- type View
- type ViewResponse
- type ViewType
- type ViewsService
- func (s *ViewsService) CreateViewOf(ctx context.Context, viewType ViewType, id string, view map[string]interface{}) (*View, *Response, error)
- func (s *ViewsService) DeleteView(ctx context.Context, viewID string) (*Response, error)
- func (s *ViewsService) GetView(ctx context.Context, viewID string) (*View, *Response, error)
- func (s *ViewsService) GetViewTasks(ctx context.Context, viewID string, page int) ([]Task, bool, *Response, error)
- func (s *ViewsService) GetViewsOf(ctx context.Context, viewType ViewType, id string) ([]View, *Response, error)
- func (s *ViewsService) UpdateView(ctx context.Context, viewID string, value map[string]interface{}) (*View, *Response, error)
- type Webhook
- type WebhookRequest
- type WebhookResponse
- type WebhooksService
- func (s *WebhooksService) CreateWebhook(ctx context.Context, teamID int, webhookReq *WebhookRequest) (*WebhookResponse, *Response, error)
- func (s *WebhooksService) DeleteWebhook(ctx context.Context, webhookID string) (*Response, error)
- func (s *WebhooksService) GetWebhook(ctx context.Context, teamID int) ([]Webhook, *Response, error)
- func (s *WebhooksService) UpdateWebhook(ctx context.Context, webhookID string, webhookReq *WebhookRequest) (*WebhookResponse, *Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range or equal to 202 Accepted. API error responses are expected to have response body, and a JSON response body that maps to ErrorResponse.
The error type will be *RateLimitError for rate limit exceeded errors,
func Int ¶
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
func Int64 ¶
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
Types ¶
type AbuseRateLimitError ¶
type AbuseRateLimitError struct { Response *http.Response // HTTP response that caused this error Message string `json:"message"` // error message }
AbuseRateLimitError occurs when Clickup returns 429 Too Many Requests response with the
func (*AbuseRateLimitError) Error ¶
func (r *AbuseRateLimitError) Error() string
func (*AbuseRateLimitError) Is ¶
func (r *AbuseRateLimitError) Is(target error) bool
Is returns whether the provided error equals this error.
type AddDependencyOptions ¶
type AddDependencyRequest ¶
type AddDependencyRequest struct { DependsOn string `json:"depends_on,omitempty"` DependencyOf string `json:"dependency_of,omitempty"` }
To create a waiting on dependency, pass the property depends_on in the body. To create a blocking dependency, pass the property dependency_of. Both can not be passed in the same request.
type Attachment ¶
type AttachmentsService ¶
type AttachmentsService service
func (*AttachmentsService) CreateTaskAttachment ¶
func (s *AttachmentsService) CreateTaskAttachment(ctx context.Context, taskID string, opts *TaskAttachementOptions, attachment *Attachment) (*CreateAttachmentResponse, *Response, error)
type AuthorizationService ¶
type AuthorizationService service
func (*AuthorizationService) GetAccessToken ¶
func (s *AuthorizationService) GetAccessToken(ctx context.Context, clientID string, clientSecret string, clientCode string) (token string, resp *Response, err error)
Get access token from Oauth app client id, Oauth app client secret and redirect url.
func (*AuthorizationService) GetAuthorizedTeams ¶
Get the authorized teams for this token.
func (*AuthorizationService) GetAuthorizedUser ¶
Get the user that belongs to this token.
type ChecklistItemRequest ¶
type ChecklistItemRequest struct { Name string `json:"name"` Assignee int `json:"assignee,omitempty"` Resolved bool `json:"resolved,omitempty"` }
TODO: Add parent.
type ChecklistOptions ¶
type ChecklistRequest ¶
type ChecklistResponse ¶
type ChecklistResponse struct {
Checklist Checklist `json:"checklist"`
}
type Checklists ¶
type Checklists struct {
Enabled bool `json:"enabled"`
}
type ChecklistsService ¶
type ChecklistsService service
func (*ChecklistsService) CreateChecklist ¶
func (s *ChecklistsService) CreateChecklist(ctx context.Context, taskID string, opts *ChecklistOptions, checklist *ChecklistRequest) (*Checklist, *Response, error)
func (*ChecklistsService) CreateChecklistItem ¶
func (s *ChecklistsService) CreateChecklistItem(ctx context.Context, checklistID string, item *ChecklistItemRequest) (*Checklist, *Response, error)
func (*ChecklistsService) DeleteChecklist ¶
func (*ChecklistsService) DeleteChecklistItem ¶
func (*ChecklistsService) EditChecklist ¶
func (s *ChecklistsService) EditChecklist(ctx context.Context, checklistID string, checklist *ChecklistRequest) (*Checklist, *Response, error)
Position is the zero-based index of the order you want the checklist to exist on the task. If you want the checklist to be in the first position, pass { "position": 0 }
func (*ChecklistsService) EditChecklistItem ¶
func (s *ChecklistsService) EditChecklistItem(ctx context.Context, checklistID string, checklistItemID string, checklist *ChecklistItemRequest) (*Checklist, *Response, error)
Parent is another checklist item that you want to nest the target checklist item underneath.
type Client ¶
type Client struct { APIKey string BaseURL *url.URL UserAgent string // Services used for talking to different parts of the Clickup API. Attachments *AttachmentsService Authorization *AuthorizationService Checklists *ChecklistsService Comments *CommentsService CustomFields *CustomFieldsService Dependencies *DependenciesService Goals *GoalsService Tasks *TasksService TaskTemplates *TaskTemplatesService Teams *TeamsService Spaces *SpacesService Folders *FoldersService Lists *ListsService Members *MembersService Tags *TagsService Views *ViewsService Webhooks *WebhooksService // contains filtered or unexported fields }
A Client manages communication with the Clickup API.
func NewClient ¶
NewClient returns a new Clickup API client. If a nil httpClient is provided, a new http.Client will be used. To use API methods which require authentication, provide a APIKey.
func (*Client) BareDo ¶
BareDo sends an API request and lets you handle the api response. If an error or API Error occurs, the error will contain more information. Otherwise you are supposed to read and close the response's Body. If rate limit is exceeded and reset time is in the future, BareDo returns *RateLimitError immediately without making a network API call.
The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, ctx.Err() will be returned.
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it. If v is nil, and no error happens, the response is returned as is. If rate limit is exceeded and reset time is in the future, Do returns *RateLimitError immediately without making a network API call.
The provided ctx must be non-nil, if it is nil an error is returned. If it is canceled or times out, ctx.Err() will be returned.
func (*Client) NewMultiPartRequest ¶
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
type Comment ¶
type Comment struct { ID string `json:"id"` Comment []CommentInComment `json:"comment"` CommentText string `json:"comment_text"` User User `json:"user"` Resolved bool `json:"resolved"` Assignee User `json:"assignee,omitempty"` AssignedBy User `json:"assigned_by,omitempty"` Reactions []Reaction `json:"reactions,omitempty"` Date string `json:"date"` }
type CommentInComment ¶
type CommentInComment struct {
Text string `json:"text"`
}
type CommentRequest ¶
type CommentsService ¶
type CommentsService service
func (*CommentsService) CreateChatViewComment ¶
func (s *CommentsService) CreateChatViewComment(ctx context.Context, viewID string, comment *CommentRequest) (*CreateCommentResponse, *Response, error)
If NotifyAll is true, creation notifications will be sent to everyone including the creator of the comment.
func (*CommentsService) CreateListComment ¶
func (s *CommentsService) CreateListComment(ctx context.Context, listID int, comment *CommentRequest) (*CreateCommentResponse, *Response, error)
If NotifyAll is true, creation notifications will be sent to everyone including the creator of the comment.
func (*CommentsService) CreateTaskComment ¶
func (s *CommentsService) CreateTaskComment(ctx context.Context, taskID string, opts *TaskCommentOptions, comment *CommentRequest) (*CreateCommentResponse, *Response, error)
If NotifyAll is true, creation notifications will be sent to everyone including the creator of the comment.
func (*CommentsService) DeleteComment ¶
func (*CommentsService) GetChatViewComments ¶
func (*CommentsService) GetListComments ¶
func (*CommentsService) GetTaskComments ¶
func (s *CommentsService) GetTaskComments(ctx context.Context, taskID string, opts *TaskCommentOptions) ([]Comment, *Response, error)
func (*CommentsService) UpdateComment ¶
func (s *CommentsService) UpdateComment(ctx context.Context, commentID int, comment *UpdateCommentRequest) (*Response, error)
type CreateCommentResponse ¶
type CreateGoalRequest ¶
type CreateKeyResultRequest ¶
type CreateTaskFromTemplateRequest ¶
type CreateTaskFromTemplateRequest struct {
Name string `json:"name"`
}
type CurrentTaskStatus ¶
type CurrentTaskStatus struct { Status string `json:"status"` Color string `json:"color"` TotalTime CurrentTaskStatusTotalTime `json:"total_time"` }
type CustomField ¶
type CustomField struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` DateCreated string `json:"date_created"` HideFromGuests bool `json:"hide_from_guests"` }
TODO: Add type_config
type CustomFieldOptions ¶
type CustomFieldResponse ¶
type CustomFieldResponse struct {
Fields []CustomField `json:"fields"`
}
type CustomFields ¶
type CustomFields struct {
Enabled bool `json:"enabled"`
}
type CustomFieldsService ¶
type CustomFieldsService service
func (*CustomFieldsService) GetAccessibleCustomFields ¶
func (s *CustomFieldsService) GetAccessibleCustomFields(ctx context.Context, listID string) ([]CustomField, *Response, error)
func (*CustomFieldsService) RemoveCustomFieldValue ¶
func (s *CustomFieldsService) RemoveCustomFieldValue(ctx context.Context, taskID string, fieldID string, opts *CustomFieldOptions) (*Response, error)
The accessible fields can be found on the task object from the get task route. This is where you can retrieve the fieldID.
func (*CustomFieldsService) SetCustomFieldValue ¶
func (s *CustomFieldsService) SetCustomFieldValue(ctx context.Context, taskID string, fieldID string, value map[string]interface{}, opts *CustomFieldOptions) (*Response, error)
The accessible fields can be found on the task object from the get task route. This is where you can retrieve the fieldID. If you set tasks, example is as follow.
value := map[string]interface{}{ "value": map[string]interface{}{ "add": []string{"wmq3", "qt15"}, "rem": []string{"wxm7"}, }, }
Each value setting is placed at ClickUp API docs.
type DeleteDependencyOptions ¶
type DeleteDependencyOptions struct { DependsOn string `url:"depends_on,omitempty"` DependencyOf string `url:"dependency_of,omitempty"` CustomTaskIDs string `url:"custom_task_ids,omitempty"` TeamID int `url:"team_id,omitempty"` }
One and only one of depends_on or dependency_of must be passed in the query params.
type Dependence ¶
type DependenciesService ¶
type DependenciesService service
func (*DependenciesService) AddDependency ¶
func (s *DependenciesService) AddDependency(ctx context.Context, taskID string, adr *AddDependencyRequest, opts *AddDependencyOptions) (*Response, error)
To create a waiting on dependency, pass the property DependsOn in the body. To create a blocking dependency, pass the property DependencyOf. Both can not be passed in the same request.
func (*DependenciesService) AddTaskLink ¶
func (s *DependenciesService) AddTaskLink(ctx context.Context, taskID string, linksTo string, opts *TaskLinkOptions) (*Task, *Response, error)
func (*DependenciesService) DeleteDependency ¶
func (s *DependenciesService) DeleteDependency(ctx context.Context, taskID string, opts *DeleteDependencyOptions) (*Response, error)
One and only one of DependsOn or DependencyOf must be passed in the query params.
func (*DependenciesService) DeleteTaskLink ¶
func (s *DependenciesService) DeleteTaskLink(ctx context.Context, taskID string, linksTo string, opts *TaskLinkOptions) (*Task, *Response, error)
type DependencyWarning ¶
type DependencyWarning struct {
Enabled bool `json:"enabled"`
}
type EditKeyResultRequest ¶
type Error ¶
type Error struct { Resource string `json:"resource"` // resource on which the error occurred Field string `json:"field"` // field on which the error occurred Code string `json:"code"` // validation error code Message string `json:"message"` // Message describing the error. Errors with Code == "custom" will always have this set. }
An Error reports more details on an individual error in an ErrorResponse. These are the possible validation error codes:
missing: resource does not exist missing_field: a required field on a resource has not been set invalid: the formatting of a field is invalid already_exists: another resource has the same valid as this field custom: information is set in the Message field of the Error
func (*Error) UnmarshalJSON ¶
type ErrorBlock ¶
type ErrorBlock struct { Reason string `json:"reason,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` }
ErrorBlock contains a further explanation for the reason of an error.
type ErrorResponse ¶
type ErrorResponse struct { Response *http.Response // HTTP response that caused this error Message string `json:"message"` // error message Errors []Error `json:"errors"` // more detail on individual errors // Block is only populated on certain types of errors such as code 451. Block *ErrorBlock `json:"block,omitempty"` }
An ErrorResponse reports one or more errors caused by an API request.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
func (*ErrorResponse) Is ¶
func (r *ErrorResponse) Is(target error) bool
Is returns whether the provided error equals this error.
type Features ¶
type Features struct { DueDates DueDates `json:"due_dates"` TimeTracking TimeTracking `json:"time_tracking"` Tags Tags `json:"tags"` TimeEstimates TimeEstimates `json:"time_estimates"` Checklists Checklists `json:"checklists"` CustomFields CustomFields `json:"custom_fields"` RemapDependencies RemapDependencies `json:"remap_dependencies"` DependencyWarning DependencyWarning `json:"dependency_warning"` Portfolios Portfolios `json:"portfolios"` }
type Folder ¶
type Folder struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"orderindex"` OverrideStatuses bool `json:"override_statuses"` Hidden bool `json:"hidden"` Space SpaceOfFolderBelonging `json:"space"` TaskCount json.Number `json:"task_count"` Archived bool `json:"archived"` Statuses []interface{} `json:"statuses"` Lists []ListOfFolderBelonging `json:"lists"` PermissionLevel string `json:"permission_level"` }
type FolderOftaskBelonging ¶
type FolderRequest ¶
type FolderRequest struct {
Name string `json:"name"`
}
type FoldersService ¶
type FoldersService service
func (*FoldersService) CreateFolder ¶
func (s *FoldersService) CreateFolder(ctx context.Context, spaceID int, folderRequest *FolderRequest) (*Folder, *Response, error)
func (*FoldersService) DeleteFolder ¶
func (*FoldersService) GetFolders ¶
func (*FoldersService) UpdateFolder ¶
func (s *FoldersService) UpdateFolder(ctx context.Context, folderID int, folderRequest *FolderRequest) (*Folder, *Response, error)
type GetAccessTokenResponse ¶
type GetAccessTokenResponse struct {
AccessToken string `json:"access_token"`
}
type GetAuthorizedTeamsResponse ¶
type GetAuthorizedTeamsResponse struct {
Team Team `json:"teams"`
}
type GetAuthorizedUserResponse ¶
type GetAuthorizedUserResponse struct {
User User `json:"user"`
}
type GetBulkTasksTimeInStatusResponse ¶
type GetBulkTasksTimeInStatusResponse map[string]TasksInStatus
type GetCommentsResponse ¶
type GetCommentsResponse struct {
Comments []Comment `json:"comments"`
}
type GetFolderResponse ¶
type GetFolderResponse struct {
Folder Folder `json:"Folder"`
}
type GetFoldersResponse ¶
type GetFoldersResponse struct {
Folders []Folder `json:"Folders"`
}
type GetGoalResponse ¶
type GetGoalResponse struct {
Goal Goal `json:"goal"`
}
type GetGoalsResponse ¶
type GetGoalsResponse struct { Goals []Goal `json:"goals"` Folders []GoalFolder `json:"folders"` }
type GetListsResponse ¶
type GetListsResponse struct {
Lists []List `json:"Lists"`
}
type GetMembersResponse ¶
type GetMembersResponse struct {
Members []Member `json:"Members"`
}
type GetSpacesResponse ¶
type GetSpacesResponse struct {
Spaces []Space `json:"spaces"`
}
type GetTagsResponse ¶
type GetTagsResponse struct {
Tags []Tag `json:"tags"`
}
type GetTaskOptions ¶
type GetTaskTemplateResponse ¶
type GetTaskTemplateResponse struct {
Templates []Template `json:"templates"`
}
type GetTasksOptions ¶
type GetTasksOptions struct { Archived bool `url:"archived,omitempty"` Page int `url:"page,omitempty"` OrderBy string `url:"order_by,omitempty"` Reverse bool `url:"reverse,omitempty"` Subtasks bool `url:"subtasks,omitempty"` Statuses []string `url:"statuses[],omitempty"` IncludeClosed bool `url:"include_closed,omitempty"` Assignees []string `url:"assignees[],omitempty"` DueDateGt int64 `url:"due_date_gt,omitempty"` DueDateLt int64 `url:"due_date_lt,omitempty"` DateCreatedGt int64 `url:"date_created_gt,omitempty"` DateCreatedLt int64 `url:"date_created_lt,omitempty"` DateUpdatedGt int64 `url:"date_updated_gt,omitempty"` DateUpdatedLt int64 `url:"date_updated_lt,omitempty"` }
TODO: Implement custom field
type GetTasksResponse ¶
type GetTasksResponse struct {
Tasks []Task `json:"tasks"`
}
type GetTeamsResponse ¶
type GetTeamsResponse struct {
Teams []Team `json:"teams"`
}
type GetViewTasksResponse ¶
type GetViewsResponse ¶
type GetViewsResponse struct {
Views []View `json:"views"`
}
type GetWebhooksResponse ¶
type GetWebhooksResponse struct {
Webhooks []Webhook `json:"webhooks"`
}
type Goal ¶
type Goal struct { ID string `json:"id"` PrettyID string `json:"pretty_id"` Name string `json:"name"` TeamID string `json:"team_id"` Creator int `json:"creator"` Owner GoalOwner `json:"owner"` 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"` FolderAccess string `json:"folder_access,omitempty"` Pinned bool `json:"pinned"` Owners []GoalOwner `json:"owners"` KeyResultCount int `json:"key_result_count"` Members []GoalMember `json:"members"` GroupMembers []GoalMember `json:"group_members"` PercentCompleted int `json:"percent_completed"` }
type GoalFolder ¶
type GoalFolder struct { ID string `json:"id"` Name string `json:"name"` TeamID string `json:"team_id"` Private bool `json:"private"` DateCreated string `json:"date_created"` Creator int `json:"creator"` GoalCount int `json:"goal_count"` GroupMembers []GoalMember `json:"group_members"` Goals []Goal `json:"goals"` }
type GoalMember ¶
type GoalMember struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` Color string `json:"color"` PermissionLevel string `json:"permission_level"` ProfilePicture string `json:"profilePicture,omitempty"` Initials string `json:"initials"` IsCreator bool `json:"isCreator"` }
type GoalsService ¶
type GoalsService service
func (*GoalsService) CreateGoal ¶
func (s *GoalsService) CreateGoal(ctx context.Context, teamID int, createGoalRequest *CreateGoalRequest) (*Goal, *Response, error)
func (*GoalsService) CreateKeyResult ¶
func (s *GoalsService) CreateKeyResult(ctx context.Context, goalID string, createKeyResultRequest *CreateKeyResultRequest) (*KeyResult, *Response, error)
Key result types can be number, currency, boolean, percentage, or automatic. The task ID's array and list ID's array can be used to attach resources to the goal.
func (*GoalsService) DeleteGoal ¶
func (*GoalsService) DeleteKeyResult ¶
func (*GoalsService) EditKeyResult ¶
func (s *GoalsService) EditKeyResult(ctx context.Context, keyResultID string, editKeyResultRequest *EditKeyResultRequest) (*KeyResult, *Response, error)
func (*GoalsService) GetGoals ¶
func (s *GoalsService) GetGoals(ctx context.Context, teamID string, includeCompleted bool) ([]Goal, []GoalFolder, *Response, error)
Use includeCompleted to include new, in progress, and completed goals in the response.
func (*GoalsService) UpdateGoal ¶
func (s *GoalsService) UpdateGoal(ctx context.Context, goalID string, updateGoalRequest *UpdateGoalRequest) (*Goal, *Response, error)
type KeyResult ¶
type KeyResult struct { ID string `json:"id"` GoalID string `json:"goal_id"` Name string `json:"name"` Type string `json:"type"` Unit string `json:"unit"` Creator int `json:"creator"` DateCreated string `json:"date_created"` GoalPrettyID string `json:"goal_pretty_id"` PercentCompleted int `json:"percent_completed,omitempty"` Completed bool `json:"completed"` TaskIds []string `json:"task_ids"` SubcategoryIds []string `json:"subcategory_ids"` Owners []GoalOwner `json:"owners"` LastAction LastAction `json:"last_action"` }
type KeyResultResponse ¶
type KeyResultResponse struct {
KeyResult KeyResult `json:"key_result"`
}
type LastAction ¶
type LinkedTask ¶
type List ¶
type List struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"orderindex"` Content string `json:"content"` Status struct { Status string `json:"status"` Color string `json:"color"` HideLabel bool `json:"hide_label"` } `json:"status"` Priority struct { Priority string `json:"priority"` Color string `json:"color"` } `json:"priority"` Assignee User `json:"assignee,omitempty"` TaskCount json.Number `json:"task_count"` DueDate string `json:"due_date"` DueDateTime bool `json:"due_date_time"` StartDate string `json:"start_date"` StartDateTime bool `json:"start_date_time"` 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"` Statuses []struct { Status string `json:"status"` Orderindex int `json:"orderindex"` Color string `json:"color"` Type string `json:"type"` } `json:"statuses"` InboundAddress string `json:"inbound_address"` Archived bool `json:"archived"` PermissionLevel string `json:"permission_level"` }
type ListOfFolderBelonging ¶
type ListOfFolderBelonging struct { ID string `json:"id"` Name string `json:"name"` Orderindex int `json:"orderindex"` Status interface{} `json:"status"` Priority interface{} `json:"priority"` Assignee interface{} `json:"assignee"` TaskCount json.Number `json:"task_count"` DueDate interface{} `json:"due_date"` StartDate interface{} `json:"start_date"` Space struct { ID string `json:"id"` Name string `json:"name"` Access bool `json:"access"` } `json:"space"` Archived bool `json:"archived"` OverrideStatuses interface{} `json:"override_statuses"` Statuses []struct { ID string `json:"id"` Status string `json:"status"` Orderindex int `json:"orderindex"` Color string `json:"color"` Type string `json:"type"` } `json:"statuses"` PermissionLevel string `json:"permission_level,omitempty"` }
type ListOfTaskBelonging ¶
type ListRequest ¶
type ListsService ¶
type ListsService service
func (*ListsService) AddTaskToList ¶
func (*ListsService) CreateFolderlessList ¶
func (s *ListsService) CreateFolderlessList(ctx context.Context, spaceID int, listRequest *ListRequest) (List, *Response, error)
Assignee is a userid of the assignee to be added to this task. Priority is an integer mapping as 1 : Urgent, 2 : High, 3 : Normal, 4 : Low. The status included in the body of this request refers to the List color rather than the task Statuses available in the List.
func (*ListsService) CreateList ¶
func (s *ListsService) CreateList(ctx context.Context, folderID string, listRequest *ListRequest) (List, *Response, error)
Assignee is a userid of the assignee to be added to this task. Priority is an integer mapping as 1 : Urgent, 2 : High, 3 : Normal, 4 : Low. The status included in the body of this request refers to the List color rather than the task Statuses available in the List.
func (*ListsService) DeleteList ¶
func (*ListsService) GetFolderlessLists ¶
func (s *ListsService) GetFolderlessLists(ctx context.Context, spaceID string, archived bool) ([]List, *Response, error)
The status included in the body of the response refers to the List color rather than the task Statuses available in the List.
func (*ListsService) GetList ¶
The status included in the body of the response refers to the List color rather than the task Statuses available in the List.
func (*ListsService) GetLists ¶
func (s *ListsService) GetLists(ctx context.Context, folderID string, archived bool) ([]List, *Response, error)
The status included in the body of the response refers to the List color rather than the task Statuses available in the List.
func (*ListsService) RemoveTaskFromList ¶
func (*ListsService) UpdateList ¶
func (s *ListsService) UpdateList(ctx context.Context, listID string, listRequest *ListRequest) (List, *Response, error)
Only pass the properties you want to update. It is unnessary to pass the entire list object. Assignee is a userid of the assignee to be added to this task. Priority is an integer mapping as 1 : Urgent, 2 : High, 3 : Normal, 4 : Low. You can set a List color using status as shown in Create List and Create Folderless List, or use unset_status as shown in the body of the example request below to clear the List color.
type MembersService ¶
type MembersService service
func (*MembersService) GetListMembers ¶
func (*MembersService) GetTaskMembers ¶
type Portfolios ¶
type Portfolios struct {
Enabled bool `json:"enabled"`
}
type ProjectOfTaskBelonging ¶
type Rate ¶
type Rate struct { // The number of requests per hour the client is currently limited to. Limit int `json:"limit"` // The number of remaining requests the client can make this hour. Remaining int `json:"remaining"` // The time at which the current rate limit will reset. Reset Timestamp `json:"reset"` }
Rate represents the rate limit for the current client.
type RateLimitError ¶
type RateLimitError struct { Rate Rate // Rate specifies last known rate limit for the client Response *http.Response // HTTP response that caused this error Message string `json:"message"` // error message }
RateLimitError occurs when Clickup returns 429 Too Many Requests response with a rate limit remaining value of 0.
func (*RateLimitError) Error ¶
func (r *RateLimitError) Error() string
func (*RateLimitError) Is ¶
func (r *RateLimitError) Is(target error) bool
Is returns whether the provided error equals this error.
type RawOptions ¶
type RawOptions struct {
Type RawType
}
RawOptions specifies parameters when user wants to get raw format of a response instead of JSON.
type RawType ¶
type RawType uint8
RawType represents type of raw format of a request instead of JSON.
type RemapDependencies ¶
type RemapDependencies struct {
Enabled bool `json:"enabled"`
}
type Response ¶
type Response struct { *http.Response // Explicitly specify the Rate type so Rate's String() receiver doesn't // propagate to Response. Rate Rate }
Response is a Clickup API response. This wraps the standard http.Response returned from Clickup. Clickup does not currently support pagination, but if it did, we would provides convenient access to things like pagination links as if go-github.
type SharedHierarchyResponse ¶
type SharedHierarchyResponse struct {
}type SharedHierarchyService ¶
type SharedHierarchyService service
func (*SharedHierarchyService) SharedHierarchy ¶
func (s *SharedHierarchyService) SharedHierarchy(ctx context.Context, teamID int) (*Shared, *Response, error)
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.
type Space ¶
type Space 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:"orderindex"` Color string `json:"color"` } `json:"statuses"` MultipleAssignees bool `json:"multiple_assignees"` Features struct { DueDates DueDates `json:"due_dates"` Sprints struct { Enabled bool `json:"enabled"` } `json:"sprints"` TimeTracking TimeTracking `json:"time_tracking"` Points struct { Enabled bool `json:"enabled"` } `json:"points"` CustomItems struct { Enabled bool `json:"enabled"` } `json:"custom_items"` Tags Tags `json:"tags"` TimeEstimates TimeEstimates `json:"time_estimates"` CheckUnresolved struct { Enabled bool `json:"enabled"` Subtasks bool `json:"subtasks"` Checklists interface{} `json:"checklists"` Comments interface{} `json:"comments"` } `json:"check_unresolved"` Zoom struct { Enabled bool `json:"enabled"` } `json:"zoom"` Milestones struct { Enabled bool `json:"enabled"` } `json:"milestones"` RemapDependencies RemapDependencies `json:"remap_dependencies"` DependencyWarning DependencyWarning `json:"dependency_warning"` MultipleAssignees struct { Enabled bool `json:"enabled"` } `json:"multiple_assignees"` Emails struct { Enabled bool `json:"enabled"` } `json:"emails"` } `json:"features"` Archived bool `json:"archived"` }
type SpaceOfFolderBelonging ¶
type SpaceOfTaskBelonging ¶
type SpaceOfTaskBelonging struct {
ID string `json:"id"`
}
type SpaceRequest ¶
type SpacesService ¶
type SpacesService service
func (*SpacesService) CreateSpace ¶
func (s *SpacesService) CreateSpace(ctx context.Context, teamID int, spaceRequest *SpaceRequest) (*Space, *Response, error)
func (*SpacesService) DeleteSpace ¶
func (*SpacesService) UpdateSpace ¶
func (s *SpacesService) UpdateSpace(ctx context.Context, spaceID int, spaceRequest *SpaceRequest) (*Space, *Response, error)
type TagOptions ¶
type TagRequest ¶
type TagRequest struct {
Tag Tag `json:"tag"`
}
type TagsService ¶
type TagsService service
func (*TagsService) AddTagToTask ¶
func (s *TagsService) AddTagToTask(ctx context.Context, taskID string, tagName string, opts *TagOptions) (*Response, error)
func (*TagsService) CreateSpaceTag ¶
func (s *TagsService) CreateSpaceTag(ctx context.Context, spaceID string, tagReq *TagRequest) (*Response, error)
func (*TagsService) DeleteSpaceTag ¶
func (*TagsService) EditSpaceTag ¶
func (s *TagsService) EditSpaceTag(ctx context.Context, spaceID string, tagName string, tagReq *TagRequest) (*Response, error)
func (*TagsService) RemoveTagToTask ¶
func (s *TagsService) RemoveTagToTask(ctx context.Context, taskID string, tagName string, opts *TagOptions) (*Response, error)
type Task ¶
type Task struct { ID string `json:"id"` CustomID string `json:"custom_id"` Name string `json:"name"` TextContent string `json:"text_content"` Description string `json:"description"` Status TaskStatus `json:"status"` Orderindex string `json:"orderindex"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` DateClosed string `json:"date_closed"` Archived bool `json:"archived"` Creator User `json:"creator"` Assignees []User `json:"assignees,omitempty"` Watchers []User `json:"watchers,omitempty"` Checklists []Checklist `json:"checklists,omitempty"` Tags []Tag `json:"tags,omitempty"` Parent string `json:"parent"` Priority TaskPriority `json:"priority"` DueDate string `json:"due_date,omitempty"` StartDate string `json:"start_date,omitempty"` Points int `json:"points,omitempty"` TimeEstimate int64 `json:"time_estimate"` CustomFields []CustomField `json:"custom_fields"` Dependencies []Dependence `json:"dependencies"` LinkedTasks []LinkedTask `json:"linked_tasks"` TeamID string `json:"team_id"` URL string `json:"url"` PermissionLevel string `json:"permission_level"` List ListOfTaskBelonging `json:"list"` Project ProjectOfTaskBelonging `json:"project"` Folder FolderOftaskBelonging `json:"folder"` Space SpaceOfTaskBelonging `json:"space"` SubTasks []Task `json:"subtasks"` }
type TaskAttachementOptions ¶
type TaskAttachementOptions struct { CustomTaskIDs bool `url:"custom_task_ids,omitempty"` TeamID int `url:"team_id,omitempty"` }
If you want to reference a task by it's custom task id, this value must be true. team_id is only used when the parameter is set to custom_task_ids=trueExample. Example: custom_task_ids=true&team_id=123
type TaskCommentOptions ¶
type TaskLinkOptions ¶
type TaskLinkResponse ¶
type TaskLinkResponse struct {
Task Task `json:"task"`
}
type TaskPriority ¶
type TaskRequest ¶
type TaskRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Assignees []int `json:"assignees,omitempty"` Tags []string `json:"tags,omitempty"` Status string `json:"status,omitempty"` Priority int `json:"priority,omitempty"` DueDate int64 `json:"due_date,omitempty"` DueDateTime bool `json:"due_date_time,omitempty"` TimeEstimate int `json:"time_estimate,omitempty"` StartDate int64 `json:"start_date,omitempty"` StartDateTime bool `json:"start_date_time,omitempty"` NotifyAll bool `json:"notify_all,omitempty"` Parent string `json:"parent,omitempty"` LinksTo string `json:"links_to,omitempty"` CheckRequiredCustomFields bool `json:"check_required_custom_fields,omitempty"` CustomFields []CustomFieldInTaskRequest `json:"custom_fields,omitempty"` }
type TaskStatus ¶
type TaskStatusHistory ¶
type TaskStatusHistory struct { Status string `json:"status"` Color string `json:"color"` Type string `json:"type"` TotalTime CurrentTaskStatusTotalTime `json:"total_time"` Orderindex int `json:"orderindex"` }
type TaskTemplatesService ¶
type TaskTemplatesService service
func (*TaskTemplatesService) CreateTaskFromTemplate ¶
func (s *TaskTemplatesService) CreateTaskFromTemplate(ctx context.Context, listID string, templateID string, taskReq CreateTaskFromTemplateRequest) (*Task, *Response, error)
func (*TaskTemplatesService) GetTaskTemplates ¶
func (s *TaskTemplatesService) GetTaskTemplates(ctx context.Context, teamID int, page int) ([]Template, *Response, error)
To page task templates, pass the page number you wish to fetch.
type TasksInStatus ¶
type TasksInStatus struct { CurrentStatus CurrentTaskStatus `json:"current_status"` StatusHistory []TaskStatusHistory `json:"status_history"` // contains filtered or unexported fields }
type TasksService ¶
type TasksService service
func (*TasksService) CreateTask ¶
func (s *TasksService) CreateTask(ctx context.Context, listID string, tr *TaskRequest) (*Task, *Response, error)
func (*TasksService) DeleteTask ¶
func (s *TasksService) DeleteTask(ctx context.Context, taskID string, opts *GetTaskOptions) (*Response, error)
func (*TasksService) GetBulkTasksTimeInStatus ¶
func (s *TasksService) GetBulkTasksTimeInStatus(ctx context.Context, taskIDs []string, opts *GetBulkTasksTimeInStatusOptions) ([]TasksInStatus, *Response, error)
You must include at least 2 task_ids.
func (*TasksService) GetFilteredTeamTasks ¶
func (s *TasksService) GetFilteredTeamTasks(ctx context.Context, teamID string, opts *GetTasksOptions) ([]Task, *Response, error)
This request will always return paged responses. If you do not include the page parameter, it will return page 0. Each page includes 100 tasks.
func (*TasksService) GetTask ¶
func (s *TasksService) GetTask(ctx context.Context, taskID string, opts *GetTaskOptions) (*Task, *Response, error)
func (*TasksService) GetTasks ¶
func (s *TasksService) GetTasks(ctx context.Context, listID string, opts *GetTasksOptions) ([]Task, *Response, error)
The maximum number of tasks returned in this response is 100. When you are paging this request, you should check list limit against the length of each response to determine if you are on the last page.
func (*TasksService) GetTasksTimeInStatus ¶
func (s *TasksService) GetTasksTimeInStatus(ctx context.Context, taskID string, opts *GetTaskOptions) (*TasksInStatus, *Response, error)
func (*TasksService) UpdateTask ¶
func (s *TasksService) UpdateTask(ctx context.Context, taskID string, opts *GetTasksOptions, tr *TaskRequest) (*Task, *Response, error)
FIXME: assignees add/rem
type Team ¶
type Team struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` Avatar interface{} `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 interface{} `json:"custom_role"` LastActive string `json:"last_active"` DateJoined string `json:"date_joined"` DateInvited string `json:"date_invited"` }
type TeamsService ¶
type TeamsService service
type TimeEstimates ¶
type TimeTracking ¶
type TimeTracking struct {
Enabled bool `json:"enabled"`
}
type Timestamp ¶
Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or Unix timestamp. This is necessary for some fields since the Clickup API is inconsistent in how it represents times. All exported methods of time.Time can be called on Timestamp.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.
type UpdateCommentRequest ¶
type UpdateGoalRequest ¶
type User ¶
type User struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` Color string `json:"color"` ProfilePicture string `json:"profilePicture,omitempty"` Initials string `json:"initials"` WeekStartDay int `json:"week_start_day,omitempty"` GlobalFontSupport bool `json:"global_font_support"` Timezone string `json:"timezone"` }
type View ¶
type View 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"` Name string `json:"name"` } `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:"orderindex"` }
type ViewResponse ¶
type ViewResponse struct {
View View `json:"view"`
}
type ViewsService ¶
type ViewsService service
func (*ViewsService) CreateViewOf ¶
func (*ViewsService) DeleteView ¶
func (*ViewsService) GetViewTasks ¶
func (s *ViewsService) GetViewTasks(ctx context.Context, viewID string, page int) ([]Task, bool, *Response, error)
This request will always return paged responses. Each page includes 30 tasks.
func (*ViewsService) GetViewsOf ¶
func (*ViewsService) UpdateView ¶
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 []string `json:"events"` TaskID string `json:"task_id,omitempty"` ListID int `json:"list_id,omitempty"` FolderID string `json:"folder_id,string"` SpaceID string `json:"space_id,omitempty"` Health webhookHealth `json:"health"` Secret string `json:"secret"` }
type WebhookRequest ¶
type WebhookRequest struct { Endpoint string `json:"endpoint"` Events []string `json:"events"` Status string `json:"status,omitempty"` TaskID string `json:"task_id,omitempty"` ListID int `json:"list_id,omitempty"` FolderID string `json:"folder_id,omitempty"` SpaceID string `json:"space_id,omitempty"` }
You may filter the location of resources that get sent to a webhook by passing an optional space_id, folder_id, list_id, or task_id in the body of the request. Status is only available for update. Below are a list of events that you can subscribe to in order to listen to specific changes to your resources. You can also pass the wildcard * to listen to all events that are available. - taskCreated - taskUpdated - taskDeleted - taskPriorityUpdated - taskStatusUpdated - taskAssigneeUpdated - taskDueDateUpdated - taskTagUpdated - taskMoved - taskCommentPosted - taskCommentUpdated - taskTimeEstimateUpdated - taskTimeTrackedUpdated - listCreated - listUpdated - listDeleted - folderCreated - folderUpdated - folderDeleted - spaceCreated - spaceUpdated - spaceDeleted - goalCreated - goalUpdated - goalDeleted - keyResultCreated - keyResultUpdated - keyResultDeleted
type WebhookResponse ¶
type WebhooksService ¶
type WebhooksService service
func (*WebhooksService) CreateWebhook ¶
func (s *WebhooksService) CreateWebhook(ctx context.Context, teamID int, webhookReq *WebhookRequest) (*WebhookResponse, *Response, error)
func (*WebhooksService) DeleteWebhook ¶
func (*WebhooksService) GetWebhook ¶
func (*WebhooksService) UpdateWebhook ¶
func (s *WebhooksService) UpdateWebhook(ctx context.Context, webhookID string, webhookReq *WebhookRequest) (*WebhookResponse, *Response, error)