youtubesvc

package
v0.0.0-...-eae27d5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetAllComments

func GetAllComments(videoID string) ([]models.YoutubeComment, error)

func InitSweeper

func InitSweeper(ds *discordgo.Session)

func ProcessCommentThread

func ProcessCommentThread(ct *youtube.CommentThread, comments *[]models.YoutubeComment) error

func Scan

func Scan(wv models.WatchedVideo)

func Sweeper

func Sweeper()

func YoutubeCommentToEmbed

func YoutubeCommentToEmbed(c models.YoutubeComment, videoID, videoTitle string) *discordgo.MessageEmbed

Types

type UserYoutubeService

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

func NewUserYoutubeService

func NewUserYoutubeService(token string, refreshToken *string) (*UserYoutubeService, error)

func (*UserYoutubeService) SendChatMessage

func (usvc *UserYoutubeService) SendChatMessage(livechatID string, content string) (*youtube.LiveChatMessage, error)

func (*UserYoutubeService) Service

func (svc *UserYoutubeService) Service() *youtube.Service

type YoutubeService

type YoutubeService struct {
	// contains filtered or unexported fields
}
var SS *YoutubeService

func NewYoutubeService

func NewYoutubeService(ctx context.Context) (*YoutubeService, error)

func (*YoutubeService) GetLivechatID

func (svc *YoutubeService) GetLivechatID(videoID string) (string, string, error)

func (*YoutubeService) GetStreamInfo

func (svc *YoutubeService) GetStreamInfo(videoID string) (time.Time, *time.Time, *youtube.VideoSnippet, error)

func (*YoutubeService) ListUpcomingStreams

func (svc *YoutubeService) ListUpcomingStreams(channelID string) ([]models.YoutubeStreamRecord, error)

func (*YoutubeService) ParseVideoID

func (svc *YoutubeService) ParseVideoID(text string) (string, error)

Jump to

Keyboard shortcuts

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