Documentation ¶
Index ¶
- Variables
- func CommentRepliesContinuation(c *types.Comment, prev *types.CommentContinuation) *types.CommentContinuation
- func ExtractChannelID(chanURL string) (string, error)
- func ExtractNumber(s string) (uint64, error)
- func ExtractVideoID(vidURL string) (string, error)
- func InitialCommentContinuation(v *types.Video) *types.CommentContinuation
- func ParseChannelOverview(res *fasthttp.Response) (*types.ChannelOverview, error)
- func ParseChannelVideosPage(res *fasthttp.Response) (*types.ChannelVideosPage, error)
- func ParseChannelVideosStart(res *fasthttp.Response) (*types.ChannelVideosPage, error)
- func ParseCommentPage(res *fasthttp.Response, cont *types.CommentContinuation) (page types.CommentPage, err error)
- func ParseDuration(d string) (uint64, error)
- func ParsePlaylist(res *fasthttp.Response) (*types.Playlist, error)
- func ParsePlaylistPage(res *fasthttp.Response) (*types.PlaylistPage, error)
- func ParseVideo(res *fasthttp.Response) (*types.Video, error)
- func ParseVideoBody(buf []byte, res *fasthttp.Response) (*types.Video, error)
- type ChannelOverviewRequest
- type ChannelVideosPageRequest
- type ChannelVideosStartRequest
- type Client
- func (c *Client) GetVideoSubtitleList(videoID string) (tracks *XMLSubTrackList, err error)
- func (c *Client) RequestChannelOverview(channelID string) ChannelOverviewRequest
- func (c *Client) RequestChannelVideosPage(cont string) ChannelVideosPageRequest
- func (c *Client) RequestChannelVideosStart(channelID string) ChannelVideosStartRequest
- func (c *Client) RequestCommentPage(continuation *types.CommentContinuation) CommentPageRequest
- func (c *Client) RequestLivechatContinuation(continuation string) LivechatContinuationRequest
- func (c *Client) RequestLivechatStart(videoID string) LivechatStartRequest
- func (c *Client) RequestPlaylistPage(id string) PlaylistPageRequest
- func (c *Client) RequestPlaylistStart(id string) PlaylistStartRequest
- func (c *Client) RequestVideo(videoID string) VideoRequest
- type CommentPageRequest
- type LivechatContinuation
- type LivechatContinuationRequest
- type LivechatStartRequest
- type PlaylistPageRequest
- type PlaylistStartRequest
- type VideoRequest
- type XMLSubTrackList
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRateLimit = errors.New("reCAPTCHA triggered")
View Source
var MissingData = errors.New("missing data")
View Source
var ServerError = errors.New("server error")
Functions ¶
func CommentRepliesContinuation ¶
func CommentRepliesContinuation(c *types.Comment, prev *types.CommentContinuation) *types.CommentContinuation
func ExtractChannelID ¶
ExtractChannelID returns the channel ID from a channel URL.
func ExtractVideoID ¶
ExtractVideoID returns the video ID from a video URL.
func InitialCommentContinuation ¶
func InitialCommentContinuation(v *types.Video) *types.CommentContinuation
func ParseChannelOverview ¶
func ParseChannelOverview(res *fasthttp.Response) (*types.ChannelOverview, error)
func ParseChannelVideosPage ¶
func ParseChannelVideosPage(res *fasthttp.Response) (*types.ChannelVideosPage, error)
func ParseChannelVideosStart ¶
func ParseChannelVideosStart(res *fasthttp.Response) (*types.ChannelVideosPage, error)
func ParseCommentPage ¶
func ParseCommentPage(res *fasthttp.Response, cont *types.CommentContinuation) (page types.CommentPage, err error)
func ParsePlaylistPage ¶
func ParsePlaylistPage(res *fasthttp.Response) (*types.PlaylistPage, error)
func ParseVideo ¶
ParseVideo returns the video from a video response.
Types ¶
type ChannelOverviewRequest ¶
func (ChannelOverviewRequest) Do ¶
func (r ChannelOverviewRequest) Do() (*types.ChannelOverview, error)
type ChannelVideosPageRequest ¶
func (ChannelVideosPageRequest) Do ¶
func (r ChannelVideosPageRequest) Do() (*types.ChannelVideosPage, error)
func (ChannelVideosPageRequest) GetRequest ¶
func (r ChannelVideosPageRequest) GetRequest() *fasthttp.Request
type ChannelVideosStartRequest ¶
func (ChannelVideosStartRequest) Do ¶
func (r ChannelVideosStartRequest) Do() (*types.ChannelVideosPage, error)
func (ChannelVideosStartRequest) GetRequest ¶
func (r ChannelVideosStartRequest) GetRequest() *fasthttp.Request
type Client ¶
Client accesses the YouTube private API.
func (*Client) GetVideoSubtitleList ¶
func (c *Client) GetVideoSubtitleList(videoID string) (tracks *XMLSubTrackList, err error)
func (*Client) RequestChannelOverview ¶
func (c *Client) RequestChannelOverview(channelID string) ChannelOverviewRequest
func (*Client) RequestChannelVideosPage ¶
func (c *Client) RequestChannelVideosPage(cont string) ChannelVideosPageRequest
RequestChannelVideosPage requests a page of videos on a channel, given a continuation.
func (*Client) RequestChannelVideosStart ¶
func (c *Client) RequestChannelVideosStart(channelID string) ChannelVideosStartRequest
func (*Client) RequestCommentPage ¶
func (c *Client) RequestCommentPage(continuation *types.CommentContinuation) CommentPageRequest
RequestCommentPage requests a page of comments given a continuation.
func (*Client) RequestLivechatContinuation ¶
func (c *Client) RequestLivechatContinuation(continuation string) LivechatContinuationRequest
RequestLivechatContinuation fetches the continuation of a live chat.
func (*Client) RequestLivechatStart ¶
func (c *Client) RequestLivechatStart(videoID string) LivechatStartRequest
RequestLivechatStart fetches the beginning of a live chat.
func (*Client) RequestPlaylistPage ¶
func (c *Client) RequestPlaylistPage(id string) PlaylistPageRequest
RequestPlaylistPage fetches a page of a playlist.
func (*Client) RequestPlaylistStart ¶
func (c *Client) RequestPlaylistStart(id string) PlaylistStartRequest
RequestPlaylistStart fetches the first page of a playlist.
func (*Client) RequestVideo ¶
func (c *Client) RequestVideo(videoID string) VideoRequest
RequestVideo requests a video by ID.
type CommentPageRequest ¶
type CommentPageRequest struct { *Client *fasthttp.Request Continuation *types.CommentContinuation }
func (CommentPageRequest) Do ¶
func (r CommentPageRequest) Do() (page types.CommentPage, err error)
type LivechatContinuation ¶
func ParseLivechatPage ¶
func ParseLivechatPage(res *fasthttp.Response) (msgs []types.LivechatMessage, cont LivechatContinuation, err error)
func ParseLivechatStart ¶
func ParseLivechatStart(res *fasthttp.Response) (msgs []types.LivechatMessage, cont LivechatContinuation, err error)
type LivechatContinuationRequest ¶
func (LivechatContinuationRequest) Do ¶
func (r LivechatContinuationRequest) Do() ([]types.LivechatMessage, LivechatContinuation, error)
type LivechatStartRequest ¶
func (LivechatStartRequest) Do ¶
func (r LivechatStartRequest) Do() ([]types.LivechatMessage, LivechatContinuation, error)
type PlaylistPageRequest ¶
func (PlaylistPageRequest) Do ¶
func (r PlaylistPageRequest) Do() (*types.PlaylistPage, error)
type PlaylistStartRequest ¶
type VideoRequest ¶
VideoRequest requests a video.
type XMLSubTrackList ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.