api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAPI

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

BaseAPI live info

func (*BaseAPI) GetAuthor

func (b *BaseAPI) GetAuthor() string

GetAuthor return live author

func (*BaseAPI) GetLiveStatus

func (b *BaseAPI) GetLiveStatus() bool

GetLiveStatus get live status

func (*BaseAPI) GetLiveURL

func (b *BaseAPI) GetLiveURL() string

GetLiveURL get live url

func (*BaseAPI) GetPlatformName

func (b *BaseAPI) GetPlatformName() string

GetPlatformName return a name for live platform

func (*BaseAPI) GetTitle

func (b *BaseAPI) GetTitle() string

GetTitle return live title

type BilibiliLive

type BilibiliLive struct {
	BaseAPI
	// contains filtered or unexported fields
}

BilibiliLive bilibili live api

func NewBilibiliLive

func NewBilibiliLive(base *BaseAPI) *BilibiliLive

NewBilibiliLive return a bilibililive struct

func (*BilibiliLive) RefreshLiveInfo

func (b *BilibiliLive) RefreshLiveInfo() error

RefreshLiveInfo refresh live info

type LiveAPI

type LiveAPI interface {
	RefreshLiveInfo() error
	GetLiveURL() string
	GetLiveStatus() bool
	GetPlatformName() string
	GetTitle() string
	GetAuthor() string
}

LiveAPI interface

func Check

func Check(url *url.URL) LiveAPI

Check select api

type YouTubeLive

type YouTubeLive struct {
	BaseAPI
	// contains filtered or unexported fields
}

YouTubeLive youtube live api

func NewYouTubeLive

func NewYouTubeLive(base *BaseAPI) *YouTubeLive

NewYouTubeLive return a youtubeLive struct

func (*YouTubeLive) RefreshLiveInfo

func (y *YouTubeLive) RefreshLiveInfo() error

RefreshLiveInfo refresh live info

Jump to

Keyboard shortcuts

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