mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-15 04:04:43 +00:00
Commit from m3o/m3o action
This commit is contained in:
21
examples/notes/update/updateANote/main.go
Executable file
21
examples/notes/update/updateANote/main.go
Executable file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"go.m3o.com/notes"
|
||||
)
|
||||
|
||||
// Update a note
|
||||
func main() {
|
||||
notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN"))
|
||||
rsp, err := notesService.Update(¬es.UpdateRequest{
|
||||
Note: ¬es.Note{
|
||||
Id: "63c0cdf8-2121-11ec-a881-0242e36f037a",
|
||||
Text: "Updated note text",
|
||||
Title: "Update Note",
|
||||
},
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user