notes

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	// note text
	Text string `json:"text"`
	// note title
	Title string `json:"title"`
}

type CreateResponse

type CreateResponse struct {
	// The created note
	Note *Note `json:"note"`
}

type DeleteRequest

type DeleteRequest struct {
	// specify the id of the note
	Id string `json:"id"`
}

type DeleteResponse

type DeleteResponse struct {
	Note *Note `json:"note"`
}

type ListRequest

type ListRequest struct {
}

type ListResponse

type ListResponse struct {
	// the list of notes
	Notes []Note `json:"notes"`
}

type Note

type Note struct {
	// time at which the note was created
	Created string `json:"created"`
	// unique id for the note, generated if not specified
	Id string `json:"id"`
	// text within the note
	Text string `json:"text"`
	// title of the note
	Title string `json:"title"`
	// time at which the note was updated
	Updated string `json:"updated"`
}

type NotesService

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

func NewNotesService

func NewNotesService(token string) *NotesService

func (*NotesService) Create

func (t *NotesService) Create(request *CreateRequest) (*CreateResponse, error)

Create a new note

func (*NotesService) Delete

func (t *NotesService) Delete(request *DeleteRequest) (*DeleteResponse, error)

Delete a note

func (*NotesService) List

func (t *NotesService) List(request *ListRequest) (*ListResponse, error)

List all the notes

func (*NotesService) Read

func (t *NotesService) Read(request *ReadRequest) (*ReadResponse, error)

Read a note

func (*NotesService) Subscribe

func (t *NotesService) Subscribe(request *SubscribeRequest) (*SubscribeResponse, error)

Specify the note to events

func (*NotesService) Update

func (t *NotesService) Update(request *UpdateRequest) (*UpdateResponse, error)

Update a note

type ReadRequest

type ReadRequest struct {
	// the note id
	Id string `json:"id"`
}

type ReadResponse

type ReadResponse struct {
	// The note
	Note *Note `json:"note"`
}

type SubscribeRequest

type SubscribeRequest struct {
	// optionally specify a note id
	Id string `json:"id"`
}

type SubscribeResponse

type SubscribeResponse struct {
	// the event which occured; created, deleted, updated
	Event string `json:"event"`
	// the note which the operation occured on
	Note *Note `json:"note"`
}

type UpdateRequest

type UpdateRequest struct {
	Note *Note `json:"note"`
}

type UpdateResponse

type UpdateResponse struct {
	Note *Note `json:"note"`
}

Jump to

Keyboard shortcuts

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