README

rtm

CI status Go Report Card GoDoc

Go client for Remember The Milk API v2.

Note: this product uses the Remember The Milk API but is not endorsed or certified by Remember The Milk.

Methods

API method Package method
rtm.auth.checkToken AuthService.CheckToken
rtm.auth.getFrob AuthService.GetFrob
rtm.auth.getToken AuthService.GetToken
rtm.contacts.add TODO
rtm.contacts.delete TODO
rtm.contacts.getList TODO
rtm.groups.add TODO
rtm.groups.addContact TODO
rtm.groups.delete TODO
rtm.groups.getList TODO
rtm.groups.removeContact TODO
rtm.lists.add TODO
rtm.lists.archive TODO
rtm.lists.delete TODO
rtm.lists.getList ListsService.GetList
rtm.lists.setDefaultList TODO
rtm.lists.setName TODO
rtm.lists.unarchive TODO
rtm.locations.getList TODO
rtm.tags.getList TODO
rtm.reflection.getMethodInfo ReflectionService.GetMethodInfo
rtm.reflection.getMethods ReflectionService.GetMethods
rtm.settings.getList TODO
rtm.tasks.add TasksService.Add
rtm.tasks.addTags TODO
rtm.tasks.complete TODO
rtm.tasks.delete TODO
rtm.tasks.getList TasksService.GetList
rtm.tasks.movePriority TODO
rtm.tasks.moveTo TODO
rtm.tasks.notes.add TODO
rtm.tasks.notes.delete TODO
rtm.tasks.notes.edit TODO
rtm.tasks.postpone TODO
rtm.tasks.removeTags TODO
rtm.tasks.setDueDate TODO
rtm.tasks.setEstimate TODO
rtm.tasks.setLocation TODO
rtm.tasks.setName TODO
rtm.tasks.setParentTask TODO
rtm.tasks.setPriority TODO
rtm.tasks.setRecurrence TODO
rtm.tasks.setStartDate TODO
rtm.tasks.setTags TODO
rtm.tasks.setURL TODO
rtm.tasks.uncomplete TODO
rtm.test.echo TestService.Echo
rtm.test.login TestService.Login
rtm.time.convert TODO
rtm.time.parse TODO
rtm.timelines.create TimelinesService.Create
rtm.timezones.getList TODO
rtm.transactions.undo TODO
Expand ▾ Collapse ▴

Documentation

Overview

Package rtm provides access to Remember The Milk API v2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args map[string]string

type AuthInfo

type AuthInfo struct {
	Token string
	Perms Perms
	User  struct {
		ID       string
		UserName string
		FullName string
	}
}

type Client

type Client struct {
	APIKey      string
	APISecret   string
	AuthToken   string
	HTTPClient  *http.Client
	DebugLogger func(v ...interface{})
}

func (*Client) Auth

func (c *Client) Auth() *AuthService

func (*Client) AuthenticationURL

func (c *Client) AuthenticationURL(perms Perms, frob string) string

AuthenticationURL returns authentication URL for given permissions and frob (that can be empty). See https://www.rememberthemilk.com/services/api/authentication.rtm, "User authentication for web-based applications" and "User authentication for desktop applications".

func (*Client) Call

func (c *Client) Call(ctx context.Context, method string, args Args) ([]byte, error)

func (*Client) Lists

func (c *Client) Lists() *ListsService

func (*Client) Reflection

func (c *Client) Reflection() *ReflectionService

func (*Client) Tasks

func (c *Client) Tasks() *TasksService

func (*Client) Test

func (c *Client) Test() *TestService

func (*Client) Timelines

func (c *Client) Timelines() *TimelinesService

type Duration

type Duration struct {
	time.Duration
}

Duration wraps time.Duration with ISO 8601 (like `PT1H30M`) text encoding and decoding,

func (Duration) MarshalText

func (d Duration) MarshalText() (text []byte, err error)

MarshalText implements encoding.TextMarshaler.

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type Error

type Error struct {
	Code int    `xml:"code,attr"`
	Msg  string `xml:"msg,attr"`
}

func (*Error) Error

func (e *Error) Error() string

type List

type List struct {
	ID       string `xml:"id,attr"`
	Name     string `xml:"name,attr"`
	Locked   bool   `xml:"locked,attr"`
	Archived bool   `xml:"archived,attr"`
	Position int    `xml:"position,attr"`
	Smart    bool   `xml:"smart,attr"`
}

type ListsService

type ListsService struct {
	// contains filtered or unexported fields

}

type MethodInfo

type MethodInfo struct {
	Name       string
	NeedsLogin bool
}

type Perms

type Perms string
const (
	Read   Perms = "read"
	Write  Perms = "write"
	Delete Perms = "delete"
)

type Priority

type Priority string

type ReflectionService

type ReflectionService struct {
	// contains filtered or unexported fields

}

type Task

type Task struct {
	ID         string `xml:"id,attr"`
	Due        Time   `xml:"due,attr"`
	HasDueTime bool   `xml:"has_due_time,attr"`
	Added      Time   `xml:"added,attr"`
	Completed  Time   `xml:"completed,attr,omitempty"`
	// Deleted      string    `xml:"deleted,attr"`
	Priority     Priority `xml:"priority,attr"`
	Estimate     Duration `xml:"estimate,attr"`
	Start        Time     `xml:"start,attr"`
	HasStartTime bool     `xml:"has_start_time,attr"`
}

type TaskSeries

type TaskSeries struct {
	ID         string `xml:"id,attr"`
	Created    Time   `xml:"created,attr"`
	Modified   Time   `xml:"modified,attr"`
	Name       string `xml:"name,attr"`
	Source     string `xml:"source,attr"`
	URL        string `xml:"url,attr"`
	LocationID string `xml:"location_id,attr"`
	// Tags         []interface{} `json:"tags"`
	// Notes        []interface{} `json:"notes"`
	Task []Task `xml:"task"`
}

type TasksAddParams

type TasksAddParams struct {
	ListID       string
	Name         string
	Parse        bool
	ParentTaskID string
}

type TasksGetListParams

type TasksGetListParams struct {
	ListID   string
	Filter   string
	LastSync Time
}

type TasksService

type TasksService struct {
	// contains filtered or unexported fields

}

type TestService

type TestService struct {
	// contains filtered or unexported fields

}

type Time

type Time struct {
	time.Time
}

Time wraps time.Time with ISO 8601 (like `2019-01-20T09:20:58Z`) text encoding and decoding.

func (Time) MarshalText

func (t Time) MarshalText() (text []byte, err error)

MarshalText implements encoding.TextMarshaler.

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalText

func (t *Time) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type TimelinesService

type TimelinesService struct {
	// contains filtered or unexported fields

}