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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHound

func RegisterHound(server *otohttp.Server, hound Hound)

Types

type ChannelDetails

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

type ChannelVideo

type ChannelVideo struct {
	ChannelID string       `json:"channelID"`
	NumVideos int          `json:"numVideos"`
	Video     VideoDetails `json:"video"`
}

type Hound

type Hound interface {
	ReportChannelDetails(context.Context, ChannelDetails) (*Void, error)
	ReportChannelVideo(context.Context, ChannelVideo) (*Void, error)
	ReportPlaylistDetails(context.Context, PlaylistDetails) (*Void, error)
	ReportPlaylistVideo(context.Context, PlaylistVideo) (*Void, error)
	ReportVideoDetails(context.Context, VideoDetails) (*Void, error)
	ReportVideoDownloadProgress(context.Context, VideoDownloadProgress) (*Void, error)
}

func NewHoundClient

func NewHoundClient(
	endpoint string,
	options ...*HoundClientOptions,
) Hound

func NewHoundClientFromOptions

func NewHoundClientFromOptions(opts base.ServiceOptions) Hound

type HoundClientOptions

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

func NewHoundClientOptions

func NewHoundClientOptions() *HoundClientOptions

func (*HoundClientOptions) SetBasicAuth

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

func (*HoundClientOptions) SetTimeout

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

func (*HoundClientOptions) SetTransport

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

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"`
}

type PlaylistVideo

type PlaylistVideo struct {
	PlaylistID string       `json:"playlistID"`
	NumVideos  int          `json:"numVideos"`
	Video      VideoDetails `json:"video"`
}

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"`
}

type VideoDownloadProgress

type VideoDownloadProgress struct {
	ID      string  `json:"id"`
	Total   int64   `json:"total"`
	Rate    float64 `json:"rate"`
	Elapsed int64   `json:"elapsed"`
}

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