api

package
v0.0.0-...-1b9946f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotCached = errors.New("resource not cached")

Functions

func FlattenChannelDetails

func FlattenChannelDetails(input *ChannelDetails) map[string]interface{}

func FlattenPlaylistDetails

func FlattenPlaylistDetails(input *PlaylistDetails) map[string]interface{}

func FlattenVideoDetails

func FlattenVideoDetails(input *VideoDetails) map[string]interface{}

func GetChannelAvatar

func GetChannelAvatar(
	ctx context.Context,
	opts base.ServiceOptions,
	channelID string,
	w io.Writer,
) error

func GetChannelVideoIDs

func GetChannelVideoIDs(
	ctx context.Context,
	opts base.ServiceOptions,
	channelID string,
	videoID chan<- string,
) error

func GetPlaylistThumbnail

func GetPlaylistThumbnail(
	ctx context.Context,
	opts base.ServiceOptions,
	playlistID string,
	w io.Writer,
) error

func GetPlaylistVideoIDs

func GetPlaylistVideoIDs(
	ctx context.Context,
	opts base.ServiceOptions,
	playlistID string,
	videoID chan<- string,
) error

func GetVideo

func GetVideo(
	ctx context.Context,
	opts base.ServiceOptions,
	videoID string,
	w io.Writer,
) error

func GetVideoThumbnail

func GetVideoThumbnail(
	ctx context.Context,
	opts base.ServiceOptions,
	videoID string,
	w io.Writer,
) error

func RegisterSeer

func RegisterSeer(server *otohttp.Server, seer Seer)

Types

type BulkScheduleVideoDownloads

type BulkScheduleVideoDownloads struct {
	VideoIDs []string `json:"videoIDs"`
}

type CancelVideoDownload

type CancelVideoDownload struct {
	VideoID string `json:"videoID"`
}

type ChannelDetails

type ChannelDetails struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Avatar string `json:"avatar"`
	Subs   string `json:"subs"`
}

func ConvertChannelDetails

func ConvertChannelDetails(input map[string]interface{}) *ChannelDetails

type GetBulkChannelsDetailsRequest

type GetBulkChannelsDetailsRequest struct {
	ChannelIDs []string `json:"channelIDs"`
}

type GetBulkChannelsDetailsResponse

type GetBulkChannelsDetailsResponse struct {
	Channels []*ChannelDetails `json:"channels"`
	Error    string            `json:"error,omitempty"`
}

type GetBulkPlaylistsDetailsRequest

type GetBulkPlaylistsDetailsRequest struct {
	PlaylistIDs []string `json:"playlistIDs"`
}

type GetBulkPlaylistsDetailsResponse

type GetBulkPlaylistsDetailsResponse struct {
	Playlists []*PlaylistDetails `json:"playlists"`
	Error     string             `json:"error,omitempty"`
}

type GetBulkVideosDetailsRequest

type GetBulkVideosDetailsRequest struct {
	VideoIDs []string `json:"videoIDs"`
}

type GetBulkVideosDetailsResponse

type GetBulkVideosDetailsResponse struct {
	Videos []*VideoDetails `json:"videos"`
	Error  string          `json:"error,omitempty"`
}

type GetChannelDetailsRequest

type GetChannelDetailsRequest struct {
	Input string `json:"input"`
	Force bool   `json:"force"`
}

type GetChannelDetailsResponse

type GetChannelDetailsResponse struct {
	Details ChannelDetails `json:"details"`
	Error   string         `json:"error,omitempty"`
}

type GetChannelVideoIDsRequest

type GetChannelVideoIDsRequest struct {
	ID string `json:"id"`
}

type GetChannelVideoIDsResponse

type GetChannelVideoIDsResponse struct {
	VideoIDs []string `json:"videoIDs"`
	Error    string   `json:"error,omitempty"`
}

type GetPlaylistDetailsRequest

type GetPlaylistDetailsRequest struct {
	Input string `json:"input"`
	Force bool   `json:"force"`
}

type GetPlaylistDetailsResponse

type GetPlaylistDetailsResponse struct {
	Details PlaylistDetails `json:"details"`
	Error   string          `json:"error,omitempty"`
}

type GetPlaylistVideoIDsRequest

type GetPlaylistVideoIDsRequest struct {
	ID string `json:"id"`
}

type GetPlaylistVideoIDsResponse

type GetPlaylistVideoIDsResponse struct {
	VideoIDs []string `json:"videoIDs"`
	Error    string   `json:"error,omitempty"`
}

type GetVideoDetailsRequest

type GetVideoDetailsRequest struct {
	Input string `json:"input"`
	Force bool   `json:"force"`
}

type GetVideoDetailsResponse

type GetVideoDetailsResponse struct {
	Details VideoDetails `json:"details"`
	Error   string       `json:"error,omitempty"`
}

type ListCacheRequest

type ListCacheRequest struct {
	Marker string `json:"marker"`
}

type ListCacheResponse

type ListCacheResponse struct {
	VideoIDs    []string `json:"videoIDs"`
	IsTruncated bool     `json:"isTruncated"`
	NextMarker  string   `json:"nextMarker"`
	Error       string   `json:"error,omitempty"`
}

type PlaylistDetails

type PlaylistDetails struct {
	ID        string `json:"id"`
	Title     string `json:"title"`
	Channel   string `json:"channel"`
	ChannelID string `json:"channelID"`
	NumVideos int    `json:"numVideos"`
}

func ConvertPlaylistDetails

func ConvertPlaylistDetails(input map[string]interface{}) *PlaylistDetails

type PurgeVideo

type PurgeVideo struct {
	ID string `json:"id"`
}

type ScheduleVideoDownload

type ScheduleVideoDownload struct {
	VideoID string `json:"videoID"`
}

type SeerClientOptions

type SeerClientOptions struct {
	// contains filtered or unexported fields
}

func NewSeerClientOptions

func NewSeerClientOptions() *SeerClientOptions

func (*SeerClientOptions) SetBasicAuth

func (o *SeerClientOptions) SetBasicAuth(username, password string) *SeerClientOptions

func (*SeerClientOptions) SetTimeout

func (o *SeerClientOptions) SetTimeout(timeout time.Duration) *SeerClientOptions

func (*SeerClientOptions) SetTransport

func (o *SeerClientOptions) SetTransport(transport http.RoundTripper) *SeerClientOptions

type VideoDetails

type VideoDetails struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Thumbnail   string `json:"thumbnail"`
	UploadDate  string `json:"uploadDate"`
	Uploader    string `json:"uploader"`
	UploaderID  string `json:"uploaderID"`
	Channel     string `json:"channel"`
	ChannelID   string `json:"channelID"`
	Duration    int64  `json:"duration"`
	ViewCount   int64  `json:"viewCount"`
	Width       int    `json:"width"`
	Height      int    `json:"height"`
	FPS         int    `json:"fPS"`
}

func ConvertVideoDetails

func ConvertVideoDetails(input map[string]interface{}) *VideoDetails

type VideoDownloads

type VideoDownloads struct {
	VideoIDs []string `json:"videoIDs"`
	Error    string   `json:"error,omitempty"`
}

type Void

type Void struct {
	Error string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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