todoist

package module
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 10 Imported by: 0

README

go.mod release GitHub Actions codecov LICENSE

todoist-go

This is an unofficial Go client library for accessing the Todoist REST API.

Contents

Installation

go get github.com/koki-develop/todoist-go

Import

import "github.com/koki-develop/todoist-go"

Example

Get all projects
package main

import (
	"fmt"

	"github.com/koki-develop/todoist-go"
)

func main() {
	client := todoist.New("TODOIST_API_TOKEN")

	projects, err := client.GetProjects()
	if err != nil {
		fmt.Printf("%s\n", err)
		return
	}

	for _, project := range projects {
		fmt.Printf("ID: %d, Name: %s\n", project.ID, project.Name)
		// ID: 1234567890, Name: Inbox
		// ID: 2345678901, Name: Shopping List
		// ...
	}
}
Create a new task
package main

import (
	"fmt"

	"github.com/koki-develop/todoist-go"
)

func main() {
	cl := todoist.New("TODOIST_API_TOKEN")

	task, err := cl.CreateTask("task content")
	if err != nil {
		fmt.Printf("%s\n", err)
	}

	fmt.Printf("ID: %d, Content: %s\n", task.ID, task.Content)
	// ID: 3456789012, Content: task content
}

With optional parameters:

package main

import (
	"fmt"

	"github.com/koki-develop/todoist-go"
)

func main() {
	cl := todoist.New("TODOIST_API_TOKEN")

	task, err := cl.CreateTaskWithOptions("task content", &todoist.CreateTaskOptions{
		// Helper functions can be used to specify optional parameters.
		ProjectID: todoist.Int(4567890123),
		SectionID: todoist.Int(5678901234),
		DueString: todoist.String("every 3 months"),
	})
	if err != nil {
		fmt.Printf("%s\n", err)
	}

	fmt.Printf("ID: %d, Content: %s\n", task.ID, task.Content)
	// ID: 6789012345, Content: task content
}
Handling Errors

todoist-go returns a RequestError with status code and body when an error response is returned from the Todoist REST API.

package main

import (
	"fmt"
	"io"

	"github.com/koki-develop/todoist-go"
)

func main() {
	cl := todoist.New("TODOIST_API_TOKEN")

	_, err := cl.GetTask(0)
	if reqerr, ok := err.(todoist.RequestError); ok {
		// The status code of error response can be retrieved from the StatusCode property.
		fmt.Printf("%#v\n", reqerr.StatusCode)
		// => 400

		// The body of the error response can be retrieved from the Body property as io.Reader.
		b, _ := io.ReadAll(reqerr.Body)
		fmt.Printf("%#v\n", string(b))
		// => "task_id is invalid"
	}
}

Documentation

For more information, see todoist-go.

LICENSE

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Returns a bool as a pointer.

func Int

func Int(i int) *int

Returns a int as a pointer.

func Ints added in v0.10.0

func Ints(is ...int) *[]int

Returns ints as a pointer.

func String

func String(s string) *string

Returns a string as a pointer.

Types

type Attachment

type Attachment struct {
	// The type of the file (for example image, video, audio, file, etc.)
	ResourceType string `json:"resource_type"`
	// The name of the file.
	FileName *string `json:"file_name"`
	// The size of the file in bytes.
	FileSize *int `json:"file_size"`
	// MIME type (i.e. text/plain, image/png).
	FileType *string `json:"file_type"`
	// The URL where the file is located (a string value representing an HTTP URL).
	// Note that we don't cache the remote content on our servers and stream or expose files directly from third party resources.
	// In particular this means that you should avoid providing links to non-encrypted (plain HTTP) resources, as exposing this files in Todoist may issue a browser warning.
	FileURL *string `json:"file_url"`
	// If you upload an audio file, you may provide an extra attribute file_duration (duration of the audio file in seconds, which takes an integer value).
	FileDuration *int `json:"file_duration"`
	// Upload completion state (either pending or completed).
	UploadState *string `json:"upload_state"`
	// Image file URL.
	Image *string `json:"image"`
	// Image width.
	ImageWidth *int `json:"image_width"`
	// Image height.
	ImageHeight *int `json:"image_height"`
	// Large thumbnail (a list that contains the URL, the width and the height of the thumbnail).
	TnL []interface{} `json:"tn_l"`
	// Medium thumbnail (a list that contains the URL, the width and the height of the thumbnail).
	TnM []interface{} `json:"tn_m"`
	// Small thumbnail (a list that contains the URL, the width and the height of the thumbnail).
	TnS []interface{} `json:"tn_s"`
}

type Client

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

Client for Todoist REST API.

func New

func New(token string) *Client

Returns new client.

func (*Client) CloseTask

func (cl *Client) CloseTask(id int) error

Closes a task.

func (*Client) CloseTaskWithOptions

func (cl *Client) CloseTaskWithOptions(id int, opts *CloseTaskOptions) error

Closes a task with options.

func (*Client) CreateLabel

func (cl *Client) CreateLabel(name string) (*Label, error)

Creates a label.

func (*Client) CreateLabelWithOptions

func (cl *Client) CreateLabelWithOptions(name string, opts *CreateLabelOptions) (*Label, error)

Creates a label with options.

func (*Client) CreateProject

func (cl *Client) CreateProject(name string) (*Project, error)

Creates a new project and returns it.

func (*Client) CreateProjectComment

func (cl *Client) CreateProjectComment(projectID int, content string) (*Comment, error)

Creates a comment for a project.

func (*Client) CreateProjectCommentWithOptions

func (cl *Client) CreateProjectCommentWithOptions(projectID int, content string, opts *CreateProjectCommentOptions) (*Comment, error)

Creates a comment for a project with options.

func (*Client) CreateProjectWithOptions

func (cl *Client) CreateProjectWithOptions(name string, opts *CreateProjectOptions) (*Project, error)

Creates a new project with options and returns it.

func (*Client) CreateSection

func (cl *Client) CreateSection(name string, projectID int) (*Section, error)

Creates a new section and returns it.

func (*Client) CreateSectionWithOptions

func (cl *Client) CreateSectionWithOptions(name string, projectID int, opts *CreateSectionOptions) (*Section, error)

Creates a new section with options and returns it.

func (*Client) CreateTask

func (cl *Client) CreateTask(content string) (*Task, error)

Creates a new task and returns it.

func (*Client) CreateTaskComment

func (cl *Client) CreateTaskComment(taskID int, content string) (*Comment, error)

Creates a comment for a task.

func (*Client) CreateTaskCommentWithOptions

func (cl *Client) CreateTaskCommentWithOptions(taskID int, content string, opts *CreateTaskCommentOptions) (*Comment, error)

Creates a comment for a task with options.

func (*Client) CreateTaskWithOptions

func (cl *Client) CreateTaskWithOptions(content string, opts *CreateTaskOptions) (*Task, error)

Creates a new task with options and returns it.

func (*Client) DeleteComment

func (cl *Client) DeleteComment(id int) error

Deletes a comment.

func (*Client) DeleteCommentWithOptions

func (cl *Client) DeleteCommentWithOptions(id int, opts *DeleteCommentOptions) error

Deletes a comment with options.

func (*Client) DeleteLabel

func (cl *Client) DeleteLabel(id int) error

Deletes a label.

func (*Client) DeleteLabelWithOptions

func (cl *Client) DeleteLabelWithOptions(id int, opts *DeleteLabelOptions) error

Deletes a label with options.

func (*Client) DeleteProject

func (cl *Client) DeleteProject(id int) error

Deletes a project.

func (*Client) DeleteProjectWithOptions

func (cl *Client) DeleteProjectWithOptions(id int, opts *DeleteProjectOptions) error

Deletes a project with options.

func (*Client) DeleteSection

func (cl *Client) DeleteSection(id int) error

Deletes a section.

func (*Client) DeleteSectionWithOptions

func (cl *Client) DeleteSectionWithOptions(id int, opts *DeleteSectionOptions) error

Deletes a section with options.

func (*Client) DeleteTask

func (cl *Client) DeleteTask(id int) error

Deletes a task.

func (*Client) DeleteTaskWithOptions

func (cl *Client) DeleteTaskWithOptions(id int, opts *DeleteTaskOptions) error

Deletes a task with options.

func (*Client) GetCollaborators

func (cl *Client) GetCollaborators(projectID int) (Users, error)

Get list of all collaborators of a shared project.

func (*Client) GetComment

func (cl *Client) GetComment(id int) (*Comment, error)

Gets a comment.

func (*Client) GetLabel

func (cl *Client) GetLabel(id int) (*Label, error)

Gets a label.

func (*Client) GetLabels

func (cl *Client) GetLabels() (Labels, error)

Gets list of all user labels.

func (*Client) GetProject

func (cl *Client) GetProject(id int) (*Project, error)

Gets a project.

func (*Client) GetProjectComments

func (cl *Client) GetProjectComments(projectID int) (Comments, error)

Gets list of all comments for a project.

func (*Client) GetProjects

func (cl *Client) GetProjects() (Projects, error)

Gets list of all user projects.

func (*Client) GetSection

func (cl *Client) GetSection(id int) (*Section, error)

Gets a section.

func (*Client) GetSections

func (cl *Client) GetSections() (Sections, error)

Gets list of all sections.

func (*Client) GetSectionsWithOptions

func (cl *Client) GetSectionsWithOptions(opts *GetSectionsOptions) (Sections, error)

Gets list of all sections with options.

func (*Client) GetTask

func (cl *Client) GetTask(id int) (*Task, error)

Get a single active task.

func (*Client) GetTaskComments

func (cl *Client) GetTaskComments(taskID int) (Comments, error)

Gets list of all comments for a task.

func (*Client) GetTasks

func (cl *Client) GetTasks() (Tasks, error)

Gets list of all active tasks.

func (*Client) GetTasksWithOptions

func (cl *Client) GetTasksWithOptions(opts *GetTasksOptions) (Tasks, error)

Gets list of all active tasks with options.

func (*Client) ReopenTask

func (cl *Client) ReopenTask(id int) error

Reopens a task.

func (*Client) ReopenTaskWithOptions

func (cl *Client) ReopenTaskWithOptions(id int, opts *ReopenTaskOptions) error

Reopens a task with options.

func (*Client) UpdateComment

func (cl *Client) UpdateComment(id int, content string) error

Updates a comment.

func (*Client) UpdateCommentWithOptions

func (cl *Client) UpdateCommentWithOptions(id int, content string, opts *UpdateCommentOptions) error

Updates a comment with options.

func (*Client) UpdateLabelWithOptions

func (cl *Client) UpdateLabelWithOptions(id int, opts *UpdateLabelOptions) error

Updates a label with options.

func (*Client) UpdateProjectWithOptions

func (cl *Client) UpdateProjectWithOptions(id int, opts *UpdateProjectOptions) error

Updates a project.

func (*Client) UpdateSection

func (cl *Client) UpdateSection(id int, name string) error

Updates a section.

func (*Client) UpdateSectionWithOptions

func (cl *Client) UpdateSectionWithOptions(id int, name string, opts *UpdateSectionOptions) error

Updates a section with options.

func (*Client) UpdateTaskWithOptions

func (cl *Client) UpdateTaskWithOptions(id int, opts *UpdateTaskOptions) error

Updates a task.

type CloseTaskOptions

type CloseTaskOptions struct {
	RequestID *string `json:"-"`
}

Options for closing a task.

type Comment

type Comment struct {
	// Comment ID.
	ID int `json:"id"`
	// Comment's task ID (for task comments).
	TaskID *int `json:"task_id"`
	// Comment's project ID (for project comments).
	ProjectID *int `json:"project_id"`
	// Date and time when comment was added, RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) format in UTC.
	Posted string `json:"posted"`
	// Comment content.
	// This value may contain markdown-formatted text and hyperlinks.
	// Details on markdown support can be found in the Text Formatting article in the Help Center.
	Content string `json:"content"`
	// Attachment file.
	Attachment *Attachment `json:"attachment"`
}

type Comments

type Comments []*Comment

List of comments.

type CreateAttachmentOptions

type CreateAttachmentOptions struct {
	ResourceType *string `json:"resource_type,omitempty"`
	FileName     *string `json:"file_name,omitempty"`
	FileURL      *string `json:"file_url,omitempty"`
	FileType     *string `json:"file_type,omitempty"`
}

Options for creating attachment.

type CreateLabelOptions

type CreateLabelOptions struct {
	RequestID *string `json:"-"`

	// Label order.
	Order *int `json:"order,omitempty"`
	// A numeric ID representing the color of the label icon.
	// Refer to the id column in the Colors (https://developer.todoist.com/guides/#colors) guide for more info.
	Color *int `json:"color,omitempty"`
	// Whether the label is a favorite (a true or false value).
	Favorite *bool `json:"favorite,omitempty"`
}

Options for creating a label.

type CreateProjectCommentOptions

type CreateProjectCommentOptions struct {
	RequestID *string `json:"-"`

	// Object for attachment object.
	Attachment *CreateAttachmentOptions `json:"attachment,omitempty"`
}

Options for creating a comment for a project.

type CreateProjectOptions

type CreateProjectOptions struct {
	RequestID *string `json:"-"`

	// Parent project ID.
	ParentID *int `json:"parent_id,omitempty"`
	// A numeric ID representing the color of the project icon.
	// Refer to the id column in the Colors guide (https://developer.todoist.com/guides/#colors) for more info.
	Color *int `json:"color,omitempty"`
	// Whether the project is a favorite (a true or false value).
	Favorite *bool `json:"favorite,omitempty"`
}

Options for creating a project.

type CreateSectionOptions

type CreateSectionOptions struct {
	RequestID *string `json:"-"`

	// Order among other sections in a project.
	Order *int `json:"order,omitempty"`
}

Options for creating a section.

type CreateTaskCommentOptions

type CreateTaskCommentOptions struct {
	RequestID *string `json:"-"`

	// Object for attachment object.
	Attachment *CreateAttachmentOptions `json:"attachment,omitempty"`
}

Options for creating a comment for a task.

type CreateTaskOptions

type CreateTaskOptions struct {
	RequestID *string `json:"-"`

	// A description for the task.
	// This value may contain markdown-formatted text and hyperlinks.
	// Details on markdown support can be found in the Text Formatting article (https://todoist.com/help/articles/text-formatting) in the Help Center.
	Description *string `json:"description,omitempty"`
	// Task project ID.
	// If not set, task is put to user's Inbox.
	ProjectID *int `json:"project_id,omitempty"`
	// ID of section to put task into.
	SectionID *int `json:"section_id,omitempty"`
	// Parent task ID.
	ParentID *int `json:"parent_id,omitempty"`
	// Non-zero integer value used by clients to sort tasks under the same parent.
	Order *int `json:"order,omitempty"`
	// IDs of labels associated with the task.
	LabelIDs *[]int `json:"label_ids,omitempty"`
	// Task priority from 1 (normal) to 4 (urgent).
	Priority *int `json:"priority,omitempty"`
	// Human defined (https://todoist.com/help/articles/due-dates-and-times) task due date (ex.: "next Monday", "Tomorrow"). Value is set using local (not UTC) time.
	DueString *string `json:"due_string,omitempty"`
	// Specific date in YYYY-MM-DD format relative to user’s timezone.
	DueDate *string `json:"due_date,omitempty"`
	// Specific date and time in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) format in UTC.
	DueDatetime *string `json:"due_datetime,omitempty"`
	// 2-letter code specifying language in case due_string is not written in English.
	DueLang *string `json:"due_lang,omitempty"`
	// The responsible user ID (if set, and only for shared tasks).
	Assignee *int `json:"assignee,omitempty"`
}

Options for creating a task.

type DeleteCommentOptions

type DeleteCommentOptions struct {
	RequestID *string `json:"-"`
}

Options for deleting a comment.

type DeleteLabelOptions

type DeleteLabelOptions struct {
	RequestID *string `json:"-"`
}

Options for deleting a label.

type DeleteProjectOptions

type DeleteProjectOptions struct {
	RequestID *string `json:"-"`
}

Options for deleting a project.

type DeleteSectionOptions

type DeleteSectionOptions struct {
	RequestID *string `json:"-"`
}

Options for deleting a section.

type DeleteTaskOptions

type DeleteTaskOptions struct {
	RequestID *string `json:"-"`
}

Options for deleting a task.

type Due

type Due struct {
	// Human defined date in arbitrary format.
	String string `json:"string"`
	// Date in format YYYY-MM-DD corrected to user's timezone.
	Date string `json:"date"`
	// Whether the task has a recurring due date (https://todoist.com/help/articles/set-a-recurring-due-date).
	Recurring bool `json:"recurring"`
	// Only returned if exact due time set (i.e. it's not a whole-day task), date and time in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) format in UTC.
	Datetime *string `json:"datetime"`
	// Only returned if exact due time set, user's timezone definition either in tzdata-compatible format ("Europe/Berlin") or as a string specifying east of UTC offset as "UTC±HH:MM" (i.e. "UTC-01:00").
	Timezone *string `json:"timezone"`
}

type GetSectionsOptions

type GetSectionsOptions struct {
	// Filter sections by project ID.
	ProjectID *int `url:"project_id,omitempty"`
}

Options for getting a sections.

type GetTasksOptions

type GetTasksOptions struct {
	// Filter tasks by project ID.
	ProjectID *int `url:"project_id,omitempty"`
	// Filter tasks by section ID.
	SectionID *int `url:"section_id,omitempty"`
	// Filter tasks by label.
	LabelID *int `url:"label_id,omitempty"`
	// Filter by any supported filter (https://todoist.com/help/articles/205248842).
	Filter *string `url:"filter,omitempty"`
	// IETF language tag defining what language filter is written in, if differs from default English.
	Lang *string `url:"lang,omitempty"`
	// A list of the task IDs to retrieve, this should be a comma separated list.
	IDs *[]int `url:"ids,comma,omitempty"`
}

Options for getting a tasks.

type Label

type Label struct {
	// Label ID.
	ID int `json:"id"`
	// Label name.
	Name string `json:"name"`
	// A numeric ID representing the color of the label icon.
	// Refer to the id column in the Colors (https://developer.todoist.com/guides/#colors) guide for more info.
	Color int `json:"color"`
	// Number used by clients to sort list of labels.
	Order int `json:"order"`
	// Whether the label is a favorite (a true or false value).
	Favorite bool `json:"favorite"`
}

type Labels

type Labels []*Label

List of labels.

type Project

type Project struct {
	// Project ID.
	ID int `json:"id"`
	// Project name.
	Name string `json:"name"`
	// A numeric ID representing the color of the project icon.
	// Refer to the id column in the Colors guide (https://developer.todoist.com/guides/#colors) for more info.
	Color int `json:"color"`
	// ID of parent project (read-only, absent for top-level projects).
	ParentID *int `json:"parent_id"`
	// Project position under the same parent (read-only).
	Order int `json:"order"`
	// Number of project comments.
	CommentCount int `json:"comment_count"`
	// Whether the project is shared (read-only, a true or false value)
	Shared bool `json:"shared"`
	// Whether the project is a favorite (a true or false value).
	Favorite bool `json:"favorite"`
	// Whether the project is Inbox (read-only, true or otherwise this property is not sent).
	InboxProject bool `json:"inbox_project"`
	// Whether the project is TeamInbox (read-only, true or otherwise this property is not sent).
	TeamInbox bool `json:"team_inbox"`
	// Identifier to find the match between different copies of shared projects.
	// When you share a project, its copy has a different ID for your collaborators.
	// To find a project in a different account that matches yours, you can use the "sync_id" attribute.
	// For non-shared projects the attribute is set to 0.
	SyncID int `json:"sync_id"`
	// URL to access this project in the Todoist web or mobile applications.
	URL string `json:"url"`
}

type Projects

type Projects []*Project

List of Projects.

type ReopenTaskOptions

type ReopenTaskOptions struct {
	RequestID *string `json:"-"`
}

Options for reopening a task.

type RequestError

type RequestError struct {
	// Error response status code.
	StatusCode int
	// Error response body.
	Body io.Reader
}

func (RequestError) Error

func (err RequestError) Error() string

type Section

type Section struct {
	// Section id.
	ID int `json:"id"`
	// ID of the project section belongs to.
	ProjectID int `json:"project_id"`
	// Section position among other sections from the same project.
	Order int `json:"order"`
	// Section name.
	Name string `json:"name"`
}

type Sections

type Sections []*Section

List of sections.

type Task

type Task struct {
	// Task ID.
	ID int `json:"id"`
	// Task's project ID (read-only).
	ProjectID int `json:"project_id"`
	// ID of section task belongs to.
	SectionID int `json:"section_id"`
	// Task content.
	// This value may contain markdown-formatted text and hyperlinks.
	// Details on markdown support can be found in the Text Formatting article (https://todoist.com/help/articles/text-formatting) in the Help Center.
	Content string `json:"content"`
	// A description for the task.
	// This value may contain markdown-formatted text and hyperlinks.
	// Details on markdown support can be found in the Text Formatting article (https://todoist.com/help/articles/text-formatting) in the Help Center.
	Description string `json:"description"`
	// Flag to mark completed tasks.
	Completed bool `json:"completed"`
	// Array of label IDs, associated with a task.
	LabelIDs []int `json:"label_ids"`
	// ID of parent task (read-only, absent for top-level tasks).
	ParentID *int `json:"parent_id"`
	// Position under the same parent or project for top-level tasks (read-only).
	Order int `json:"order"`
	// Task priority from 1 (normal, default value) to 4 (urgent).
	Priority int `json:"priority"`
	// object representing task due date/time.
	Due *Due `json:"due"`
	// URL to access this task in the Todoist web or mobile applications.
	URL string `json:"url"`
	// Number of task comments.
	CommentCount int `json:"comment_count"`
	// The responsible user ID (if set, and only for shared tasks).
	Assignee *int `json:"assignee"`
	// The ID of the user who assigned the task. 0 if the task is unassigned.
	Assigner int `json:"assigner"`
}

type Tasks

type Tasks []*Task

List of tasks.

type UpdateCommentOptions

type UpdateCommentOptions struct {
	RequestID *string `json:"-"`
}

Options for updating a comment.

type UpdateLabelOptions

type UpdateLabelOptions struct {
	RequestID *string `json:"-"`

	// New name of the label.
	Name *string `json:"name,omitempty"`
	// Number that is used by clients to sort list of labels.
	Order *int `json:"order,omitempty"`
	//	A numeric ID representing the color of the label icon.
	// Refer to the id column in the Colors (https://developer.todoist.com/guides/#colors) guide for more info.
	Color *int `json:"color,omitempty"`
	// Whether the label is a favorite (a true or false value).
	Favorite *bool `json:"favorite,omitempty"`
}

Options for updating a label.

type UpdateProjectOptions

type UpdateProjectOptions struct {
	RequestID *string `json:"-"`

	// Name of the project.
	Name *string `json:"name,omitempty"`
	// A numeric ID representing the color of the project icon.
	// Refer to the id column in the Colors guide (https://developer.todoist.com/guides/#colors) for more info.
	Color *int `json:"color,omitempty"`
	// Whether the project is a favorite (a true or false value).
	Favorite *bool `json:"favorite,omitempty"`
}

Options for updating a project.

type UpdateSectionOptions

type UpdateSectionOptions struct {
	RequestID *string `json:"-"`
}

Options for updating a section.

type UpdateTaskOptions

type UpdateTaskOptions struct {
	RequestID *string `json:"-"`

	// Task content.
	// This value may contain markdown-formatted text and hyperlinks.
	// Details on markdown support can be found in the Text Formatting article (https://todoist.com/help/articles/text-formatting) in the Help Center.
	Content *string `json:"content,omitempty"`
	// A description for the task.
	// This value may contain markdown-formatted text and hyperlinks.
	// Details on markdown support can be found in the Text Formatting article (https://todoist.com/help/articles/text-formatting) in the Help Center.
	Description *string `json:"description,omitempty"`
	// IDs of labels associated with the task.
	LabelIDs *[]int `json:"label_ids,omitempty"`
	// Task priority from 1 (normal) to 4 (urgent).
	Priority *int `json:"priority,omitempty"`
	// Human defined (https://todoist.com/help/articles/due-dates-and-times) task due date (ex.: "next Monday", "Tomorrow"). Value is set using local (not UTC) time.
	DueString *string `json:"due_string,omitempty"`
	// Specific date in YYYY-MM-DD format relative to user’s timezone.
	DueDate *string `json:"due_date,omitempty"`
	// Specific date and time in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) format in UTC.
	DueDatetime *string `json:"due_datetime,omitempty"`
	// 2-letter code specifying language in case due_string is not written in English.
	DueLang *string `json:"due_lang,omitempty"`
	// The responsible user ID or 0 to unset (for shared tasks).
	Assignee *int `json:"assignee,omitempty"`
}

Options for updating a task.

type User

type User struct {
	// User ID.
	ID int `json:"id"`
	// User name.
	Name string `json:"name"`
	// User email address.
	Email string `json:"email"`
}

type Users

type Users []*User

List of users.

Jump to

Keyboard shortcuts

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