Documentation ¶
Index ¶
- Constants
- func OptionAPIURL(u string) func(*Client)
- type AddProjectRequest
- type AddTaskRequest
- type Attachment
- type Client
- func (api *Client) AddComment(param *NewCommentParameters) (*Comment, error)
- func (api *Client) AddCommentContext(params *NewCommentParameters, context context.Context) (*Comment, error)
- func (api *Client) AddLabel(request LabelRequest) (*Label, error)
- func (api *Client) AddLabelContext(addLabelRequest LabelRequest, context context.Context) (*Label, error)
- func (api *Client) AddProject(request AddProjectRequest) (*Project, error)
- func (api *Client) AddProjectContext(addProjectRequest AddProjectRequest, context context.Context) (*Project, error)
- func (api *Client) AddSection(param *SectionParameters) (*Section, error)
- func (api *Client) AddSectionContext(params *SectionParameters, context context.Context) (*Section, error)
- func (api *Client) AddTask(request AddTaskRequest) (*Task, error)
- func (api *Client) AddTaskContext(addTaskRequest AddTaskRequest, context context.Context) (*Task, error)
- func (api *Client) CloseTask(id string) (*TodoistResponse, error)
- func (api *Client) CloseTaskContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) Debug() bool
- func (api *Client) Debugf(format string, v ...interface{})
- func (api *Client) Debugln(v ...interface{})
- func (api *Client) DeleteCommentById(id string) (*TodoistResponse, error)
- func (api *Client) DeleteCommentByIdContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) DeleteLabelById(id string) (*TodoistResponse, error)
- func (api *Client) DeleteLabelByIdContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) DeleteProjectById(id string) (*TodoistResponse, error)
- func (api *Client) DeleteProjectByIdContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) DeleteSectionById(id string) (*TodoistResponse, error)
- func (api *Client) DeleteSectionByIdContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) DeleteTaskById(id string) (*TodoistResponse, error)
- func (api *Client) DeleteTaskByIdContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) GetActiveTaskById(id string) (*Task, error)
- func (api *Client) GetActiveTaskByIdContext(id string, context context.Context) (*Task, error)
- func (api *Client) GetActiveTasks(getActiveTasksRequest GetActiveTasksRequest) (*[]Task, error)
- func (api *Client) GetActiveTasksContext(request GetActiveTasksRequest, context context.Context) (*[]Task, error)
- func (api *Client) GetAllCommentsByProjectId(projectId string) (*[]Comment, error)
- func (api *Client) GetAllCommentsByTaskId(taskId string) (*[]Comment, error)
- func (api *Client) GetAllCommentsContext(projectId string, taskId string, context context.Context) (*[]Comment, error)
- func (api *Client) GetCommentById(id string) (*Comment, error)
- func (api *Client) GetCommentByIdContext(id string, context context.Context) (*Comment, error)
- func (api *Client) GetLabelById(id string) (*Label, error)
- func (api *Client) GetLabelByIdContext(id string, context context.Context) (*Label, error)
- func (api *Client) GetLabels() (*[]Label, error)
- func (api *Client) GetLabelsContext(context context.Context) (*[]Label, error)
- func (api *Client) GetProjectById(id string) (*Project, error)
- func (api *Client) GetProjectByIdContext(id string, context context.Context) (*Project, error)
- func (api *Client) GetProjectCollaborators(id string) (*[]Collaborator, error)
- func (api *Client) GetProjectCollaboratorsContext(id string, context context.Context) (*[]Collaborator, error)
- func (api *Client) GetProjects() (*[]Project, error)
- func (api *Client) GetProjectsContext(context context.Context) (*[]Project, error)
- func (api *Client) GetSectionById(id string) (*Section, error)
- func (api *Client) GetSectionByIdContext(id string, context context.Context) (*Section, error)
- func (api *Client) GetSectionCollaboratorsContext(id string, context context.Context) (*[]Collaborator, error)
- func (api *Client) GetSectionsByProjectId(projectId string) (*[]Section, error)
- func (api *Client) GetSectionsByProjectIdContext(projectId string, context context.Context) (*[]Section, error)
- func (api *Client) GetSharedLabels() (*[]Label, error)
- func (api *Client) GetSharedLabelsContext(context context.Context) (*[]Label, error)
- func (api *Client) RemoveSharedLabel(name string) (*TodoistResponse, error)
- func (api *Client) RemoveSharedLabelContext(name string, context context.Context) (*TodoistResponse, error)
- func (api *Client) RenameLabel(oldName string, newName string) (*TodoistResponse, error)
- func (api *Client) RenameLabelContext(oldName string, newName string, context context.Context) (*TodoistResponse, error)
- func (api *Client) ReopenTask(id string) (*TodoistResponse, error)
- func (api *Client) ReopenTaskContext(id string, context context.Context) (*TodoistResponse, error)
- func (api *Client) UpdateComment(id string, content string) (*Comment, error)
- func (api *Client) UpdateCommentContext(id string, content string, context context.Context) (*Comment, error)
- func (api *Client) UpdateLabel(id string, request LabelRequest) (*Label, error)
- func (api *Client) UpdateLabelContext(id string, updateLabelRequest LabelRequest, context context.Context) (*Label, error)
- func (api *Client) UpdateProject(id string, updateProjectRequest UpdateProjectRequest) (*Project, error)
- func (api *Client) UpdateProjectContext(id string, updateProjectRequest UpdateProjectRequest, context context.Context) (*Project, error)
- func (api *Client) UpdateSection(projectId string, name string) (*Section, error)
- func (api *Client) UpdateSectionContext(sectionId string, name string, context context.Context) (*Section, error)
- func (api *Client) UpdateTask(id string, updateTaskRequest UpdateTaskRequest) (*Task, error)
- func (api *Client) UpdateTaskContext(id string, updateTaskRequest UpdateTaskRequest, context context.Context) (*Task, error)
- type Collaborator
- type CollaboratorsResponse
- type Comment
- type CommentResponse
- type CommentsResponse
- type Debug
- type Due
- type ErrorResponse
- type GetActiveTasksRequest
- type Label
- type LabelRequest
- type LabelResponse
- type LabelsResponse
- type NewCommentParameters
- type Option
- type Project
- type ProjectResponse
- type ProjectsResponse
- type RateLimitedError
- type Section
- type SectionParameters
- type SectionResponse
- type SectionsResponse
- type StatusCodeError
- type Task
- type Task1
- type TaskResponse
- type TasksResponse
- type TodoistResponse
- type UpdateProjectRequest
- type UpdateTaskRequest
Constants ¶
View Source
const (
APIURL = "https://api.todoist.com/rest/v2/"
)
Variables ¶
This section is empty.
Functions ¶
func OptionAPIURL ¶
Types ¶
type AddProjectRequest ¶
type AddTaskRequest ¶
type AddTaskRequest struct { Content string `json:"content"` Description string `json:"description"` ProjectId string `json:"project_id"` SectionId *string `json:"section_id"` ParentId *string `json:"parent_id"` Order int `json:"order"` Labels []string `json:"labels"` Priority int `json:"priority"` DueString string `json:"due_string"` DueDate string `json:"due_date"` DueDatetime string `json:"due_datetime"` DueLang string `json:"due_lang"` AssigneeId *string `json:"assignee_id"` }
type Attachment ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddComment ¶
func (api *Client) AddComment(param *NewCommentParameters) (*Comment, error)
func (*Client) AddCommentContext ¶
func (*Client) AddLabelContext ¶
func (*Client) AddProject ¶
func (api *Client) AddProject(request AddProjectRequest) (*Project, error)
func (*Client) AddProjectContext ¶
func (*Client) AddSection ¶
func (api *Client) AddSection(param *SectionParameters) (*Section, error)
func (*Client) AddSectionContext ¶
func (*Client) AddTaskContext ¶
func (*Client) CloseTaskContext ¶
func (*Client) DeleteCommentById ¶
func (api *Client) DeleteCommentById(id string) (*TodoistResponse, error)
func (*Client) DeleteCommentByIdContext ¶
func (*Client) DeleteLabelById ¶
func (api *Client) DeleteLabelById(id string) (*TodoistResponse, error)
func (*Client) DeleteLabelByIdContext ¶
func (*Client) DeleteProjectById ¶
func (api *Client) DeleteProjectById(id string) (*TodoistResponse, error)
func (*Client) DeleteProjectByIdContext ¶
func (*Client) DeleteSectionById ¶
func (api *Client) DeleteSectionById(id string) (*TodoistResponse, error)
func (*Client) DeleteSectionByIdContext ¶
func (*Client) DeleteTaskById ¶
func (api *Client) DeleteTaskById(id string) (*TodoistResponse, error)
func (*Client) DeleteTaskByIdContext ¶
func (*Client) GetActiveTaskByIdContext ¶
func (*Client) GetActiveTasks ¶
func (api *Client) GetActiveTasks(getActiveTasksRequest GetActiveTasksRequest) (*[]Task, error)
func (*Client) GetActiveTasksContext ¶
func (*Client) GetAllCommentsByProjectId ¶
func (*Client) GetAllCommentsByTaskId ¶
func (*Client) GetAllCommentsContext ¶
func (*Client) GetCommentByIdContext ¶
func (*Client) GetLabelByIdContext ¶
func (*Client) GetLabelsContext ¶
func (*Client) GetProjectByIdContext ¶
func (*Client) GetProjectCollaborators ¶
func (api *Client) GetProjectCollaborators(id string) (*[]Collaborator, error)
func (*Client) GetProjectCollaboratorsContext ¶
func (*Client) GetProjects ¶
func (*Client) GetProjectsContext ¶
func (*Client) GetSectionByIdContext ¶
func (*Client) GetSectionCollaboratorsContext ¶
func (*Client) GetSectionsByProjectId ¶
func (*Client) GetSectionsByProjectIdContext ¶
func (*Client) GetSharedLabels ¶
func (*Client) GetSharedLabelsContext ¶
func (*Client) RemoveSharedLabel ¶
func (api *Client) RemoveSharedLabel(name string) (*TodoistResponse, error)
func (*Client) RemoveSharedLabelContext ¶
func (*Client) RenameLabel ¶
func (api *Client) RenameLabel(oldName string, newName string) (*TodoistResponse, error)
func (*Client) RenameLabelContext ¶
func (*Client) ReopenTask ¶
func (api *Client) ReopenTask(id string) (*TodoistResponse, error)
func (*Client) ReopenTaskContext ¶
func (*Client) UpdateComment ¶
func (*Client) UpdateCommentContext ¶
func (*Client) UpdateLabel ¶
func (api *Client) UpdateLabel(id string, request LabelRequest) (*Label, error)
func (*Client) UpdateLabelContext ¶
func (*Client) UpdateProject ¶
func (api *Client) UpdateProject(id string, updateProjectRequest UpdateProjectRequest) (*Project, error)
func (*Client) UpdateProjectContext ¶
func (*Client) UpdateSection ¶
func (*Client) UpdateSectionContext ¶
func (*Client) UpdateTask ¶
func (api *Client) UpdateTask(id string, updateTaskRequest UpdateTaskRequest) (*Task, error)
func (*Client) UpdateTaskContext ¶
type Collaborator ¶
type CollaboratorsResponse ¶
type CollaboratorsResponse struct { Collaborators []Collaborator TodoistResponse }
type CommentResponse ¶
type CommentResponse struct { Comment Comment TodoistResponse }
type CommentsResponse ¶
type CommentsResponse struct { Comments []Comment TodoistResponse }
type ErrorResponse ¶
type ErrorResponse struct {
Err string
}
func (ErrorResponse) Error ¶
func (t ErrorResponse) Error() string
type GetActiveTasksRequest ¶
type LabelRequest ¶
type LabelResponse ¶
type LabelResponse struct { Label Label TodoistResponse }
type LabelsResponse ¶
type LabelsResponse struct { Labels []Label TodoistResponse }
type NewCommentParameters ¶
type NewCommentParameters struct { TaskId string `json:"task_id"` Content string `json:"content"` Attachment Attachment `json:"attachment"` }
type Project ¶
type Project struct { ID string `json:"id"` ParentId string `json:"parent_id"` Order int `json:"order"` Color string `json:"color"` Name string `json:"name"` CommentCount int `json:"comment_count"` IsFavorite bool `json:"is_favorite"` IsInboxProject bool `json:"is_inbox_project"` IsTeamInbox bool `json:"is_team_inbox"` Url string `json:"url"` ViewStyle string `json:"view_style"` }
type ProjectResponse ¶
type ProjectResponse struct { Project Project TodoistResponse }
type ProjectsResponse ¶
type ProjectsResponse struct { Projects []Project TodoistResponse }
type RateLimitedError ¶
func (*RateLimitedError) Error ¶
func (e *RateLimitedError) Error() string
func (*RateLimitedError) Retryable ¶
func (e *RateLimitedError) Retryable() bool
type SectionParameters ¶
type SectionResponse ¶
type SectionResponse struct { Section Section TodoistResponse }
type SectionsResponse ¶
type SectionsResponse struct { Sections []Section TodoistResponse }
type StatusCodeError ¶
func (StatusCodeError) Error ¶
func (t StatusCodeError) Error() string
func (StatusCodeError) HTTPStatusCode ¶
func (t StatusCodeError) HTTPStatusCode() int
func (StatusCodeError) Retryable ¶
func (t StatusCodeError) Retryable() bool
type Task ¶
type Task struct { Id string `json:"id"` AssignerId any `json:"assigner_id"` AssigneeId any `json:"assignee_id"` ProjectId string `json:"project_id"` SectionId string `json:"section_id"` ParentId any `json:"parent_id"` Order int `json:"order"` Content string `json:"content"` Description string `json:"description"` IsCompleted bool `json:"is_completed"` Labels []any `json:"labels"` Priority int `json:"priority"` CommentCount int `json:"comment_count"` CreatorId string `json:"creator_id"` CreatedAt string `json:"created_at"` Due *Due `json:"due"` Url string `json:"url"` }
type Task1 ¶ added in v1.0.2
type Task1 struct { CreatorId string `json:"creator_id"` CreatedAt string `json:"created_at"` AssigneeId *string `json:"assignee_id"` AssignerId *string `json:"assigner_id"` CommentCount int `json:"comment_count"` IsCompleted bool `json:"is_completed"` Content string `json:"content"` Description string `json:"description"` Due *Due `json:"due"` Id string `json:"id"` Labels []string `json:"labels"` Order int `json:"order"` Priority int `json:"priority"` ProjectId string `json:"project_id"` SectionId string `json:"section_id"` ParentId string `json:"parent_id"` Url string `json:"url"` }
type TaskResponse ¶
type TaskResponse struct { Task Task TodoistResponse }
type TasksResponse ¶
type TasksResponse struct { Tasks []Task TodoistResponse }
type TodoistResponse ¶
func (TodoistResponse) Err ¶
func (t TodoistResponse) Err() error
type UpdateProjectRequest ¶
type UpdateTaskRequest ¶
type UpdateTaskRequest struct { Content string `json:"content"` // Optional Description string `json:"description"` // Optional Labels []string `json:"labels"` // Optional Priority int `json:"priority"` // Optional DueString string `json:"due_string"` // Optional DueDate string `json:"due_date"` // Optional DueDatetime string `json:"due_datetime"` // Optional DueLang string `json:"due_lang"` // Optional AssigneeId string `json:"assignee_id"` // Optional }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.