item

package
v0.0.0-...-07f0968 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SortName        = "name"
	SortCreatedOn   = "createdOn"
	SortCompletedOn = "completedOn"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	List ID     `json:"list"`
	Name string `json:"name"`
}

func (*Create) Do

func (a *Create) Do(c *app.Client) (*Item, error)

func (*Create) MustDo

func (a *Create) MustDo(c *app.Client) *Item

func (*Create) Path

func (_ *Create) Path() string

type Delete

type Delete struct {
	List ID  `json:"list"`
	IDs  IDs `json:"ids"`
}

func (*Delete) Do

func (a *Delete) Do(c *app.Client) error

func (*Delete) MustDo

func (a *Delete) MustDo(c *app.Client)

func (*Delete) Path

func (_ *Delete) Path() string

type Get

type Get struct {
	List           ID         `json:"list"`
	NamePrefix     *string    `json:"namePrefix,omitempty"`
	CreatedOnMin   *time.Time `json:"createdOnMin,omitempty"`
	CreatedOnMax   *time.Time `json:"createdOnMax,omitempty"`
	Completed      *bool      `json:"completed,omitempty"`
	CompletedOnMin *time.Time `json:"completedOnMin,omitempty"`
	CompletedOnMax *time.Time `json:"completedOnMax,omitempty"`
	filter.Base
}

func (*Get) Do

func (a *Get) Do(c *app.Client) (*GetRes, error)

func (*Get) MustDo

func (a *Get) MustDo(c *app.Client) *GetRes

func (*Get) Path

func (_ *Get) Path() string

type GetRes

type GetRes struct {
	Set  []*Item `json:"set"`
	More bool    `json:"more"`
}

type Item

type Item struct {
	ID          ID         `json:"id"`
	Name        string     `json:"name"`
	CreatedOn   time.Time  `json:"createdOn"`
	CompletedOn *time.Time `json:"completedOn"`
}

type One

type One struct {
	List ID `json:"list"`
	ID   ID `json:"id"`
}

func (*One) Do

func (a *One) Do(c *app.Client) (*Item, error)

func (*One) MustDo

func (a *One) MustDo(c *app.Client) *Item

type Update

type Update struct {
	List     ID            `json:"list"`
	ID       ID            `json:"id"`
	Name     *field.String `json:"name"`
	Complete *field.Bool   `json:"complete"`
}

func (*Update) Do

func (a *Update) Do(c *app.Client) (*Item, error)

func (*Update) MustDo

func (a *Update) MustDo(c *app.Client) *Item

func (*Update) Path

func (_ *Update) Path() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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