Files
m3o-go/examples/notes/create/createANote/main.go
2021-11-03 14:00:31 +00:00

20 lines
296 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/notes"
)
// Create a new note
func main() {
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)
}