Files
m3o-go/examples/comments/create/createAComment/main.go
2022-02-20 12:36:15 +00:00

18 lines
297 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/comments"
)
// Create a new comment
func main() {
commentsService := comments.NewCommentsService(os.Getenv("M3O_API_TOKEN"))
rsp, err := commentsService.Create(&comments.CreateRequest{
Text: "This is my comment",
})
fmt.Println(rsp, err)
}