sdk

package
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 13 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 {
	YoutubeAPIKey string
	ApiURL        string
	ApiToken      string
	HostName      string
}

func (*APIConfig) DeleteVideos

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

func (*APIConfig) FetchChannels

func (a *APIConfig) FetchChannels(status string, cp *SyncProperties) ([]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 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 Fee

type Fee struct {
	Amount   string `json:"amount"`
	Address  string `json:"address"`
	Currency string `json:"currency"`
}

type SyncFlags

type SyncFlags struct {
	StopOnError             bool
	TakeOverExistingChannel bool
	SkipSpaceCheck          bool
	SyncUpdate              bool
	SingleRun               bool
	RemoveDBUnpublished     bool
	UpgradeMetadata         bool
	DisableTransfers        bool
	QuickSync               bool
}

type SyncProperties

type SyncProperties struct {
	SyncFrom         int64
	SyncUntil        int64
	YoutubeChannelID string
}

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

type VideoStatus

type VideoStatus struct {
	ChannelID       string
	VideoID         string
	Status          string
	ClaimID         string
	ClaimName       string
	FailureReason   string
	Size            *int64
	MetaDataVersion uint
	IsTransferred   *bool
}

type YoutubeChannel

type YoutubeChannel struct {
	ChannelId          string `json:"channel_id"`
	TotalVideos        uint   `json:"total_videos"`
	TotalSubscribers   uint   `json:"total_subscribers"`
	DesiredChannelName string `json:"desired_channel_name"`
	Fee                *Fee   `json:"fee"`
	ChannelClaimID     string `json:"channel_claim_id"`
	TransferState      int    `json:"transfer_state"`
	PublishAddress     string `json:"publish_address"`
	PublicKey          string `json:"public_key"`
}

Jump to

Keyboard shortcuts

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