Documentation ¶
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Float64(v float64) *float64
- 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 AttachmentValue
- type AttachmentsService
- type AttachmentsValue
- 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 AutomaticProgressTypeConfig
- type AutomaticProgressValue
- 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 CreateTimeTrackingOptions
- type CreateTimeTrackingResponse
- type CreateUserGroupRequest
- type CurrencyTypeConfig
- type CurrencyValue
- type CurrentTaskStatus
- type CurrentTaskStatusTotalTime
- type CustomField
- type CustomFieldInGetTasksRequest
- type CustomFieldInGetTasksRequestOperator
- type CustomFieldInTaskRequest
- type CustomFieldOptions
- type CustomFieldResponse
- type CustomFields
- type CustomFieldsInGetTasksRequest
- 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 CustomItem
- type CustomItemAvatar
- type CustomTaskTypesService
- type Date
- 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 DropDownOption
- type DropDownTypeConfig
- type DropDownValue
- type DueDates
- type EditKeyResultRequest
- type EmojiTypeConfig
- type EmojiValue
- 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 GetCustomTaskTypesResponse
- type GetFolderResponse
- type GetFoldersResponse
- type GetGoalResponse
- type GetGoalsResponse
- type GetListsResponse
- type GetMembersResponse
- type GetSpacesResponse
- type GetTagsResponse
- type GetTaskLocation
- type GetTaskOptions
- type GetTaskTemplateResponse
- type GetTasksOptions
- type GetTasksResponse
- type GetTeamsResponse
- type GetTimeTrackingData
- type GetTimeTrackingOptions
- type GetTimeTrackingResponse
- type GetUserGroupsOptions
- type GetUserGroupsResponse
- 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 GroupMember
- type Guests
- type InvitedBy
- type Item
- type KeyResult
- type KeyResultResponse
- type LabelOption
- type LabelsTypeConfig
- type LabelsValue
- 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 LocationValue
- type ManualProgressTypeConfig
- type ManualProgressValue
- type Member
- type Members
- type MembersService
- type Plan
- type PlanResponse
- type Point
- type Portfolios
- type ProjectOfTaskBelonging
- type Rate
- type RateLimitError
- type RawOptions
- type RawType
- type Reaction
- type RemapDependencies
- type Response
- type Seats
- type SeatsResponse
- 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, archived bool) ([]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 TaskAssigneeUpdateRequest
- type TaskAttachementOptions
- type TaskAttachment
- type TaskCommentOptions
- type TaskLinkOptions
- type TaskLinkResponse
- type TaskLocation
- type TaskPriority
- type TaskRequest
- type TaskStatus
- type TaskStatusHistory
- type TaskTemplatesService
- type TaskUpdateRequest
- type TaskValue
- 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 *GetTaskOptions, ...) (*Task, *Response, error)
- type TasksValue
- type Team
- type TeamMember
- type TeamUser
- type TeamsService
- type Template
- type TimeEstimates
- type TimeTracking
- type TimeTrackingData
- type TimeTrackingRequest
- type TimeTrackingTag
- type TimeTrackingsService
- func (s *TimeTrackingsService) CreateTimeTracking(ctx context.Context, teamID string, opts *CreateTimeTrackingOptions, ...) (*CreateTimeTrackingResponse, *Response, error)
- func (s *TimeTrackingsService) GetSingularTimeEntry(ctx context.Context, teamID string, timerID string, ...) (*GetTimeTrackingResponse, *Response, error)
- type Timestamp
- type UpdateCommentRequest
- type UpdateGoalRequest
- type UpdateUserGroupMember
- type UpdateUserGroupRequest
- type User
- type UserGroup
- type UserGroupAvatar
- type UserGroupRequest
- type UserGroupsService
- func (s *UserGroupsService) CreateUserGroup(ctx context.Context, teamID string, ...) (*UserGroup, *Response, error)
- func (s *UserGroupsService) DeleteUserGroup(ctx context.Context, groupID string) (*Response, error)
- func (s *UserGroupsService) GetUserGroups(ctx context.Context, opts *GetUserGroupsOptions) ([]UserGroup, *Response, error)
- func (s *UserGroupsService) UpdateUserGroup(ctx context.Context, groupID string, ...) (*UserGroup, *Response, error)
- type UserValue
- type UsersValue
- 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 Float64 ¶
float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.
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 AttachmentValue ¶
type AttachmentValue struct { ID string Version json.Number Date json.Number Title string Extension string ThumbnailSmall string ThumbnailMedium string ThumbnailLarge string URL string Orientation interface{} Type json.Number Hidden bool Size json.Number ParentId string ParentCommentType interface{} ParentCommentParent interface{} EmailData interface{} UrlWHost string UrlWQuery string Source json.Number IsFolder interface{} Mimetype interface{} TotalComments json.Number ResolvedComments json.Number Deleted bool User UserValue }
TODO: Set a concrete type for each field.
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 AttachmentsValue ¶
type AttachmentsValue []AttachmentValue
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 AutomaticProgressValue ¶
type AutomaticProgressValue struct { PercentCompleted float64 TypeConfig AutomaticProgressTypeConfig }
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 CustomTaskTypes *CustomTaskTypesService Dependencies *DependenciesService Goals *GoalsService Tasks *TasksService TaskTemplates *TaskTemplatesService Teams *TeamsService TimeTrackings *TimeTrackingsService Spaces *SpacesService Folders *FoldersService Lists *ListsService Members *MembersService Tags *TagsService Views *ViewsService Webhooks *WebhooksService UserGroups *UserGroupsService // 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 int `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 CreateTimeTrackingResponse ¶
type CreateTimeTrackingResponse struct {
Data TimeTrackingData `json:"data"`
}
type CreateUserGroupRequest ¶
type CurrencyTypeConfig ¶
type CurrencyValue ¶
type CurrencyValue struct { Value float64 TypeConfig CurrencyTypeConfig }
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"` TypeConfig interface{} `json:"type_config"` DateCreated string `json:"date_created"` HideFromGuests bool `json:"hide_from_guests"` Value interface{} `json:"value"` }
func (CustomField) GetValue ¶
func (cf CustomField) GetValue() interface{}
type CustomFieldInGetTasksRequest ¶
type CustomFieldInGetTasksRequest struct { FieldId string `url:"field_id"` Operator CustomFieldInGetTasksRequestOperator `url:"operator"` Value []string `url:"value,omitempty,comma"` }
type CustomFieldInGetTasksRequestOperator ¶
type CustomFieldInGetTasksRequestOperator int
CustomFieldInGetTasksRequestOperator Values are found here https://clickup.com/api/developer-portal/filtertasks/
const ( Equals CustomFieldInGetTasksRequestOperator = iota //= LessThan // < LessThanOrEqualTo // <= GreaterThan // > (greater than) GreaterThanOrEqualTo // > = (greater than or equal to) NotEqualTo // != (not equal to) IsNull // IS NULL (is not set) IsNotNull // IS NOT NULL (is set) Range // (is between) Any // (contains any matching criteria) All // (contains all matching criteria) NotAny // (does not contain any mathching criteria) NotAll // (does not contain all of the matching criteria) )
func (CustomFieldInGetTasksRequestOperator) String ¶
func (c CustomFieldInGetTasksRequestOperator) String() string
type CustomFieldInTaskRequest ¶
type CustomFieldInTaskRequest struct { ID string `json:"id"` Value interface{} `json:"value"` }
type CustomFieldOptions ¶
type CustomFieldResponse ¶
type CustomFieldResponse struct {
Fields []CustomField `json:"fields"`
}
type CustomFields ¶
type CustomFields struct {
Enabled bool `json:"enabled"`
}
type CustomFieldsInGetTasksRequest ¶
type CustomFieldsInGetTasksRequest []CustomFieldInGetTasksRequest
CustomFieldsInGetTasksRequest is used to filter tasks using Custom Fields for GetTasks
func (CustomFieldsInGetTasksRequest) EncodeValues ¶
func (cfs CustomFieldsInGetTasksRequest) EncodeValues(key string, v *url.Values) error
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 CustomItem ¶
type CustomItem struct { Id int32 `json:"id,omitempty"` // Custom task type ID. Name string `json:"name,omitempty"` // Custom task type name. NamePlural string `json:"name_plural,omitempty"` // Custom task type plural name. Description string `json:"description,omitempty"` // Custom task type description. // Not documented in API explorer Avatar CustomItemAvatar `json:"avatar,omitempty"` // Custom task icon data. }
See https://clickup.com/api/clickupreference/operation/GetCustomItems/
type CustomItemAvatar ¶
type CustomItemAvatar struct { Source string `json:"source,omitempty"` // null (ClickUp Milestone Glyph), fas (Font Awesome Solid), fab (Font Awesome Brands). Value string `json:"value,omitempty"` // null is for ClickUp Glyphs, e.g., Task and Milestone. }
Not documented in API explorer. Comments are observations.
type CustomTaskTypesService ¶
type CustomTaskTypesService service
func (*CustomTaskTypesService) GetCustomTaskTypes ¶
func (s *CustomTaskTypesService) GetCustomTaskTypes(ctx context.Context, teamId string) ([]CustomItem, *Response, error)
See https://clickup.com/api/clickupreference/operation/GetCustomItems/
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
func NewDateWithUnixTime ¶
func (Date) Equal ¶
Equal reports whether x and y are equal. This method was added to test with google/go-cmp. ref: https://pkg.go.dev/github.com/google/go-cmp/cmp#Equal
func (Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
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 DropDownOption ¶
type DropDownTypeConfig ¶
type DropDownTypeConfig struct { Default float64 Placeholder string Options []DropDownOption }
type DropDownValue ¶
type DropDownValue struct { Value DropDownOption TypeConfig DropDownTypeConfig }
type EditKeyResultRequest ¶
type EmojiTypeConfig ¶
type EmojiValue ¶
type EmojiValue struct { Value int TypeConfig EmojiTypeConfig }
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 Err string `json:"err"` ECode string `json:"ECODE"` 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 json.Number `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 GetCustomTaskTypesResponse ¶
type GetCustomTaskTypesResponse struct {
CustomItems []CustomItem `json:"custom_items,omitempty"` // Array of custom task types.
}
See https://clickup.com/api/clickupreference/operation/GetCustomItems/
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 GetTaskLocation ¶
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"` Tags []string `url:"tags[],omitempty"` DueDateGt *Date `url:"due_date_gt,omitempty"` DueDateLt *Date `url:"due_date_lt,omitempty"` DateCreatedGt *Date `url:"date_created_gt,omitempty"` DateCreatedLt *Date `url:"date_created_lt,omitempty"` DateUpdatedGt *Date `url:"date_updated_gt,omitempty"` DateUpdatedLt *Date `url:"date_updated_lt,omitempty"` CustomFields CustomFieldsInGetTasksRequest `url:"custom_fields,omitempty"` }
type GetTasksResponse ¶
type GetTasksResponse struct {
Tasks []Task `json:"tasks"`
}
type GetTeamsResponse ¶
type GetTeamsResponse struct {
Teams []Team `json:"teams"`
}
type GetTimeTrackingData ¶
type GetTimeTrackingData struct { ID string `json:"id"` Wid string `json:"wid"` User User `json:"user"` Billable bool `json:"billable"` Start string `json:"start"` End string `json:"end"` Duration string `json:"duration"` Description string `json:"description"` Source string `json:"source"` At string `json:"at"` IsLocked bool `json:"is_locked"` TaskLocation GetTaskLocation `json:"task_location"` Task Task `json:"task"` Tags []TimeTrackingTag `json:"tags"` TaskURL string `json:"task_url"` }
type GetTimeTrackingOptions ¶
type GetTimeTrackingResponse ¶
type GetTimeTrackingResponse struct {
Data GetTimeTrackingData `json:"data"`
}
type GetUserGroupsOptions ¶
type GetUserGroupsResponse ¶
type GetUserGroupsResponse struct {
UserGroups []UserGroup `json:"groups"`
}
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 bool `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 float64 `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 GroupMember ¶
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 float64 `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 LabelOption ¶
type LabelsTypeConfig ¶
type LabelsTypeConfig struct {
Options []LabelOption
}
type LabelsValue ¶
type LabelsValue struct { Values []LabelOption TypeConfig LabelsTypeConfig }
type LastAction ¶
type LinkedTask ¶
type List ¶
type List struct { ID string `json:"id"` Name string `json:"name"` Orderindex json.Number `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 json.Number `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 json.Number `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 json.Number `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 LocationValue ¶
type ManualProgressValue ¶
type ManualProgressValue struct { PercentCompleted float64 Current int64 TypeConfig ManualProgressTypeConfig }
type MembersService ¶
type MembersService service
func (*MembersService) GetListMembers ¶
func (*MembersService) GetTaskMembers ¶
type PlanResponse ¶
type PlanResponse struct {
Plan
}
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 SeatsResponse ¶
type SeatsResponse struct {
Seats
}
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 json.Number `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"` CustomItemId int `json:"custom_item_id"` // A null value means this item is a task. A value of 1 is a Milestone. Any other number is a custom task type. Name string `json:"name"` TextContent string `json:"text_content"` Description string `json:"description"` Status TaskStatus `json:"status"` Orderindex json.Number `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 *Date `json:"due_date,omitempty"` StartDate string `json:"start_date,omitempty"` Points Point `json:"points,omitempty"` TimeEstimate int64 `json:"time_estimate"` TimeSpent int64 `json:"time_spent"` 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"` Attachments []TaskAttachment `json:"attachments"` }
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 TaskAttachment ¶
type TaskAttachment struct { ID string `json:"id"` Date string `json:"date"` Title string `json:"title"` Type int `json:"type"` Source int `json:"source"` Version int `json:"version"` Extension string `json:"extension"` ThumbnailSmall string `json:"thumbnail_small"` ThumbnailMedium string `json:"thumbnail_medium"` ThumbnailLarge string `json:"thumbnail_large"` IsFolder bool `json:"is_folder"` Mimetype string `json:"mimetype"` Hidden bool `json:"hidden"` ParentId string `json:"parent_id"` Size int `json:"size"` TotalComments int `json:"total_comments"` ResolvedComments int `json:"resolved_comments"` User User `json:"user"` Deleted bool `json:"deleted"` Orientation string `json:"orientation"` Url string `json:"url"` EmailData string `json:"email_data"` UrlWQuery string `json:"url_w_query"` UrlWHost string `json:"url_w_host"` }
type TaskCommentOptions ¶
type TaskLinkOptions ¶
type TaskLinkResponse ¶
type TaskLinkResponse struct {
Task Task `json:"task"`
}
type TaskLocation ¶
type TaskPriority ¶
type TaskRequest ¶
type TaskRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` MarkdownDescription string `json:"markdown_description,omitempty"` Assignees []int `json:"assignees,omitempty"` Tags []string `json:"tags,omitempty"` Status string `json:"status,omitempty"` Priority int `json:"priority,omitempty"` DueDate *Date `json:"due_date,omitempty"` DueDateTime bool `json:"due_date_time,omitempty"` TimeEstimate int `json:"time_estimate,omitempty"` StartDate *Date `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"` CustomItemId int `json:"custom_item_id,omitempty"` // To create a task that doesn't use a custom task type, either don't include this field in the request body, or send 'null'. To create this task as a Milestone, send a value of 1. To use a custom task type, send the custom task type ID as defined in your Workspace, such as 2. }
See https://clickup.com/api/clickupreference/operation/CreateTask/
type TaskStatus ¶
type TaskStatusHistory ¶
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 TaskUpdateRequest ¶
type TaskUpdateRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Assignees TaskAssigneeUpdateRequest `json:"assignees,omitempty"` Tags []string `json:"tags,omitempty"` Status string `json:"status,omitempty"` Priority int `json:"priority,omitempty"` DueDate *Date `json:"due_date,omitempty"` DueDateTime bool `json:"due_date_time,omitempty"` TimeEstimate int `json:"time_estimate,omitempty"` StartDate *Date `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"` CustomItemId int `json:"custom_item_id,omitempty"` // To create a task that doesn't use a custom task type, either don't include this field in the request body, or send 'null'. To create this task as a Milestone, send a value of 1. To use a custom task type, send the custom task type ID as defined in your Workspace, such as 2. }
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 *GetTaskOptions, tr *TaskUpdateRequest) (*Task, *Response, error)
FIXME: assignees add/rem
type TasksValue ¶
type TasksValue []TaskValue
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
func (*TeamsService) GetPlan ¶
Teams is the legacy term for what are now called Workspaces in ClickUp. For compatablitly, the term team is still used in this API. This is NOT the new "Teams" feature which represents a group of users.
func (*TeamsService) GetSeats ¶
Teams is the legacy term for what are now called Workspaces in ClickUp. For compatablitly, the term team is still used in this API. This is NOT the new "Teams" feature which represents a group of users.
type TimeEstimates ¶
type TimeTracking ¶
type TimeTracking struct {
Enabled bool `json:"enabled"`
}
type TimeTrackingData ¶
type TimeTrackingData struct { ID string `json:"id"` Wid string `json:"wid"` User User `json:"user"` Billable bool `json:"billable"` Start int `json:"start"` End string `json:"end"` Duration int `json:"duration"` Description string `json:"description"` Source string `json:"source"` At int `json:"at"` IsLocked bool `json:"is_locked"` TaskLocation TaskLocation `json:"task_location"` Task Task `json:"task"` Tags []TimeTrackingTag `json:"tags"` TaskURL string `json:"task_url"` }
type TimeTrackingRequest ¶
type TimeTrackingRequest struct { Description string `json:"description,omitempty"` Tags []TimeTrackingTag `json:"tags,omitempty"` Start int64 `json:"start"` End int64 `json:"end,omitempty"` Stop int64 `json:"stop,omitempty"` Billable bool `json:"billable,omitempty"` Duration int32 `json:"duration"` Assignee int `json:"assignee,omitempty"` Tid string `json:"tid,omitempty"` }
See https://clickup.com/api/clickupreference/operation/Createatimeentry/
type TimeTrackingTag ¶
type TimeTrackingsService ¶
type TimeTrackingsService service
func (*TimeTrackingsService) CreateTimeTracking ¶
func (s *TimeTrackingsService) CreateTimeTracking(ctx context.Context, teamID string, opts *CreateTimeTrackingOptions, ttr *TimeTrackingRequest) (*CreateTimeTrackingResponse, *Response, error)
func (*TimeTrackingsService) GetSingularTimeEntry ¶
func (s *TimeTrackingsService) GetSingularTimeEntry(ctx context.Context, teamID string, timerID string, opts *GetTimeTrackingOptions) (*GetTimeTrackingResponse, *Response, error)
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 UpdateUserGroupMember ¶
type UpdateUserGroupRequest ¶
type UpdateUserGroupRequest struct { Name string `json:"name"` Handle string `json:"handle"` Members UpdateUserGroupMember `json:"members"` }
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 UserGroup ¶
type UserGroup struct { ID string `json:"id"` TeamID string `json:"team_id"` UserID int `json:"userid"` Name string `json:"name"` Handle string `json:"handle"` DateCreated string `json:"date_created"` Initials string `json:"initials"` Members []GroupMember `json:"members"` Avatar UserGroupAvatar `json:"avatar"` }
type UserGroupAvatar ¶
type UserGroupRequest ¶
type UserGroupsService ¶
type UserGroupsService service
func (*UserGroupsService) CreateUserGroup ¶
func (s *UserGroupsService) CreateUserGroup(ctx context.Context, teamID string, createUserGroupRequest *CreateUserGroupRequest) (*UserGroup, *Response, error)
func (*UserGroupsService) DeleteUserGroup ¶
func (*UserGroupsService) GetUserGroups ¶
func (s *UserGroupsService) GetUserGroups(ctx context.Context, opts *GetUserGroupsOptions) ([]UserGroup, *Response, error)
func (*UserGroupsService) UpdateUserGroup ¶
func (s *UserGroupsService) UpdateUserGroup(ctx context.Context, groupID string, updateUserGroupRequest *UpdateUserGroupRequest) (*UserGroup, *Response, error)
type UsersValue ¶
type UsersValue []UserValue
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 json.Number `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 int `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)
Source Files ¶
- attachments.go
- authorization.go
- checklists.go
- client.go
- comments.go
- custom_fields.go
- custom_task_types.go
- date.go
- dependencies.go
- folders.go
- goals.go
- lists.go
- members.go
- point.go
- shared_hierarchy.go
- spaces.go
- strings.go
- tags.go
- task_templates.go
- tasks.go
- teams.go
- time_tracking.go
- timestamp.go
- user_groups.go
- views.go
- webhooks.go