twitch

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scraper

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

func NewScraper

func NewScraper(clientID string, userAccessToken string, streamers StreamerIndex) (*Scraper, error)

func (*Scraper) Start

func (scraper *Scraper) Start()

func (*Scraper) Stop

func (scraper *Scraper) Stop()

func (*Scraper) Streams

func (scraper *Scraper) Streams() []Stream

type Stream

type Stream struct {
	Id              string    `json:"id"`
	Channel         string    `json:"channel"`
	Url             string    `json:"url"`
	Title           string    `json:"title"`
	ViewerCount     int       `json:"viewers"`
	Language        string    `json:"language"`
	ClientName      string    `json:"client_name"`
	ServerAddress   string    `json:"server_address"`
	StartedAt       time.Time `json:"started_at"`
	DurationMinutes int       `json:"duration_minutes"`
	IsFeatured      bool      `json:"is_featured"`
	GameName        string    `json:"game_name"`
}

type StreamerIndex

type StreamerIndex map[string]string

func (StreamerIndex) GetClientName added in v0.5.3

func (s StreamerIndex) GetClientName(stream helix.Stream) string

func (StreamerIndex) UserLogins

func (s StreamerIndex) UserLogins() []string

Jump to

Keyboard shortcuts

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