Documentation ¶
Index ¶
Constants ¶
View Source
const ( YOUTUBE_URL = "https://www.youtube.com/channel/" YOUTUBE_CUSTOM_URL = "https://www.youtube.com/c/" YOUTUBE_USER_URL = "https://www.youtube.com/" )
Variables ¶
View Source
var ( ErrInvalidUrl = errors.New("invalid url") ErrInvalidVideoId = errors.New("invalid video id") )
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Avatar string `json:"avatar"` Banner string `json:"banner"` Url string `json:"url"` CustomUrl string `json:"custom_url"` Subscribers string `json:"subscribers"` Views string `json:"views"` CreatedAt string `json:"created_at"` Verified bool `json:"verified"` Live bool `json:"live"` Videos string `json:"videos"` Socials []string `json:"socials"` OngoingStreams []string `json:"ongoing_streams"` Streams []string `json:"streams"` }
func GetChannel ¶
GetChannel retrieves channel information from a given URL or channel ID. It returns a Channel struct containing the channel details and an error if any.
type Video ¶ added in v0.0.3
type Video struct { Id string Title string Description string ViewCount int LikeCount int LiveNow bool LiveContent bool ScheduledStartTime time.Time UploadDate time.Time Thumbnails []string URL string Tags []string Duration string ChannelId string Genre string }
Video struct contains the details of a YouTube video.
Click to show internal directories.
Click to hide internal directories.