twitch

package
v0.0.0-...-646ff60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2024 License: CC0-1.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ID = twitch.ID

Variables

This section is empty.

Functions

func GetAuthorizationURL

func GetAuthorizationURL(
	params *helix.AuthorizationURLParams,
	clientID string,
	redirectURI string,
) string

func InitConfig

func InitConfig(cfg streamctl.Config)

Types

type ChatClient

type ChatClient interface {
	Join(channelIDs ...string) error
	OnShardMessage(func(shard int, msg irc.ChatMessage))
	Close()
}

type ChatHandler

type ChatHandler struct {
	// contains filtered or unexported fields
}

func NewChatHandler

func NewChatHandler(
	ctx context.Context,
	channelID string,
) (*ChatHandler, error)

func (*ChatHandler) Close

func (h *ChatHandler) Close() error

func (*ChatHandler) MessagesChan

func (h *ChatHandler) MessagesChan() <-chan streamcontrol.ChatMessage

type Config

type Config = twitch.Config

type OAuthHandler

type OAuthHandler = twitch.OAuthHandler

type PlatformSpecificConfig

type PlatformSpecificConfig = twitch.PlatformSpecificConfig

type SaveProfileHandler

type SaveProfileHandler interface {
	SaveProfile(context.Context, StreamProfile) error
}

type StreamProfile

type StreamProfile = twitch.StreamProfile

type Twitch

type Twitch struct {
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	cfg Config,
	saveCfgFn func(Config) error,
) (*Twitch, error)

func (*Twitch) ApplyProfile

func (t *Twitch) ApplyProfile(
	ctx context.Context,
	profile StreamProfile,
	customArgs ...any,
) error

func (*Twitch) BanUser

func (t *Twitch) BanUser(
	ctx context.Context,
	userID streamcontrol.ChatUserID,
	reason string,
	deadline time.Time,
) (_err error)

func (*Twitch) Close

func (t *Twitch) Close() error

func (*Twitch) EndStream

func (t *Twitch) EndStream(
	ctx context.Context,
) error

func (*Twitch) Flush

func (t *Twitch) Flush(
	ctx context.Context,
) error

func (*Twitch) GetAllCategories

func (t *Twitch) GetAllCategories(
	ctx context.Context,
) ([]helix.Game, error)

func (*Twitch) GetChatMessagesChan

func (t *Twitch) GetChatMessagesChan(
	ctx context.Context,
) (<-chan streamcontrol.ChatMessage, error)

func (*Twitch) GetStreamStatus

func (t *Twitch) GetStreamStatus(
	ctx context.Context,
) (*streamcontrol.StreamStatus, error)

func (*Twitch) InsertAdsCuePoint

func (t *Twitch) InsertAdsCuePoint(
	ctx context.Context,
	ts time.Time,
	duration time.Duration,
) error

func (*Twitch) IsCapable

func (t *Twitch) IsCapable(
	ctx context.Context,
	cap streamcontrol.Capability,
) bool

func (*Twitch) RemoveChatMessage

func (t *Twitch) RemoveChatMessage(
	ctx context.Context,
	messageID streamcontrol.ChatMessageID,
) (_ret error)

func (*Twitch) SendChatMessage

func (t *Twitch) SendChatMessage(ctx context.Context, message string) (_ret error)

func (*Twitch) SetDescription

func (t *Twitch) SetDescription(
	ctx context.Context,
	description string,
) error

func (*Twitch) SetTitle

func (t *Twitch) SetTitle(
	ctx context.Context,
	title string,
) error

func (*Twitch) StartStream

func (t *Twitch) StartStream(
	ctx context.Context,
	title string,
	description string,
	profile StreamProfile,
	customArgs ...any,
) (_err error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL