Documentation ¶
Overview ¶
This file defines the Bilibili client struct. This struct is a facade of all necessary Bilibili HTTP API wrappers.
Get live room basic status. This is used to check initially if it is streaming or not.
Index ¶
- Constants
- type Bilibili
- func (b *Bilibili) CopyLiveStream(ctx context.Context, roomId types.RoomId, stream types.StreamingUrlInfo, ...) (err error)
- func (b *Bilibili) DialWebSocket(ctx context.Context, url string) (*websocket.Conn, error)
- func (b *Bilibili) Do(req *http.Request) (resp *http.Response, err error)
- func (b *Bilibili) GetBUVID() (string, error)
- func (b *Bilibili) GetDanmakuServerInfo(roomId types.RoomId) (resp types.DanmakuServerInfoResponse, err error)
- func (b *Bilibili) GetLiveBUVID(roomId types.RoomId) (resp types.WebBannerResponse, err error)
- func (b *Bilibili) GetRoomPlayInfo(roomId types.RoomId) (resp types.RoomPlayInfoResponse, err error)
- func (b *Bilibili) GetRoomProfile(roomId types.RoomId) (resp types.RoomProfileResponse, err error)
- func (b *Bilibili) GetStreamingInfo(roomId types.RoomId) (resp types.RoomUrlInfoResponse, err error)
Constants ¶
View Source
const InitReadBytes = 4096 // 4KiB
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bilibili ¶
type Bilibili struct {
// contains filtered or unexported fields
}
func NewBilibili ¶
func NewBilibiliWithContext ¶
func NewBilibiliWithNetType ¶
func (*Bilibili) CopyLiveStream ¶
func (b *Bilibili) CopyLiveStream( ctx context.Context, roomId types.RoomId, stream types.StreamingUrlInfo, fileCreator func() (*os.File, error), bufSize int64, ) (err error)
CopyLiveStream read data from a livestream video stream, copy them to a writer.
func (*Bilibili) DialWebSocket ¶ added in v0.5.0
func (*Bilibili) GetBUVID ¶ added in v0.5.0
GetBUVID initializes cookie `buvid3`. If success, returns its value.
func (*Bilibili) GetDanmakuServerInfo ¶
func (*Bilibili) GetLiveBUVID ¶ added in v0.5.0
GetLiveBUVID initializes cookie `LIVE_BUVID`. This should be called before GetDanmakuServerInfo.
func (*Bilibili) GetRoomPlayInfo ¶
func (*Bilibili) GetRoomProfile ¶
func (*Bilibili) GetStreamingInfo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.