mtfosbot/module/background/twitch.go
2018-09-12 00:29:38 +08:00

33 lines
565 B
Go

package background
import (
"fmt"
"git.trj.tw/golang/mtfosbot/module/utils"
"git.trj.tw/golang/mtfosbot/model"
"git.trj.tw/golang/mtfosbot/module/apis/twitch"
)
func getStreamStatus() {
fmt.Println("run twitch check")
channels, err := model.GetAllChannel()
if err != nil {
return
}
var ids []string
for _, v := range channels {
ids = append(ids, v.ID)
}
info := twitch.GetUserStreamStatus(ids)
fmt.Printf("info len: %d\n", len(info))
for _, v := range info {
fmt.Println(utils.ToMap(v))
}
}
func checkStream(ch *model.TwitchChannel) {
}