Documentation ¶
Overview ¶
This file defines the Bilibili client struct. This struct is a facade of all necessary Bilibili HTTP API wrappers.
This file defines the common struct of logger pointers used in modules of this package.
Get live room basic status. This is used to check initially if it is streaming or not.
Index ¶
- type BaseResponse
- type Bilibili
- func (b Bilibili) CopyLiveStream(ctx context.Context, roomId common.RoomId, stream StreamingUrlInfo, ...) (err error)
- func (b Bilibili) Do(req *http.Request) (resp *http.Response, err error)
- func (b Bilibili) GetDanmakuServerInfo(roomId common.RoomId) (resp DanmakuServerInfoResponse, err error)
- func (b Bilibili) GetRoomPlayInfo(roomId common.RoomId) (resp RoomPlayInfoResponse, err error)
- func (b Bilibili) GetRoomProfile(roomId common.RoomId) (resp RoomProfileResponse, err error)
- func (b Bilibili) GetStreamingInfo(roomId common.RoomId) (resp RoomUrlInfoResponse, err error)
- type DanmakuServerInfoResponse
- type IpNetType
- type LiveStatus
- type RoomPlayInfoResponse
- type RoomProfileResponse
- type RoomUrlInfoResponse
- type StreamingUrlInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
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 common.RoomId, stream StreamingUrlInfo, out *os.File, buffer []byte, readChunkSize int, ) (err error)
CopyLiveStream read data from a livestream video stream, copy them to a writer.
func (Bilibili) GetDanmakuServerInfo ¶
func (b Bilibili) GetDanmakuServerInfo(roomId common.RoomId) (resp DanmakuServerInfoResponse, err error)
func (Bilibili) GetRoomPlayInfo ¶
func (b Bilibili) GetRoomPlayInfo(roomId common.RoomId) (resp RoomPlayInfoResponse, err error)
func (Bilibili) GetRoomProfile ¶
func (b Bilibili) GetRoomProfile(roomId common.RoomId) (resp RoomProfileResponse, err error)
func (Bilibili) GetStreamingInfo ¶
func (b Bilibili) GetStreamingInfo(roomId common.RoomId) (resp RoomUrlInfoResponse, err error)
type DanmakuServerInfoResponse ¶
type DanmakuServerInfoResponse = BaseResponse[danmakuInfo]
type IpNetType ¶
type IpNetType string
func (IpNetType) GetDialNetString ¶ added in v0.3.0
GetDialNetString returns the string accepted by net.Dialer::DialContext
type LiveStatus ¶
type LiveStatus int
const ( Inactive LiveStatus = 0 Streaming LiveStatus = 1 Playback LiveStatus = 2 )
func (LiveStatus) IsStreaming ¶
func (s LiveStatus) IsStreaming() bool
func (LiveStatus) String ¶
func (s LiveStatus) String() string
type RoomPlayInfoResponse ¶
type RoomPlayInfoResponse = BaseResponse[roomPlayInfo]
type RoomProfileResponse ¶
type RoomProfileResponse = BaseResponse[roomProfile]
type RoomUrlInfoResponse ¶
type RoomUrlInfoResponse = BaseResponse[roomUrlInfo]
Click to show internal directories.
Click to hide internal directories.