From 2ace07d2d88c01a56b4d0f3194bd74a518a769c8 Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 14 Jul 2023 22:25:27 +0800 Subject: Refactor: use pointer type of `Bilibili` to prevent unexpected copy. --- bilibili/danmaku_server_info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bilibili/danmaku_server_info.go') diff --git a/bilibili/danmaku_server_info.go b/bilibili/danmaku_server_info.go index e3cfbc0..4d26873 100644 --- a/bilibili/danmaku_server_info.go +++ b/bilibili/danmaku_server_info.go @@ -5,7 +5,7 @@ import ( "github.com/keuin/slbr/types" ) -func (b Bilibili) GetDanmakuServerInfo(roomId types.RoomId) (resp types.DanmakuServerInfoResponse, err error) { +func (b *Bilibili) GetDanmakuServerInfo(roomId types.RoomId) (resp types.DanmakuServerInfoResponse, err error) { url := fmt.Sprintf("https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo?id=%d&type=0", roomId) return callGet[types.DanmakuServerInfoResponse](b, url) } -- cgit v1.2.3