sdk

package
v5.9.10 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VideoStatusPublished     = "published"
	VideoStatusUpgradeFailed = "upgradefailed"
	VideoStatusFailed        = "failed"
)
View Source
const (
	MaxReasonLength = 490
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	ApiURL   string
	ApiToken string
	HostName string
}

func GetAPIsConfigs added in v5.8.6

func GetAPIsConfigs() *APIConfig

func (*APIConfig) DeleteVideos

func (a *APIConfig) DeleteVideos(videos []string) error

func (*APIConfig) FetchChannels

func (a *APIConfig) FetchChannels(status string, cliFlags *shared.SyncFlags) ([]shared.YoutubeChannel, error)

func (*APIConfig) GetReleasedDate added in v5.6.0

func (a *APIConfig) GetReleasedDate(videoID string) (*VideoRelease, error)

func (*APIConfig) MarkVideoStatus

func (a *APIConfig) MarkVideoStatus(status shared.VideoStatus) error

func (*APIConfig) SetChannelCert

func (a *APIConfig) SetChannelCert(certHex string, channelID string) error

func (*APIConfig) SetChannelClaimID

func (a *APIConfig) SetChannelClaimID(channelID string, channelClaimID string) error

func (*APIConfig) SetChannelStatus

func (a *APIConfig) SetChannelStatus(channelID string, status string, failureReason string, transferState *int) (map[string]SyncedVideo, map[string]bool, error)

func (*APIConfig) VideoState added in v5.6.0

func (a *APIConfig) VideoState(videoID string) (string, error)

type SyncedVideo

type SyncedVideo struct {
	VideoID         string `json:"video_id"`
	Published       bool   `json:"published"`
	FailureReason   string `json:"failure_reason"`
	ClaimName       string `json:"claim_name"`
	ClaimID         string `json:"claim_id"`
	Size            int64  `json:"size"`
	MetadataVersion int8   `json:"metadata_version"`
	Transferred     bool   `json:"transferred"`
	IsLbryFirst     bool   `json:"is_lbry_first"`
}

type VideoRelease added in v5.6.0

type VideoRelease struct {
	ID            uint64 `json:"id"`
	YoutubeDataID uint64 `json:"youtube_data_id"`
	VideoID       string `json:"video_id"`
	ReleaseTime   string `json:"release_time"`
	CreatedAt     string `json:"created_at"`
	UpdatedAt     string `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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