playlist

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("invalid playlist")
View Source
var ErrLimit = errors.New("exceeded fetch limit")

Functions

func Handler

func Handler(service *youtube.Service) http.HandlerFunc

Types

type Item

type Item youtube.PlaylistItemSnippet

func (*Item) EmbedURL added in v1.6.0

func (i *Item) EmbedURL() *url.URL

func (*Item) FeedItem

func (i *Item) FeedItem(embed bool) (*feeds.Item, error)

func (*Item) ParsePublishedAt added in v1.6.0

func (i *Item) ParsePublishedAt() (time.Time, error)

func (*Item) TemplateDescription added in v1.6.0

func (i *Item) TemplateDescription(embed bool) g.Group

func (*Item) URL added in v1.6.0

func (i *Item) URL() *url.URL

type Playlist

type Playlist struct {
	Service *youtube.Service
	ID      string
	Embed   bool
	Limit   int
}

func New

func New(service *youtube.Service, id string) Playlist

func (Playlist) Feed

func (p Playlist) Feed(ctx context.Context) (*feeds.Feed, error)

func (Playlist) FeedItems

func (p Playlist) FeedItems(ctx context.Context) ([]*feeds.Item, error)

func (Playlist) Items

func (p Playlist) Items(ctx context.Context) ([]*Item, error)

func (Playlist) Meta

func (p Playlist) Meta(ctx context.Context) (*youtube.PlaylistSnippet, error)

func (Playlist) URL added in v1.6.0

func (p Playlist) URL() *url.URL

Jump to

Keyboard shortcuts

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