mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
21 lines
505 B
Go
Executable File
21 lines
505 B
Go
Executable File
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)
|
|
|
|
}
|