Files
m3o-go/examples/notes/create/createANote.go
2021-10-29 10:44:29 +00:00

19 lines
305 B
Go
Executable File

package example
import (
"fmt"
"os"
"go.m3o.com/notes"
)
// Create a new note
func CreateAnote() {
notesService := notes.NewNotesService(os.Getenv("M3O_API_TOKEN"))
rsp, err := notesService.Create(&notes.CreateRequest{
Text: "This is my note",
Title: "New Note",
})
fmt.Println(rsp, err)
}