importers

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedVideoURL = errors.New("error: unsupported video url")
)

Functions

This section is empty.

Types

type Importer

type Importer interface {
	GetVideoInfo(url string) (VideoInfo, error)
}

func NewImporter

func NewImporter(url string) (Importer, error)

type VideoInfo

type VideoInfo struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`

	VideoURL     string `json:"video_url"`
	ThumbnailURL string `json:"thumbnail_url"`
}

type VimeoImporter

type VimeoImporter struct{}

func (*VimeoImporter) GetVideoInfo

func (i *VimeoImporter) GetVideoInfo(url string) (videoInfo VideoInfo, err error)

type YoutubeImporter

type YoutubeImporter struct{}

func (*YoutubeImporter) GetVideoInfo

func (i *YoutubeImporter) GetVideoInfo(url string) (videoInfo VideoInfo, err error)

Jump to

Keyboard shortcuts

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