diff options
Diffstat (limited to 'bilibili/room_profile.go')
-rw-r--r-- | bilibili/room_profile.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bilibili/room_profile.go b/bilibili/room_profile.go index 9eed175..98cc790 100644 --- a/bilibili/room_profile.go +++ b/bilibili/room_profile.go @@ -2,12 +2,11 @@ package bilibili import ( "fmt" - "github.com/keuin/slbr/common" ) type roomProfile struct { UID int `json:"uid"` - RoomID int `json:"room_id"` + RoomID RoomId `json:"room_id"` ShortID int `json:"short_id"` Attention int `json:"attention"` Online int `json:"online"` @@ -80,7 +79,9 @@ type roomProfile struct { type RoomProfileResponse = BaseResponse[roomProfile] -func (b Bilibili) GetRoomProfile(roomId common.RoomId) (resp RoomProfileResponse, err error) { +func (b Bilibili) GetRoomProfile(roomId RoomId) (resp RoomProfileResponse, err error) { url := fmt.Sprintf("https://api.live.bilibili.com/room/v1/Room/get_info?room_id=%d", roomId) return callGet[RoomProfileResponse](b, url) } + +type RoomId uint64 |