rtm

package module
Version: v0.0.0-...-6c663cd Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 15 Imported by: 0

README

rtm

CI status Go Report Card PkgGoDev

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

| 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.push.getSubscriptions | TODO | rtm.push.getTopics | TODO | rtm.push.subscribe | TODO | rtm.push.unsubscribe | TODO | rtm.reflection.getMethodInfo | ReflectionService.GetMethodInfo | rtm.reflection.getMethods | ReflectionService.GetMethods | rtm.scripts.add | TODO | rtm.scripts.delete | TODO | rtm.scripts.getList | TODO | rtm.scripts.run | TODO | rtm.scripts.setCode | TODO | rtm.scripts.setName | TODO | rtm.scripts.setParams | TODO | rtm.settings.getList | TODO | rtm.tags.getList | TODO | rtm.tasks.add | TasksService.Add | rtm.tasks.addTags | TODO | rtm.tasks.complete | TODO | rtm.tasks.delete | TasksService.Delete | 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

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  AuthInfoUser
}

type AuthInfoUser

type AuthInfoUser struct {
	ID       string
	UserName string
	FullName string
}

type Client

type Client struct {
	APIKey     string
	APISecret  string
	AuthToken  string
	HTTPClient *http.Client
	Debugf     func(format string, args ...any)
	// contains filtered or unexported fields
}

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)

Call calls the given method with arguments and returns response body or 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 DateTime

type DateTime struct {
	time.Time
	// contains filtered or unexported fields
}

DateTime wraps time.Time with ISO 8601 (like `2006-01-02T15:04:05Z`) JSON encoding and decoding.

func (DateTime) MarshalJSON

func (t DateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (DateTime) String

func (t DateTime) String() string

String implements fmt.Stringer.

func (*DateTime) UnmarshalJSON

func (t *DateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Error

type Error struct {
	Msg  string `json:"msg"`
	Code int    `json:"code"`
}

Error represents API error.

func (*Error) Error

func (e *Error) Error() string

type List

type List struct {
	ID       string
	Name     string
	Position int
	Locked   bool
	Archived bool
	Deleted  bool
	Smart    bool
}

type ListsService

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

type MethodInfo

type MethodInfo struct {
	Name       string
	NeedsLogin bool
}

type Note

type Note struct {
	ID       string
	Created  DateTime
	Modified DateTime
	Text     string
}

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
	Due       DateTime
	Added     DateTime
	Completed DateTime
	Deleted   DateTime
	Priority  Priority
	Estimate  time.Duration
	Start     DateTime
}

type TaskSeries

type TaskSeries struct {
	ID         string
	Created    DateTime
	Modified   DateTime
	Name       string
	Source     string
	URL        string
	LocationID string
	Tags       []string
	Notes      []Note
	Task       []Task
}

type TasksAddParams

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

type TasksDeleteParams

type TasksDeleteParams struct {
	ListID       string
	TaskSeriesID string
	TaskID       string
}

type TasksGetListParams

type TasksGetListParams struct {
	ListID   string
	Filter   string
	LastSync DateTime
}

type TasksService

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

type TestService

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

type TimelinesService

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

Jump to

Keyboard shortcuts

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