clickup

package
v0.0.0-...-503b725 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func CheckResponse

func CheckResponse(r *http.Response) error

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

func Float64(v float64) *float64

float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func Int64

func Int64(v int64) *int64

Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func Stringify

func Stringify(message interface{}) string

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 AddDependencyOptions struct {
	CustomTaskIDs string `url:"custom_task_ids,omitempty"`
	TeamID        int    `url:"team_id,omitempty"`
}

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 Attachment struct {
	FileName string
	Reader   io.Reader
}

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

func (s *AuthorizationService) GetAuthorizedTeams(ctx context.Context) ([]Team, *Response, error)

Get the authorized teams for this token.

func (*AuthorizationService) GetAuthorizedUser

func (s *AuthorizationService) GetAuthorizedUser(ctx context.Context) (*User, *Response, error)

Get the user that belongs to this token.

type AutomaticProgressTypeConfig

type AutomaticProgressTypeConfig struct {
	SubtaskRollup bool    `json:"subtask_rollup"`
	CompleteOn    float64 `json:"complete_on"`
	Tracking      struct {
		Subtasks         bool `json:"subtasks"`
		AssignedComments bool `json:"assigned_comments"`
		Checklist        bool `json:"checklists"`
	} `json:"tracking"`
}

type AutomaticProgressValue

type AutomaticProgressValue struct {
	PercentCompleted float64
	TypeConfig       AutomaticProgressTypeConfig
}

type Checklist

type Checklist struct {
	ID         string      `json:"id"`
	TaskID     string      `json:"task_id"`
	Name       string      `json:"name"`
	Orderindex json.Number `json:"orderindex"`
	Resolved   int         `json:"resolved"`
	Unresolved int         `json:"unresolved"`
	Items      []Item      `json:"items,omitempty"`
}

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 ChecklistOptions struct {
	CustomTaskIDs string `url:"custom_task_ids,omitempty"`
	TeamID        int    `url:"team_id,omitempty"`
}

type ChecklistRequest

type ChecklistRequest struct {
	Name     string `json:"name"`
	Position int    `json:"position,omitempty"`
}

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 (s *ChecklistsService) DeleteChecklist(ctx context.Context, checklistID string) (*Response, error)

func (*ChecklistsService) DeleteChecklistItem

func (s *ChecklistsService) DeleteChecklistItem(ctx context.Context, checklistID string, checklistItemID string) (*Response, error)

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
	SharedHierarchy *SharedHierarchyService
	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

func NewClient(httpClient *http.Client, APIKey string) *Client

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

func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, error)

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) Client

func (c *Client) Client() *http.Client

Client returns the http.Client used by this Clickup client.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

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 (c *Client) NewMultiPartRequest(method, urlStr string, buf *bytes.Buffer) (*http.Request, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)

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 CommentRequest struct {
	CommentText string `json:"comment_text,omitempty"`
	Assignee    int    `json:"assignee,omitempty"`
	NotifyAll   bool   `json:"notify_all,omitempty"`
}

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 (s *CommentsService) DeleteComment(ctx context.Context, commentID int) (*Response, error)

func (*CommentsService) GetChatViewComments

func (s *CommentsService) GetChatViewComments(ctx context.Context, viewID string) ([]Comment, *Response, error)

func (*CommentsService) GetListComments

func (s *CommentsService) GetListComments(ctx context.Context, listID int) ([]Comment, *Response, error)

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 CreateAttachmentResponse

type CreateAttachmentResponse struct {
	ID             string `json:"id"`
	Version        string `json:"version"`
	Date           int    `json:"date"`
	Title          string `json:"title"`
	Extension      string `json:"extension"`
	ThumbnailSmall string `json:"thumbnail_small"`
	ThumbnailLarge string `json:"thumbnail_large"`
	URL            string `json:"url"`
}

type CreateCommentResponse

type CreateCommentResponse struct {
	ID     int    `json:"id"`
	HistId string `json:"hist_id"`
	Date   *Date  `json:"date"`
}

type CreateGoalRequest

type CreateGoalRequest struct {
	Name           string `json:"name"`
	DueDate        *Date  `json:"due_date"`
	Description    string `json:"description"`
	MultipleOwners bool   `json:"multiple_owners"`
	Owners         []int  `json:"owners"`
	Color          string `json:"color"`
}

type CreateKeyResultRequest

type CreateKeyResultRequest struct {
	Name       string   `json:"name"`
	Owners     []int    `json:"owners"`
	Type       string   `json:"type"`
	StepsStart int      `json:"steps_start"`
	StepsEnd   int      `json:"steps_end"`
	Unit       string   `json:"unit"`
	TaskIds    []string `json:"task_ids"`
	ListIds    []string `json:"list_ids"`
}

type CreateTaskFromTemplateRequest

type CreateTaskFromTemplateRequest struct {
	Name string `json:"name"`
}

type CreateTaskFromTemplateResponse

type CreateTaskFromTemplateResponse struct {
	ID   string `json:"id"`
	Task Task   `json:"task"`
}

type CreateTimeTrackingOptions

type CreateTimeTrackingOptions struct {
	CustomTaskIDs bool `url:"custom_task_ids,omitempty"`
	TeamID        int  `url:"team_id,omitempty"`
}

type CreateTimeTrackingResponse

type CreateTimeTrackingResponse struct {
	Data TimeTrackingData `json:"data"`
}

type CreateUserGroupRequest

type CreateUserGroupRequest struct {
	Name    string `json:"name"`
	Members []int  `json:"add"`
}

type CurrencyTypeConfig

type CurrencyTypeConfig struct {
	Precision    float64 `json:"precision"`
	CurrencyType string  `json:"currency_type"`
	Default      float64 `json:"default"`
}

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 CurrentTaskStatusTotalTime

type CurrentTaskStatusTotalTime struct {
	ByMinute int    `json:"by_minute"`
	Since    string `json:"since"`
}

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

type CustomFieldInTaskRequest

type CustomFieldInTaskRequest struct {
	ID    string      `json:"id"`
	Value interface{} `json:"value"`
}

type CustomFieldOptions

type CustomFieldOptions struct {
	CustomTaskIDs bool `url:"custom_task_ids,omitempty"`
	TeamID        int  `url:"team_id,omitempty"`
}

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

type Date

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

func NewDate

func NewDate(t time.Time) *Date

func NewDateWithUnixTime

func NewDateWithUnixTime(unix int64) *Date

func NullDate

func NullDate() *Date

func (Date) Equal

func (x Date) Equal(y Date) bool

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 (d Date) MarshalJSON() ([]byte, error)

func (Date) String

func (d Date) String() string

func (Date) Time

func (d Date) Time() *time.Time

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) error

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 Dependence struct {
	TaskID      string `json:"task_id"`
	DependsOn   string `json:"depends_on"`
	Type        int    `json:"type"`
	DateCreated string `json:"date_created"`
	Userid      string `json:"userid"`
}

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 (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 (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 struct {
	ID         string
	OrderIndex int
	Name       string
	Color      string
}
type DropDownTypeConfig struct {
	Default     float64
	Placeholder string
	Options     []DropDownOption
}
type DropDownValue struct {
	Value      DropDownOption
	TypeConfig DropDownTypeConfig
}

type DueDates

type DueDates struct {
	Enabled            bool `json:"enabled"`
	StartDate          bool `json:"start_date"`
	RemapDueDates      bool `json:"remap_due_dates"`
	RemapClosedDueDate bool `json:"remap_closed_due_date"`
}

type EditKeyResultRequest

type EditKeyResultRequest struct {
	StepsCurrent int    `json:"steps_current"`
	Note         string `json:"note"`
}

type EmojiTypeConfig

type EmojiTypeConfig struct {
	CodePoint string `json:"code_point"`
	Count     int    `json:"count"`
}

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) Error

func (e *Error) Error() string

func (*Error) UnmarshalJSON

func (e *Error) UnmarshalJSON(data []byte) error

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 FolderOftaskBelonging struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Hidden bool   `json:"hidden"`
	Access bool   `json:"access"`
}

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 (s *FoldersService) DeleteFolder(ctx context.Context, folderID int) (*Response, error)

func (*FoldersService) GetFolder

func (s *FoldersService) GetFolder(ctx context.Context, folderID string) (*Folder, *Response, error)

func (*FoldersService) GetFolders

func (s *FoldersService) GetFolders(ctx context.Context, spaceID string, archived bool) ([]Folder, *Response, error)

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 GetBulkTasksTimeInStatusOptions

type GetBulkTasksTimeInStatusOptions struct {
	CustomTaskIDs bool `url:"custom_task_ids,omitempty"`
	TeamID        int  `url:"team_id,omitempty"`
}

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 GetTaskLocation struct {
	ListID     string `json:"list_id"`
	FolderID   string `json:"folder_id"`
	SpaceID    string `json:"space_id"`
	ListName   string `json:"list_name"`
	FolderName string `json:"folder_name"`
	SpaceName  string `json:"space_name"`
}

type GetTaskOptions

type GetTaskOptions struct {
	CustomTaskIDs   bool `url:"custom_task_ids,omitempty"`
	TeamID          int  `url:"team_id,omitempty"`
	IncludeSubTasks bool `url:"include_subtasks,omitempty"`
}

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 GetTimeTrackingOptions struct {
	IncludeTask          bool `url:"include_task_,omitempty"`
	IncludeLocationNames bool `url:"include_location_names,omitempty"`
}

type GetTimeTrackingResponse

type GetTimeTrackingResponse struct {
	Data GetTimeTrackingData `json:"data"`
}

type GetUserGroupsOptions

type GetUserGroupsOptions struct {
	TeamID   string   `url:"team_id,omitempty"`
	GroupIDs []string `url:"group_ids,omitempty"`
}

type GetUserGroupsResponse

type GetUserGroupsResponse struct {
	UserGroups []UserGroup `json:"groups"`
}

type GetViewTasksResponse

type GetViewTasksResponse struct {
	Tasks    []Task `json:"tasks"`
	LastPage bool   `json:"last_page"`
}

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 GoalOwner

type GoalOwner struct {
	ID             int    `json:"id"`
	Email          string `json:"email"`
	Username       string `json:"username"`
	Color          string `json:"color"`
	ProfilePicture string `json:"profilePicture"`
	Initials       string `json:"initials"`
}

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 (s *GoalsService) DeleteGoal(ctx context.Context, goalID string) (resp *Response, err error)

func (*GoalsService) DeleteKeyResult

func (s *GoalsService) DeleteKeyResult(ctx context.Context, keyResultID string) (resp *Response, err error)

func (*GoalsService) EditKeyResult

func (s *GoalsService) EditKeyResult(ctx context.Context, keyResultID string, editKeyResultRequest *EditKeyResultRequest) (*KeyResult, *Response, error)

func (*GoalsService) GetGoal

func (s *GoalsService) GetGoal(ctx context.Context, goalID string) (*Goal, *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 GroupMember struct {
	ID             int    `json:"id"`
	Username       string `json:"username"`
	Email          string `json:"email"`
	Color          string `json:"color"`
	Initials       string `json:"initials"`
	ProfilePicture string `json:"profilePicture"`
}

type Guests

type Guests struct {
	FilledGuestSeats int `json:"filled_guest_seats"`
	TotalGuestSeats  int `json:"total_guest_seats"`
	EmptyGuestSeats  int `json:"empty_guest_seats"`
}

type InvitedBy

type InvitedBy struct {
	ID             int    `json:"id"`
	Username       string `json:"username"`
	Color          string `json:"color"`
	Email          string `json:"email"`
	Initials       string `json:"initials"`
	ProfilePicture string `json:"profilePicture"`
}

type Item

type Item struct {
	ID          string        `json:"id"`
	Name        string        `json:"name"`
	Orderindex  json.Number   `json:"orderindex"`
	Assignee    User          `json:"assignee"`
	Resolved    bool          `json:"resolved"`
	Parent      interface{}   `json:"parent"`
	DateCreated string        `json:"date_created"`
	Children    []interface{} `json:"children"`
}

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 LabelOption struct {
	ID    string
	Label string
	Color string
}

type LabelsTypeConfig

type LabelsTypeConfig struct {
	Options []LabelOption
}

type LabelsValue

type LabelsValue struct {
	Values     []LabelOption
	TypeConfig LabelsTypeConfig
}

type LastAction

type LastAction struct {
	ID           string `json:"id"`
	KeyResultID  string `json:"key_result_id"`
	Userid       int    `json:"userid"`
	DateModified string `json:"date_modified"`
	Note         string `json:"note"`
}

type LinkedTask

type LinkedTask struct {
	TaskID      string `json:"task_id"`
	LinkID      string `json:"link_id"`
	DateCreated string `json:"date_created"`
	Userid      string `json:"userid"`
}

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 ListOfTaskBelonging struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Access bool   `json:"access"`
}

type ListRequest

type ListRequest struct {
	Name        string `json:"name"`
	Content     string `json:"content"`
	DueDate     *Date  `json:"due_date"`
	DueDateTime bool   `json:"due_date_time"`
	Priority    int    `json:"priority"`
	Assignee    int    `json:"assignee"`
	Status      string `json:"status"`
}

type ListsService

type ListsService service

func (*ListsService) AddTaskToList

func (s *ListsService) AddTaskToList(ctx context.Context, listID string, taskID string) (*Response, error)

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 (s *ListsService) DeleteList(ctx context.Context, listID string) (*Response, error)

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

func (s *ListsService) GetList(ctx context.Context, listID string) (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) 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 (s *ListsService) RemoveTaskFromList(ctx context.Context, listID string, taskID string) (*Response, error)

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 LocationValue struct {
	Latitude         float64
	Longitude        float64
	FormattedAddress string
	PlaceID          string
}

type ManualProgressTypeConfig

type ManualProgressTypeConfig struct {
	Start int64 `json:"start"`
	End   int64 `json:"end"`
}

type ManualProgressValue

type ManualProgressValue struct {
	PercentCompleted float64
	Current          int64
	TypeConfig       ManualProgressTypeConfig
}

type Member

type Member 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"`
}

type Members

type Members struct {
	FilledMembersSeats int `json:"filled_members_seats"`
	TotalMemberSeats   int `json:"total_member_seats"`
	EmptyMemberSeats   int `json:"empty_member_seats"`
}

type MembersService

type MembersService service

func (*MembersService) GetListMembers

func (s *MembersService) GetListMembers(ctx context.Context, listID string) ([]Member, *Response, error)

func (*MembersService) GetTaskMembers

func (s *MembersService) GetTaskMembers(ctx context.Context, taskID string) ([]Member, *Response, error)

type Plan

type Plan struct {
	Id   int    `json:"plan_id"`
	Name string `json:"plan_name"`
}

type PlanResponse

type PlanResponse struct {
	Plan
}

type Point

type Point struct {
	Value json.Number

	IntVal   *int64
	FloatVal *float64
}

func (*Point) MarshalJSON

func (p *Point) MarshalJSON() ([]byte, error)

func (*Point) UnmarshalJSON

func (p *Point) UnmarshalJSON(b []byte) error

type Portfolios

type Portfolios struct {
	Enabled bool `json:"enabled"`
}

type ProjectOfTaskBelonging

type ProjectOfTaskBelonging struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Hidden bool   `json:"hidden"`
	Access bool   `json:"access"`
}

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.

func (Rate) String

func (r Rate) String() string

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.

const (
	// Diff format.
	Diff RawType = 1 + iota
	// Patch format.
	Patch
)

type Reaction

type Reaction struct {
	Reaction string `json:"reaction"`
	Date     string `json:"date"`
	User     User   `json:"user"`
}

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 Seats

type Seats struct {
	Members Members `json:"members"`
	Guests  Guests  `json:"guests"`
}

type SeatsResponse

type SeatsResponse struct {
	Seats
}

type Shared

type Shared struct {
	Tasks   []Task   `json:"tasks"`
	Lists   []List   `json:"lists"`
	Folders []Folder `json:"folders"`
}

type SharedHierarchyResponse

type SharedHierarchyResponse struct {
	Shared Shared `json:"shared"`
}

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 SpaceOfFolderBelonging struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Access bool   `json:"access,omitempty"`
}

type SpaceOfTaskBelonging

type SpaceOfTaskBelonging struct {
	ID string `json:"id"`
}

type SpaceRequest

type SpaceRequest struct {
	Name              string   `json:"name"`
	MultipleAssignees bool     `json:"multiple_assignees"`
	Features          Features `json:"features"`
}

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 (s *SpacesService) DeleteSpace(ctx context.Context, spaceID int) (*Response, error)

func (*SpacesService) GetSpace

func (s *SpacesService) GetSpace(ctx context.Context, spaceID string) (*Space, *Response, error)

func (*SpacesService) GetSpaces

func (s *SpacesService) GetSpaces(ctx context.Context, teamID string, archived bool) ([]Space, *Response, error)

func (*SpacesService) UpdateSpace

func (s *SpacesService) UpdateSpace(ctx context.Context, spaceID int, spaceRequest *SpaceRequest) (*Space, *Response, error)

type Tag

type Tag struct {
	Name    string `json:"name"`
	TagFg   string `json:"tag_fg"`
	TagBg   string `json:"tag_bg"`
	Creator int    `json:"creator,omitempty"`
}

type TagOptions

type TagOptions struct {
	CustomTaskIDs string `url:"custom_task_ids,omitempty"`
	TeamID        int    `url:"team_id,omitempty"`
}

type TagRequest

type TagRequest struct {
	Tag Tag `json:"tag"`
}

type Tags

type Tags struct {
	Enabled bool `json:"enabled"`
}

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 (s *TagsService) DeleteSpaceTag(ctx context.Context, spaceID string, tagName string) (*Response, error)

func (*TagsService) EditSpaceTag

func (s *TagsService) EditSpaceTag(ctx context.Context, spaceID string, tagName string, tagReq *TagRequest) (*Response, error)

func (*TagsService) GetTags

func (s *TagsService) GetTags(ctx context.Context, spaceID string) ([]Tag, *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 TaskAssigneeUpdateRequest

type TaskAssigneeUpdateRequest struct {
	Add []int `json:"add,omitempty"`
	Rem []int `json:"rem,omitempty"`
}

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 TaskCommentOptions struct {
	CustomTaskIDs string `url:"custom_task_ids,omitempty"`
	TeamID        int    `url:"team_id,omitempty"`
}

type TaskLinkOptions

type TaskLinkOptions struct {
	CustomTaskIDs string `url:"custom_task_ids,omitempty"`
	TeamID        int    `url:"team_id,omitempty"`
}

type TaskLinkResponse

type TaskLinkResponse struct {
	Task Task `json:"task"`
}

type TaskLocation

type TaskLocation struct {
	ListID     int    `json:"list_id"`
	FolderID   int    `json:"folder_id"`
	SpaceID    int    `json:"space_id"`
	ListName   string `json:"list_name"`
	FolderName string `json:"folder_name"`
	SpaceName  string `json:"space_name"`
}

type TaskPriority

type TaskPriority struct {
	Priority string `json:"priority"`
	Color    string `json:"color"`
}

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 TaskStatus struct {
	ID         string      `json:"id"`
	Status     string      `json:"status"`
	Color      string      `json:"color"`
	Type       string      `json:"type"`
	Orderindex json.Number `json:"orderindex"`
}

type TaskStatusHistory

type TaskStatusHistory struct {
	Status     string                     `json:"status"`
	Color      string                     `json:"color"`
	Type       string                     `json:"type"`
	TotalTime  CurrentTaskStatusTotalTime `json:"total_time"`
	Orderindex json.Number                `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 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 TaskValue

type TaskValue struct {
	ID         string
	Access     bool
	Color      string
	CustomId   string
	CustomType interface{}
	Deleted    bool
	Name       string
	Status     string
	TeamId     string
	URL        string
}

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 TeamMember struct {
	User      TeamUser  `json:"user"`
	InvitedBy InvitedBy `json:"invited_by,omitempty"`
}

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

func (s *TeamsService) GetPlan(ctx context.Context, teamId string) (Plan, *Response, error)

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

func (s *TeamsService) GetSeats(ctx context.Context, teamId string) (Seats, *Response, error)

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) GetTeams

func (s *TeamsService) GetTeams(ctx context.Context) ([]Team, *Response, error)

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 Template

type Template struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type TimeEstimates

type TimeEstimates struct {
	Enabled     bool `json:"enabled"`
	Rollup      bool `json:"rollup"`
	PerAssignee bool `json:"per_assignee"`
}

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 TimeTrackingTag struct {
	Name    string `json:"name"`
	TagBg   string `json:"tag_bg"`
	TagFg   string `json:"tag_fg"`
	Creator int    `json:"creator"`
}

type TimeTrackingsService

type TimeTrackingsService service

func (*TimeTrackingsService) CreateTimeTracking

func (*TimeTrackingsService) GetSingularTimeEntry

func (s *TimeTrackingsService) GetSingularTimeEntry(ctx context.Context, teamID string, timerID string, opts *GetTimeTrackingOptions) (*GetTimeTrackingResponse, *Response, error)

type Timestamp

type Timestamp struct {
	time.Time
}

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) Equal

func (t Timestamp) Equal(u Timestamp) bool

Equal reports whether t and u are equal based on time.Equal

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.

type UpdateCommentRequest

type UpdateCommentRequest struct {
	CommentText string `json:"comment_text,omitempty"`
	Assignee    int    `json:"assignee,omitempty"`
	Resolved    bool   `json:"resolved,omitempty"`
}

type UpdateGoalRequest

type UpdateGoalRequest struct {
	Name        string `json:"name"`
	DueDate     *Date  `json:"due_date"`
	Description string `json:"description"`
	RemOwners   []int  `json:"rem_owners"`
	AddOwners   []int  `json:"add_owners"`
	Color       string `json:"color"`
}

type UpdateUserGroupMember

type UpdateUserGroupMember struct {
	Add    []int `json:"add"`
	Remove []int `json:"rem"`
}

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 UserGroupAvatar struct {
	AttachmentId *string `json:"attachment_id"`
	Color        *string `json:"color"`
	Source       *string `json:"source"`
	Icon         *string `json:"icon"`
}

type UserGroupRequest

type UserGroupRequest struct {
	Name    string `json:"name"`
	Members []int  `json:"members"`
}

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 (s *UserGroupsService) DeleteUserGroup(ctx context.Context, groupID string) (*Response, error)

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 UserValue

type UserValue struct {
	ID             json.Number
	Username       string
	Email          string
	Color          string
	Initials       string
	ProfilePicture string
}

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 ViewType

type ViewType int
const (
	TeamView ViewType = iota
	SpaceView
	FolderView
	ListView
)

func (ViewType) String

func (v ViewType) String() string

type ViewsService

type ViewsService service

func (*ViewsService) CreateViewOf

func (s *ViewsService) CreateViewOf(ctx context.Context, viewType ViewType, id string, view map[string]interface{}) (*View, *Response, error)

func (*ViewsService) DeleteView

func (s *ViewsService) DeleteView(ctx context.Context, viewID string) (*Response, error)

func (*ViewsService) GetView

func (s *ViewsService) GetView(ctx context.Context, viewID string) (*View, *Response, error)

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 (s *ViewsService) GetViewsOf(ctx context.Context, viewType ViewType, id string) ([]View, *Response, error)

func (*ViewsService) UpdateView

func (s *ViewsService) UpdateView(ctx context.Context, viewID string, value map[string]interface{}) (*View, *Response, error)

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 WebhookResponse struct {
	ID      string  `json:"id"`
	Webhook Webhook `json:"webhook"`
}

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 (s *WebhooksService) DeleteWebhook(ctx context.Context, webhookID string) (*Response, error)

func (*WebhooksService) GetWebhook

func (s *WebhooksService) GetWebhook(ctx context.Context, teamID int) ([]Webhook, *Response, error)

func (*WebhooksService) UpdateWebhook

func (s *WebhooksService) UpdateWebhook(ctx context.Context, webhookID string, webhookReq *WebhookRequest) (*WebhookResponse, *Response, error)

Jump to

Keyboard shortcuts

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