Documentation ¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( KsLiveDetailQuery = ` query LiveDetail($principalId: String) { liveDetail(principalId: $principalId) { liveStream } } ` KsUserInfoQuery = ` query userInfoQuery($principalId: String) { userInfo(principalId: $principalId) { name living } } ` )
View Source
const ( EmptyRoomName = "" EmptyStreamerName = "" )
Variables ¶
View Source
var ( ErrNotSupported = errors.New("streamer not supported") ErrSiteInvalid = errors.New("site invalid") )
View Source
var (
ErrCookieNotSet = errors.New("cookie not configured")
)
Functions ¶
This section is empty.
Types ¶
type Option ¶
func SetCookie ¶ added in v0.1.0
Example ¶
package main import ( "fmt" "github.com/go-olive/tv" ) func main() { douyinCookie := "__ac_nonce=06245c89100e7ab2dd536; __ac_signature=_02B4Z6wo00f01LjBMSAAAIDBwA.aJ.c4z1C44TWAAEx696;" t, err := tv.New("douyin", "600571451250", tv.SetCookie(douyinCookie)) if err != nil { println(err.Error()) return } t.Snap() fmt.Println(t) }
Output:
type Tv ¶
Example ¶
package main import ( "fmt" "github.com/go-olive/tv" ) func main() { t, err := tv.New("huya", "518512") if err != nil { println(err.Error()) return } t.Snap() fmt.Println(t) }
Output:
func NewWithUrl ¶ added in v0.1.0
Example ¶
package main import ( "fmt" "github.com/go-olive/tv" ) func main() { t, err := tv.NewWithUrl("https://www.huya.com/518512") if err != nil { println(err.Error()) return } t.Snap() fmt.Println(t) }
Output:
func (*Tv) Snap ¶ added in v0.1.0
Snap takes the latest snapshot of the streamer info that could be retrieved individually.
func (*Tv) StreamerName ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.