client

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 16 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 contains functions for youtube api client.

func New

func New(key string, maxAge int) *Client

New to create new youtube client.

func (*Client) GetChannelByID

func (c *Client) GetChannelByID(ctx context.Context, id string) (*entity.Channel, int, error)

GetChannelByID to get channel by id.

func (*Client) GetChannelIDByURL

func (c *Client) GetChannelIDByURL(ctx context.Context, url string) (string, int, error)

GetChannelIDByURL to get channel id by url.

func (*Client) GetVideoIDsByChannelID

func (c *Client) GetVideoIDsByChannelID(ctx context.Context, channelID string) ([]string, int, error)

GetVideoIDsByChannelID to get video ids by channel id.

func (*Client) GetVideosByIDs

func (c *Client) GetVideosByIDs(ctx context.Context, ids []string) ([]entity.Video, int, error)

GetVideosByIDs to get videos by ids.

Jump to

Keyboard shortcuts

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