Documentation ¶
Index ¶
- func GetVideoIDFromURL(input string) string
- func NormaliseURL(raw string) string
- type Client
- func (c *Client) GetVideoByID(ctx context.Context, id string) (*Video, error)
- func (c *Client) GetVideoByURL(ctx context.Context, rawURL string) (*Video, error)
- func (c *Client) GetVideosByIDs(ctx context.Context, ids ...string) ([]Video, error)
- func (c *Client) SearchVideo(ctx context.Context, search string, limit int64) ([]Video, error)
- type Video
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVideoIDFromURL ¶
func NormaliseURL ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetVideoByID ¶
func (*Client) GetVideoByURL ¶
func (*Client) GetVideosByIDs ¶
type Video ¶
type Video struct { ID string `json:"id"` ETag string `json:"etag"` Title string `json:"title"` ChannelID string `json:"channel_id"` ChannelTitle string `json:"channel_title"` DurationRaw string `json:"duration"` }
func (*Video) AsMessageEmbed ¶
func (v *Video) AsMessageEmbed() *discordgo.MessageEmbed
func (*Video) ChannelURL ¶
func (*Video) Duration ¶
func (v *Video) Duration() *util.ISODuration
Click to show internal directories.
Click to hide internal directories.