youtubeapi

package
v0.0.0-...-7df91eb Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseListCall

func BaseListCall(service *youtube.Service) *youtube.SearchListCall

func GetToken

func GetToken(ctx context.Context, config *oauth2.Config) *oauth2.Token

func GetVideoId

func GetVideoId(listResponse youtube.SearchListResponse) []string

func LoadListResponse

func LoadListResponse(file string, listResponse any)

func NewService

func NewService() *youtube.Service

func SaveListResponse

func SaveListResponse(file string, listResponse any)

Types

type API

type API interface {
	GetSearchList(options *SearchOptions) youtube.SearchListResponse
	GetVideosList(id []string) youtube.VideoListResponse
}

type SearchOptions

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

func (*SearchOptions) Gaming

func (so *SearchOptions) Gaming()

func (*SearchOptions) WithPublishedAfter

func (so *SearchOptions) WithPublishedAfter(time string)

func (*SearchOptions) WithPublishedBefore

func (so *SearchOptions) WithPublishedBefore(time string)

func (*SearchOptions) WithToken

func (so *SearchOptions) WithToken(token string)

type YoutubeAPI

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

func NewYoutubeAPI

func NewYoutubeAPI(service *youtube.Service) *YoutubeAPI

func (*YoutubeAPI) GetSearchList

func (yt *YoutubeAPI) GetSearchList(options *SearchOptions) youtube.SearchListResponse

func (*YoutubeAPI) GetVideosList

func (yt *YoutubeAPI) GetVideosList(id []string) youtube.VideoListResponse

Jump to

Keyboard shortcuts

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