youtube

package
v0.0.0-...-96179aa Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

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
	Title string
}

func (Channel) URL

func (ch Channel) URL() string

type Client

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

func New

func New() (*Client, error)

New returns a new YouTube client using the key set in core.YouTubeKey.

func (*Client) SearchChannels

func (c *Client) SearchChannels(query string, maxResults int64) ([]Channel, error)

SearchChannels returns a list of channels, of maxResults length, matching the query and ranked by relevance.

func (*Client) SearchVideos

func (c *Client) SearchVideos(query string, maxResults int64) ([]Video, error)

SearchVideos returns a list of videos, of maxResults length, matching the query and ranked by relevance. Will only return videos, not livestreams or premiers.

type Video

type Video struct {
	ID    string
	Title string
}

func (Video) URL

func (v Video) URL() string

Jump to

Keyboard shortcuts

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