Documentation
¶
Index ¶
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type EventsRequest
- type EventsResponse
- type ListRequest
- type ListResponse
- type Note
- type NotesService
- func (t *NotesService) Create(request *CreateRequest) (*CreateResponse, error)
- func (t *NotesService) Delete(request *DeleteRequest) (*DeleteResponse, error)
- func (t *NotesService) Events(request *EventsRequest) (*EventsResponse, error)
- func (t *NotesService) List(request *ListRequest) (*ListResponse, error)
- func (t *NotesService) Read(request *ReadRequest) (*ReadResponse, error)
- func (t *NotesService) Update(request *UpdateRequest) (*UpdateResponse, error)
- type ReadRequest
- type ReadResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
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 EventsRequest ¶ added in v0.22.0
type EventsRequest struct {
// optionally specify a note id
Id string `json:"id"`
}
type EventsResponse ¶ added in v0.22.0
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) Events ¶ added in v0.22.0
func (t *NotesService) Events(request *EventsRequest) (*EventsResponse, error)
Subscribe to notes events
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) 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 UpdateRequest ¶
type UpdateRequest struct {
Note *Note `json:"note"`
}
type UpdateResponse ¶
type UpdateResponse struct {
Note *Note `json:"note"`
}
Click to show internal directories.
Click to hide internal directories.