twitch

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScorer

func NewScorer(junoCfg config.Config) profilesscore.Scorer

NewScorer returns a new Scorer instance

Types

type Config

type Config struct {
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
}

func UnmarshalConfig

func UnmarshalConfig(bz []byte) (*Config, error)

type ScoreDetails

type ScoreDetails struct {
	CreatedAt       time.Time `json:"created_at"`
	BroadcasterType string    `json:"broadcaster_type"`
}

func NewScoreDetails

func NewScoreDetails(createdAt time.Time, broadcasterType string) *ScoreDetails

func (*ScoreDetails) GetScore

func (d *ScoreDetails) GetScore() (score uint64)

GetScore implements types.ProfileScoreDetails

type Scorer

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

func (*Scorer) GetRateLimit

func (s *Scorer) GetRateLimit() *profilesscore.ScoreRateLimit

GetRateLimit implements Scorer

func (*Scorer) GetScoreDetails

func (s *Scorer) GetScoreDetails(_ string, application string, username string) (types.ProfileScoreDetails, error)

GetScoreDetails implements Scorer

func (*Scorer) GetUser

func (s *Scorer) GetUser(username string) (*helix.User, error)

GetUser returns the information for the given user

Jump to

Keyboard shortcuts

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