api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GraphStatusOptions = []string{"not started", "in progress", "completed", "waiting on others", "deferred"}

Functions

func CreateRequest

func CreateRequest() (*resty.Request, error)

func CreateTask

func CreateTask(listId string, task *TodoTask) error

func GetClient

func GetClient() *resty.Client

Types

type GraphStatus

type GraphStatus string

Used for unmarshalling camelcase into normal text

func (*GraphStatus) Marshal

func (status *GraphStatus) Marshal() string

Marshal is called by TodoTask.MarshalJSON

func (*GraphStatus) UnmarshalJSON

func (status *GraphStatus) UnmarshalJSON(b []byte) (err error)

type TodoTask

type TodoTask struct {
	Id                   string              `json:"id"`
	Title                string              `json:"title"`
	Importance           string              `json:"importance"`
	IsReminderOn         bool                `json:"isReminderOn"`
	Status               GraphStatus         `json:"status"`
	ReminderDateTime     *datetime.GraphTime `json:"reminderDateTime"`
	DueDateTime          *datetime.GraphTime `json:"dueDateTime"`
	Completed            *datetime.GraphTime `json:"completedDateTime"`
	CreatedDateTime      time.Time           `json:"createdDateTime"`
	LastModifiedDateTime time.Time           `json:"lastModifiedDateTime"`
}

func (*TodoTask) MarshalJSON

func (t *TodoTask) MarshalJSON() ([]byte, error)

type TodoTaskList

type TodoTaskList []TodoTask

func GetTasks

func GetTasks(listId string) (*TodoTaskList, error)

type TodoTaskListItem

type TodoTaskListItem struct {
	// The name of the task list.
	DisplayName string `json:"displayName"`

	// The identifier of the task list, unique in the user's mailbox
	// Read-only.
	// Inherited from entity
	Id string `json:"id"`

	// True if the user is owner of the given task list.
	IsOwner bool `json:"isOwner"`

	// True if the task list is shared with other users
	IsShared bool `json:"isShared"`

	// Property indicating the list name if the given list is a well-known list.
	// Possible values are: none, defaultList, flaggedEmails, unknownFutureValue.
	WellknownListName string `json:"wellknownListName"`
}

type TodoTaskListList

type TodoTaskListList []TodoTaskListItem

List of TodoTaskList items

func GetLists

func GetLists() (*TodoTaskListList, error)

func (*TodoTaskListList) GetListId

func (l *TodoTaskListList) GetListId(name string) (string, error)

Jump to

Keyboard shortcuts

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