client

package
v1.5.3 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 is youtube client.

func New

func New(key string) (*Client, error)

New to create new youtube client.

func (*Client) GenerateChannelURL

func (c *Client) GenerateChannelURL(id string) string

GenerateChannelURL to generate youtube channel url.

func (*Client) GenerateVideoURL

func (c *Client) GenerateVideoURL(id string) string

GenerateVideoURL to generate youtube video url.

func (*Client) GetIDFromURL

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

GetIDFromURL to get video id from url.

func (*Client) GetSourceURLByID

func (c *Client) GetSourceURLByID(ctx context.Context, id string) (string, error)

GetSourceURLByID to get video source url.

func (*Client) GetVideo

func (c *Client) GetVideo(ctx context.Context, id string) (*entity.Video, error)

GetVideo to get video detail.

func (*Client) GetVideos

func (c *Client) GetVideos(ctx context.Context, query string, limit int64) ([]entity.Video, error)

GetVideos to search youtube video.

func (*Client) IsURLValid

func (c *Client) IsURLValid(url_ string) bool

IsURLValid to check if youtube url valid.

Jump to

Keyboard shortcuts

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