diff options
Diffstat (limited to 'common/testing/testutil.go')
-rw-r--r-- | common/testing/testutil.go | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/common/testing/testutil.go b/common/testing/testutil.go index 509c619..f99bec8 100644 --- a/common/testing/testutil.go +++ b/common/testing/testutil.go @@ -3,7 +3,7 @@ package testing import ( "encoding/json" "fmt" - "github.com/keuin/slbr/bilibili" + "github.com/keuin/slbr/types" "io" "net/http" ) @@ -12,23 +12,7 @@ import ( Some utility function for test-purpose only. */ -type LiveList struct { - Code int `json:"code"` - Message string `json:"message"` - TTL int `json:"ttl"` - Data struct { - Count int `json:"count"` - Data []struct { - Face string `json:"face"` - Link string `json:"link"` - Roomid bilibili.RoomId `json:"roomid"` - Roomname string `json:"roomname"` - Nickname string `json:"nickname"` - } `json:"data"` - } `json:"data"` -} - -func GetLiveListForGuestUser() (liveList LiveList, err error) { +func GetLiveListForGuestUser() (liveList types.LiveList, err error) { url := "https://api.live.bilibili.com/xlive/web-interface/v1/index/WebGetUnLoginRecList" resp, err := http.Get(url) if err != nil { |