grim/wasdead

Move the commands back to kong (again)
draft
2019-05-11, Gary Kramlich
b81ba75f65cb
Move the commands back to kong (again)
package presence
type Presence struct {
StreamID string
Username string
UserID string
Title string
Viewers int64
Language string
URL string
ProfileImageURL string
ThumbnailURL string
}
type Provider interface {
GetPresence(url string) (Presence, error)
}
var providers map[string]Provider
func init() {
providers = map[string]Provider{}
}
func AddProvider(hostname string, provider Provider) {
providers[hostname] = provider
}
func GetPresence(url string) (Presence, error) {
return providers["twitch.tv"].GetPresence(url)
}