diff options
author | Keuin <[email protected]> | 2023-07-11 22:56:07 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-11 22:56:07 +0800 |
commit | f5c63cde56eb35c0125a0545f084441cdd4340ab (patch) | |
tree | cf24779daaa3067902bef91d21bcdee7a78fd059 /bilibili/danmaku_server_info.go | |
parent | 7fd817f6d1ead3de85294c1893a6e1572a1d12e3 (diff) |
Refactor: move data structures to a separate package to avoid circular dependency.
Diffstat (limited to 'bilibili/danmaku_server_info.go')
-rw-r--r-- | bilibili/danmaku_server_info.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bilibili/danmaku_server_info.go b/bilibili/danmaku_server_info.go index b68d4b5..5df8ed7 100644 --- a/bilibili/danmaku_server_info.go +++ b/bilibili/danmaku_server_info.go @@ -2,9 +2,10 @@ package bilibili import ( "fmt" + "github.com/keuin/slbr/types" ) -type DanmakuServerInfoResponse = BaseResponse[danmakuInfo] +type DanmakuServerInfoResponse = types.BaseResponse[danmakuInfo] type danmakuInfo struct { Group string `json:"group"` @@ -21,7 +22,7 @@ type danmakuInfo struct { } `json:"host_list"` } -func (b Bilibili) GetDanmakuServerInfo(roomId RoomId) (resp DanmakuServerInfoResponse, err error) { +func (b Bilibili) GetDanmakuServerInfo(roomId types.RoomId) (resp DanmakuServerInfoResponse, err error) { url := fmt.Sprintf("https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo?id=%d&type=0", roomId) return callGet[DanmakuServerInfoResponse](b, url) } |