Hangout Chat でWebhookを使ってメッセージを投稿するためのパッケージです。
package main
import (
"fmt""log""github.com/zucc-hicc/hango"
)
constwebhook="webhook url"constthread="thread path"funcmain() {
c:=hango.NewClient(webhook)
varbs []byte// Post to a new thread.bs, err:=c.Post("Test of post to a new thead")
iferr!=nil {
log.Println(err)
}
fmt.Printf("%s\n", bs)
// Post to an existing thread.bs, err=c.PostToThread("Test of post to an existing thread", thread)
iferr!=nil {
log.Println(err)
}
fmt.Printf("%s\n", bs)
}