youtube

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a YouTube URL does not point at anything the API can find.
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey string
}

Config contains the configurable fields for the YouTube parser.

type Parser

type Parser struct {
	Config  *Config
	Service *youtube.Service
}

Parser implements parsing of YouTube URLs via API.

func (*Parser) Init

func (p *Parser) Init() error

Init initializes the parser.

func (*Parser) Name

func (p *Parser) Name() string

Name returns the parser's descriptive name.

func (*Parser) Parse

func (p *Parser) Parse(u *url.URL, referer *url.URL) (result parsers.ParseResult)

Parse parses the given URL.

Jump to

Keyboard shortcuts

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