Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadProgressWriter ¶
type DownloadProgressWriter struct { ContentLength int64 ProgressOutput *feed.ProgressUpdateFeed // contains filtered or unexported fields }
DownloadProgressWriter writes download percentage to provided ProgressOutput
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader offers high level functions to download videos into files
func New ¶
func New(c client.Client, videoID string, progressOutput *feed.ProgressUpdateFeed) *Downloader
New creates a new downloader with provided client
func (*Downloader) DownloadVideo ¶
func (dl *Downloader) DownloadVideo(ctx context.Context) error
DownloadVideo returns a download handle
func (*Downloader) RetrieveVideoInfo ¶
func (dl *Downloader) RetrieveVideoInfo(ctx context.Context) error
RetrieveVideoInfo fetches video info from youtube API
type ProgressBarWriter ¶
type ProgressBarWriter struct {
// contains filtered or unexported fields
}
ProgressBarWriter is used to write download progress to mpb progress bar
Click to show internal directories.
Click to hide internal directories.