Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Status string `json:"status"` DisplayName string `json:"display_name"` Game string `json:"game"` Logo string `json:"logo"` URL string `json:"url"` }
func GetChannel ¶
type Clip ¶
type Clip struct { Broadcaster ClipUser `json:"broadcaster"` Curator ClipUser `json:"curator"` Game string `json:"game"` Title string `json:"title"` Duration float64 `json:"duration"` Thumbnails struct { Medium string `json:"medium"` Small string `json:"small"` Tiny string `json:"tiny"` } `json:""` }
type Connection ¶
type Connection struct { Listen chan Listen // contains filtered or unexported fields }
Connection represents a connection to TPS
func MakeConnection ¶
func MakeConnection(AuthToken string) (*Connection, error)
MakeConnection connects to TPS ready for LISTENs
func (*Connection) CancelListenPlayback ¶
func (c *Connection) CancelListenPlayback(channel string)
CancelListenPlayback calls
func (*Connection) Len ¶
func (c *Connection) Len() int
Len returns the number of listens on this connection
func (*Connection) ListenPlayback ¶
func (c *Connection) ListenPlayback(channel string, cb PlaybackHandler)
ListenPlayback listens for Video playback events if will call cb with(channel, viewers, is-streaming, error). Viewers is 0 for the first is-streaming=true call
type Listen ¶
Listen causes a LISTEN or UNLISTEN to be sent to TPS If Updates is nil UNLISTEN is send, otherwise LISTEN is sent
type PlaybackHandler ¶
type PlaybackHandlerClosures ¶
type PlaybackHandlerClosures struct { UpHandler func() DownHandler func() ViewCountHandler func(int) CommercialHandler func() PropertyUpdateHandler func() ErrorHandler func(error) }
func (PlaybackHandlerClosures) Commercial ¶
func (p PlaybackHandlerClosures) Commercial()
func (PlaybackHandlerClosures) Down ¶
func (p PlaybackHandlerClosures) Down()
func (PlaybackHandlerClosures) Error ¶
func (p PlaybackHandlerClosures) Error(err error)
func (PlaybackHandlerClosures) PropertyUpdate ¶
func (p PlaybackHandlerClosures) PropertyUpdate()
func (PlaybackHandlerClosures) Up ¶
func (p PlaybackHandlerClosures) Up()
func (PlaybackHandlerClosures) ViewCount ¶
func (p PlaybackHandlerClosures) ViewCount(viewers int)
Click to show internal directories.
Click to hide internal directories.