youtube

package
v0.0.0-...-e4f0057 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Video

type Video struct {
	Title     string
	Thumbnail string
	ID        string
	Duration  float64
}

type YouTube

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

func NewYoutube

func NewYoutube(key string) (*YouTube, error)

func (*YouTube) GetPlaylist

func (y *YouTube) GetPlaylist(id string) []Video

GetPlaylist returns the URL, title and thumbnail of every element in the given playlist

func (*YouTube) GetVideo

func (y *YouTube) GetVideo(id string) *Video

GetVideo returns the title and thumbnail of the given video

func (*YouTube) Search

func (y *YouTube) Search(query string, maxResults int64) []Video

Search returns the URL, title and thumbnail of the first maxResults of the given query

Jump to

Keyboard shortcuts

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