Documentation
¶
Index ¶
- Constants
- func Contains[T comparable](s []T, e T) bool
- type Client
- func (c *Client) CompleteTask(t *TaskItem) (*TaskItem, error)
- func (c *Client) CreateTask(t *TaskItem) (*TaskItem, error)
- func (c *Client) DeleteTask(t *TaskItem) (*TaskItem, error)
- func (c *Client) GetToken() error
- func (c *Client) Init() error
- func (c *Client) MakeSubtask(p, t *TaskItem) (*TaskItem, *TaskItem, error)
- func (c *Client) MoveTask(t *TaskItem, to string) (*TaskItem, error)
- func (c *Client) SearchTask(title string, project string, tag string, id string, ...) ([]TaskItem, error)
- func (c *Client) Sync() error
- func (c *Client) UpdateTask(t *TaskItem) (*TaskItem, error)
- type TaskItem
Constants ¶
View Source
const ( MakeSubtaskUrlEndpoint = "/batch/taskParent" // POST MoveTaskUrlEndpoint = "/batch/taskProject" // POST )
View Source
const (
TemplateTime = "2006-01-02T15:04:05.000+0000"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func (*Client) CompleteTask ¶
Complete task, as complete has no field
func (*Client) CreateTask ¶
CURD, Create
func (*Client) DeleteTask ¶
CURD, Delete
func (*Client) MakeSubtask ¶
Make subtask, p is the parent, t is the child, return the parent and child tasks
func (*Client) MoveTask ¶
Move task to another project, as directly updating projectId has no effect
func (*Client) SearchTask ¶
func (c *Client) SearchTask(title string, project string, tag string, id string, StartDateNotbefore time.Time, StartDateNotafter time.Time, priority int64) ([]TaskItem, error)
CURD, Read, partial match. if parameter is "", it will have no effect. If priority is -1, it's ignored. If time is zero val, it's ignored. Priority values are: 0,1,3,5 (low -> high)
type TaskItem ¶
type TaskItem struct {
Id string `json:"id"`
ProjectId string `json:"projectId"`
ProjectName string `json:"-"`
ParentId string `json:"parentId"`
Title string `json:"title"`
IsAllDay bool `json:"isAllDay"`
Tags []string `json:"tags"`
Content string `json:"content"`
Desc string `json:"desc"`
AllDay bool `json:"allDay"`
StartDate string `json:"startDate"` // the dates are all in UTC
DueDate string `json:"dueDate"` // and will not be influenced by TimeZone
TimeZone string `json:"timeZone"`
Reminders []string `json:"reminders"`
Repeat string `json:"repeat"`
Priority int64 `json:"priority"`
SortOrder int64 `json:"sortOrder"`
Kind string `json:"kind"`
Status int64 `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.