Files
m3o-go/examples/chat/send/sendAMessage/main.go
2022-02-17 16:45:54 +00:00

21 lines
363 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/chat"
)
// Connect to a chat to receive a stream of messages
// Send a message to a chat
func main() {
chatService := chat.NewChatService(os.Getenv("M3O_API_TOKEN"))
rsp, err := chatService.Send(&chat.SendRequest{
Client: "web",
Subject: "Random",
Text: "Hey whats up?",
})
fmt.Println(rsp, err)
}