Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidTwitchAPICredentials is the error thrown // when provided invalid Twitch API credentials ErrInvalidTwitchAPICredentials = errors.New("invalid Twitch API credentials") // ErrInvalidURL is the error thrown when URL is invalid ErrInvalidURL = errors.New("invalid URL") )
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { URL string Name string // Stream is nil when channel is not streaming Stream *Stream }
Channel represents a Youtube or Twitch channel
func SortByName ¶
SortByName returns a slice of channels sorted by name
type ChannelsClient ¶
type ChannelsClient struct {
// contains filtered or unexported fields
}
ChannelsClient provides the client instance to get streams info
func NewChannelsClient ¶
func NewChannelsClient(twitchAPICredentials TwitchAPICredentials) *ChannelsClient
NewChannelsClient creates a new ChannelsClient instance with provided credentials
func (*ChannelsClient) ChannelFromURL ¶
func (cc *ChannelsClient) ChannelFromURL(url string) (*Channel, error)
ChannelFromURL fetches a channel's information
type TwitchAPICredentials ¶
TwitchAPICredentials are required to get info from Twitch streams. Check https://dev.twitch.tv/docs/authentication
Click to show internal directories.
Click to hide internal directories.