mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-19 05:25:19 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -28,6 +28,12 @@ func (t *NotesService) Delete(request *DeleteRequest) (*DeleteResponse, error) {
|
||||
return rsp, t.client.Call("notes", "Delete", request, rsp)
|
||||
}
|
||||
|
||||
// Specify the note to events
|
||||
func (t *NotesService) Events(request *EventsRequest) (*EventsResponse, error) {
|
||||
rsp := &EventsResponse{}
|
||||
return rsp, t.client.Call("notes", "Events", request, rsp)
|
||||
}
|
||||
|
||||
// List all the notes
|
||||
func (t *NotesService) List(request *ListRequest) (*ListResponse, error) {
|
||||
rsp := &ListResponse{}
|
||||
@@ -40,12 +46,6 @@ func (t *NotesService) Read(request *ReadRequest) (*ReadResponse, error) {
|
||||
return rsp, t.client.Call("notes", "Read", request, rsp)
|
||||
}
|
||||
|
||||
// Specify the note to events
|
||||
func (t *NotesService) Subscribe(request *SubscribeRequest) (*SubscribeResponse, error) {
|
||||
rsp := &SubscribeResponse{}
|
||||
return rsp, t.client.Call("notes", "Subscribe", request, rsp)
|
||||
}
|
||||
|
||||
// Update a note
|
||||
func (t *NotesService) Update(request *UpdateRequest) (*UpdateResponse, error) {
|
||||
rsp := &UpdateResponse{}
|
||||
@@ -73,6 +73,18 @@ type DeleteResponse struct {
|
||||
Note *Note `json:"note"`
|
||||
}
|
||||
|
||||
type EventsRequest struct {
|
||||
// optionally specify a note id
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
type EventsResponse struct {
|
||||
// the event which occured; create, delete, update
|
||||
Event string `json:"event"`
|
||||
// the note which the operation occured on
|
||||
Note *Note `json:"note"`
|
||||
}
|
||||
|
||||
type ListRequest struct {
|
||||
}
|
||||
|
||||
@@ -104,18 +116,6 @@ type ReadResponse struct {
|
||||
Note *Note `json:"note"`
|
||||
}
|
||||
|
||||
type SubscribeRequest struct {
|
||||
// optionally specify a note id
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
type SubscribeResponse struct {
|
||||
// the event which occured; create, delete, update
|
||||
Event string `json:"event"`
|
||||
// the note which the operation occured on
|
||||
Note *Note `json:"note"`
|
||||
}
|
||||
|
||||
type UpdateRequest struct {
|
||||
Note *Note `json:"note"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user