server

package
v0.0.0-...-b18db6d Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: 0BSD Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	DB             *db.TikTokDB
	Scraper        *scraperapi.Scraper
	Fetcher        *fetcherapi.Fetcher
	VideoStorage   storer.Storer
	CommentStorage storer.Storer
	ResultStorage  storer.Storer
}

func New

func New(dbPath, outPath, fetcherApiKey, scraperApiKey string) *Server

func (*Server) AddUsername

func (s *Server) AddUsername(username string) error

func (*Server) FetchAllVideos

func (s *Server) FetchAllVideos(userID string) error

func (*Server) FetchVideo

func (s *Server) FetchVideo(a *scraperapi.Aweme) (string, error)

func (*Server) FullUpdate

func (s *Server) FullUpdate(userID string) error

func (*Server) GenerateCommentedVideo

func (s *Server) GenerateCommentedVideo(a *scraperapi.Aweme, commentUsername, commentText, imagePath string) (string, error)

func (*Server) RemoveUsername

func (s *Server) RemoveUsername(username string) error

func (*Server) Run

func (s *Server) Run() error

func (*Server) Update

func (s *Server) Update(userID string) error

func (*Server) UpdateAllDaily

func (s *Server) UpdateAllDaily() error

func (*Server) UpdateAllOnce

func (s *Server) UpdateAllOnce() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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