Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidChannelID ¶
Checks (roughly) if the given string is a valid YouTube channel ID.
func IsValidVideoID ¶
Checks (roughly) if the given string is a valid YouTube video ID.
Types ¶
type ChannelFeed ¶
type ChannelFeed struct { XMLName xml.Name `xml:"feed"` Links []Link `xml:"link,omitempty"` Title string `xml:"title"` Author *Author `xml:"author,omitempty"` Published string `xml:"published"` Entries []ChannelFeedEntry `xml:"entry,omitempty"` }
func ParseChannelFeed ¶
func ParseChannelFeed(b []byte) (*ChannelFeed, error)
func (*ChannelFeed) Videos ¶
func (f *ChannelFeed) Videos() (videos []ChannelFeedVideo)
type ChannelFeedEntry ¶
type ChannelFeedEntry struct { ID string `xml:"id"` VideoID string `xml:"videoId"` ChannelID string `xml:"channelId"` Title string `xml:"title"` Links []Link `xml:"link,omitempty"` Author *Author `xml:"author,omitempty"` Published string `xml:"published"` Updated string `xml:"updated"` MediaGroups []MediaGroup `xml:"group,omitempty"` }
type ChannelFeedVideo ¶
type ChannelFeedVideo struct { ID string `json:"id"` ChannelID string `json:"channel_id"` Title string `json:"title"` Description string `json:"description"` URL string `json:"url"` ThumbnailURL string `json:"thumbnail_url"` Published int64 `json:"published"` // (unix timestamp; in milliseconds) Updated int64 `json:"updated"` // (unix timestamp; in milliseconds) }
func (ChannelFeedVideo) String ¶
func (vid ChannelFeedVideo) String() string
type ChannelIndex ¶
type ChannelIndex struct {
ChannelID string
}
func ParseChannelIndex ¶
func ParseChannelIndex(b []byte) (*ChannelIndex, error)
func (ChannelIndex) String ¶
func (res ChannelIndex) String() string
type MediaCommunity ¶
type MediaCommunity struct { StarRating *MediaStarRating `xml:"starRating,omitempty"` Statistics *MediaStatistics `xml:"statistics,omitempty"` }
type MediaContent ¶
type MediaGroup ¶
type MediaGroup struct { XMLName xml.Name `xml:"group"` Title string `xml:"title"` Content *MediaContent `xml:"content,omitempty"` Thumbnail *MediaThumbnail `xml:"thumbnail,omitempty"` Description string `xml:"description"` Community *MediaCommunity `xml:"community,omitempty"` }
type MediaStarRating ¶
type MediaStatistics ¶
type MediaStatistics struct {
Views int `xml:"views,attr"`
}
type MediaThumbnail ¶
Click to show internal directories.
Click to hide internal directories.