youtube

package
v0.0.0-...-8289416 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package youtube is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var NewYoutubeClientSet = wire.NewSet(
	NewYoutubeClient, wire.Bind(new(client), new(*youtubeClient)))

Functions

func InitializeYoutubeClient

func InitializeYoutubeClient() (*youtubeClient, error)

func NewYoutubeClient

func NewYoutubeClient(c *config.Config) (*youtubeClient, error)

NewYoutubeClient is the provider function for the wrapper around the Google Youtube API.

Types

type ChannelInfo

type ChannelInfo struct {
	ID, Name string
}

ChannelInfo contains pertinent information for a Channel.

type Mockclient

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

Mockclient is a mock of client interface

func NewMockclient

func NewMockclient(ctrl *gomock.Controller) *Mockclient

NewMockclient creates a new mock instance

func (*Mockclient) EXPECT

func (m *Mockclient) EXPECT() *MockclientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

type MockclientMockRecorder

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

MockclientMockRecorder is the mock recorder for Mockclient

type VideoInfo

type VideoInfo struct {
	ID, Name string
}

VideoInfo contains pertinent information for a Video.

type Wrapper

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

Wrapper is the main struct for interacting with the youtube package.

func InitializeWrapper

func InitializeWrapper() (*Wrapper, error)

func NewWrapper

func NewWrapper(client client) (*Wrapper, error)

NewWrapper initializes and returns a Wrapper

func (*Wrapper) FetchNewVideos

func (m *Wrapper) FetchNewVideos(channelID, ts string) ([]VideoInfo, error)

FetchNewVideos returns an array of video URLs.

func (*Wrapper) GetChannelInfo

func (m *Wrapper) GetChannelInfo(url string) (ChannelInfo, error)

GetChannelInfo accepts a video or channel URL and returns ChannelInfo

Jump to

Keyboard shortcuts

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