bilibili

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBiliBili

func NewBiliBili() (model.Client, error)

NewBiliBili .

Types

type BiliBili

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

func (*BiliBili) Enter

func (c *BiliBili) Enter(room string) (int, [][]byte, error)

func (*BiliBili) GetPlayURL

func (c *BiliBili) GetPlayURL(room string, qn int) (*model.PlayURL, error)

GetPlayURL .

func (*BiliBili) GetRoomInfo

func (c *BiliBili) GetRoomInfo(room string) (*model.RoomInfo, error)

GetRoomInfo .

func (*BiliBili) Handle

func (c *BiliBili) Handle(tp int, data []byte) ([]model.Msg, bool, error)

func (*BiliBili) HeartBeat

func (c *BiliBili) HeartBeat() (int, []byte, error)

func (*BiliBili) Host

func (c *BiliBili) Host(room string) string

func (*BiliBili) Plat

func (c *BiliBili) Plat() string

Plat .

func (*BiliBili) SendDanmaku

func (c *BiliBili) SendDanmaku(room string, content string, tp int, color int64) error

func (*BiliBili) Stop

func (c *BiliBili) Stop()

Stop .

type BiliComm

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

func (*BiliComm) Enter

func (c *BiliComm) Enter(room string) (int, [][]byte, error)

func (*BiliComm) GetPlayURL

func (c *BiliComm) GetPlayURL(room string, qn int) (*model.PlayURL, error)

GetPlayURL .

func (*BiliComm) GetRoomInfo

func (c *BiliComm) GetRoomInfo(room string) (*model.RoomInfo, error)

GetRoomInfo .

func (*BiliComm) Handle

func (c *BiliComm) Handle(tp int, data []byte) ([]model.Msg, bool, error)

func (*BiliComm) HeartBeat

func (c *BiliComm) HeartBeat() (int, []byte, error)

func (*BiliComm) Host

func (c *BiliComm) Host(room string) string

func (*BiliComm) Plat

func (c *BiliComm) Plat() string

Plat .

func (*BiliComm) SendDanmaku

func (c *BiliComm) SendDanmaku(room string, content string, tp int, color int64) error

func (*BiliComm) Stop

func (c *BiliComm) Stop()

Stop .

type Danmaku

type Danmaku struct {
	SendMode     int    `json:"send_mode"`
	SendFontSize int    `json:"send_font_size"`
	DanmakuColor int64  `json:"danmaku_color"`
	Time         int64  `json:"time"`
	DMID         int64  `json:"dmid"`
	MsgType      int    `json:"msg_type"`
	Bubble       string `json:"bubble"`
	Content      string `json:"content"`
	MID          int64  `json:"mid"`
	Uname        string `json:"uname"`
	RoomAdmin    int    `json:"room_admin"`
	Vip          int    `json:"vip"`
	SVip         int    `json:"svip"`
	Rank         int    `json:"rank"`
	MobileVerify int    `json:"mobile_verify"`
	UnameColor   string `json:"uname_color"`
	MedalName    string `json:"medal_name"`
	UpName       string `json:"up_name"`
	MedalLevel   int    `json:"medal_level"`
	UserLevel    int    `json:"user_level"`
}

Jump to

Keyboard shortcuts

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