yt

package module
v0.0.0-...-6cd4a2e Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID           string
	Name         string
	CanonicalURL string
}

Channel contains a video's channel metadata.

type SearchResult

type SearchResult struct {
	Description string
	Channel     Channel
	ID          string
	Length      string // TODO convert to int?
	Title       string
	Thumbnails  []Thumbnail
	ViewCount   string
	VideoURL    string
}

SearchResult contains metadata about a Youtube video.

func Search(query string, page int) ([]SearchResult, error)

Search Youtube for a given query by page. Returns a list of SearchResults or an error if one occurred.

type Thumbnail

type Thumbnail struct {
	URL    string
	Height int
	Width  int
}

Thumbnail contains a video's thumbnail URL and dimensions.

Jump to

Keyboard shortcuts

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