todoistapi

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 10 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 *CreateProjectParameters) (*models.Project, error)

func (*Client) CreateSection added in v0.4.0

func (cl *Client) CreateSection(p *CreateSectionParameters) (*models.Section, error)

func (*Client) DeleteProject

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

func (*Client) DeleteSection added in v0.4.0

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

func (*Client) GetProject

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

func (*Client) GetSection added in v0.4.0

func (cl *Client) GetSection(id string) (*models.Section, error)

func (*Client) ListProjects

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

func (*Client) ListSections added in v0.4.0

func (cl *Client) ListSections(p *ListSectionsParameters) (models.Sections, error)

func (*Client) UpdateProject

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

func (*Client) UpdateSection added in v0.4.0

func (cl *Client) UpdateSection(id string, p *UpdateSectionParameters) (*models.Section, error)

type Config

type Config struct {
	Token string
}

type CreateProjectParameters added in v0.4.0

type CreateProjectParameters 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 CreateSectionParameters added in v0.4.0

type CreateSectionParameters struct {
	Name      string `json:"name"`
	ProjectID string `json:"project_id"`
	Order     *int   `json:"order,omitempty"`
}

type ListSectionsParameters added in v0.4.0

type ListSectionsParameters struct {
	ProjectID *string `url:"project_id,omitempty"`
}

type UpdateProjectParameters added in v0.4.0

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

type UpdateSectionParameters added in v0.4.0

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

Jump to

Keyboard shortcuts

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