todoistapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg *Config) *Client

func (*Client) CreateProject

func (cl *Client) CreateProject(p *CreateProjectPayload) (*models.Project, error)

func (*Client) DeleteProject

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

func (*Client) GetProject

func (cl *Client) GetProject(id string) (*models.Project, error)

func (*Client) ListProjects

func (cl *Client) ListProjects() (models.Projects, error)

func (*Client) UpdateProject

func (cl *Client) UpdateProject(id string, p *UpdateProjectPayload) (*models.Project, error)

type Config

type Config struct {
	Token string
}

type CreateProjectPayload

type CreateProjectPayload struct {
	Name       string  `json:"name"`
	ParentID   *string `json:"parent_id,omitempty"`
	Color      *string `json:"color,omitempty"`
	IsFavorite *bool   `json:"is_favorite,omitempty"`
	ViewStyle  *string `json:"view_style,omitempty"`
}

type UpdateProjectPayload

type UpdateProjectPayload struct {
	Name       *string `json:"name,omitempty"`
	Color      *string `json:"color,omitempty"`
	IsFavorite *bool   `json:"is_favorite,omitempty"`
	ViewStyle  *string `json:"view_style,omitempty"`
}

Jump to

Keyboard shortcuts

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