Documentation ¶
Index ¶
- func MakeRequest(m string, e string, d io.Reader) (data []byte, err error)
- func UpdateChannel(channelID string, channelUpdate *TwitchChannelEditData) error
- type TwitchChannel
- type TwitchChannelEdit
- type TwitchChannelEditData
- type TwitchStream
- type TwitchStreamData
- type TwitchStreamPreview
- type TwitchUser
- type TwitchUsers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRequest ¶
MakeRequest makes a request using the proper credentials to the Twitch API v5
func UpdateChannel ¶
func UpdateChannel(channelID string, channelUpdate *TwitchChannelEditData) error
UpdateChannel updates the twitch channel
Types ¶
type TwitchChannel ¶
type TwitchChannel struct { Status string `json:"status"` Game string `json:"game"` Followers int `json:"followers"` Views int `json:"views"` DisplayName string `json:"display_name"` ID string `json:"_id"` }
TODO: Add more fields to this...
func GetChannel ¶
func GetChannel(channelID string) *TwitchChannel
GetChannel returns a TwitchChannel given a channelID
func GetMyChannel ¶
func GetMyChannel() *TwitchChannel
GetMyChannel gets the channel from OAuth token
type TwitchChannelEdit ¶
type TwitchChannelEdit struct {
Channel *TwitchChannelEditData `json:"channel"`
}
type TwitchChannelEditData ¶
type TwitchStream ¶
type TwitchStream struct {
Data *TwitchStreamData `json:"stream,omitempty"`
}
type TwitchStreamData ¶
type TwitchStreamData struct { Game string `json:"game"` Viewers int `json:"viewers"` Preview *TwitchStreamPreview `json:"preview"` Channel *TwitchChannel `json:"channel"` CreatedAt string `json:"created_at"` Delay int `json:"delay"` }
func GetStream ¶
func GetStream(channelID string) *TwitchStreamData
GetStream gets the stream for a channel if it is online.
type TwitchStreamPreview ¶
type TwitchUser ¶
type TwitchUser struct { ID string `json:"_id"` Name string `json:"name"` Type string `json:"type"` }
func GetUser ¶
func GetUser(login string) *TwitchUser
GetUser gets a single user based on the login TODO: check if there are users..
type TwitchUsers ¶
type TwitchUsers struct { Total int `json:"_total"` Users []*TwitchUser `json:"users"` }
Click to show internal directories.
Click to hide internal directories.