youtube

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 12 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 Authorizer

type Authorizer struct {
	Token string
}

Authorizer implements twitter.Authorizer to authorize Twitter requests

func NewAuthorizer

func NewAuthorizer(token string) *Authorizer

NewAuthorizer implements a new Authorizer instance

func (*Authorizer) Add

func (a *Authorizer) Add(req *http.Request)

Add implements twitter.Authorizer

type Config

type Config struct {
	APIKey string `yaml:"api_key"`
}

func ParseConfig

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

type ScoreDetails

type ScoreDetails struct {
	LinkedAt         *time.Time `json:"linked_at,omitempty"`
	SubscribersCount uint64     `json:"followers_count"`
}

func NewScoreDetails

func NewScoreDetails(linkedAt *time.Time, subscribersCount uint64) *ScoreDetails

func (*ScoreDetails) GetScore

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

GetScore implements types.ProfileScoreDetails

type Scorer

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

Scorer represents a scorers.Scorer instance to score profiles based on their Twitter statistics

func (*Scorer) GetChannel

func (s *Scorer) GetChannel(username string) (*youtube.Channel, error)

GetChannel returns the YouTube channel data of the user having the given username

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

Jump to

Keyboard shortcuts

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