youtube

package
v0.0.0-...-a7d89b2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provides methods to access the YouTube API.

func NewClient

func NewClient(secret, token string, log func(string, ...interface{})) (*Client, error)

NewClient creates a new authenticated client given the path of an oauth2 secret service and a token.

func (*Client) AddToPlaylist

func (c *Client) AddToPlaylist(playlist, video string) error

AddToPlaylist adds the given video id to a plyalist.

func (*Client) FetchLastPublished

func (c *Client) FetchLastPublished(playlist string) (*youtube.PlaylistItem, error)

FetchLastPublished finds the number of the latest episode published in the playlist.

func (*Client) Status

func (c *Client) Status(video string) (string, error)

Status returns the current status of a YouTube video.

func (*Client) Upload

func (c *Client) Upload(title, desc string, tags []string, path string) (string, error)

Upload uploads the video in the given path to YouTube with the given details.

func (*Client) WaitUntilProcessed

func (c *Client) WaitUntilProcessed(ctx context.Context, video string) error

WaitUntilProcessed blocks until the video is processed or the given context is canceled.

Jump to

Keyboard shortcuts

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