Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-03 16:08:32 +00:00
parent 9a245d66ac
commit d87e334dca
18 changed files with 706 additions and 635 deletions

View File

@@ -0,0 +1,20 @@
package main
import (
"fmt"
"os"
"go.m3o.com/stream"
)
// Create a channel with a given name and description. Channels are created automatically but
// this allows you to specify a description that's persisted for the lifetime of the channel.
func main() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.CreateChannel(&stream.CreateChannelRequest{
Description: "The channel for all things",
Name: "general",
})
fmt.Println(rsp, err)
}