diff options
author | Keuin <[email protected]> | 2023-07-02 14:48:47 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-02 14:49:17 +0800 |
commit | b6eb2c0da4e653c6fdd278bcbdcd55ec376cd481 (patch) | |
tree | bc0d58aedf6e8613d21351cd3cdfd8cd5b5999e2 /bilibili/room_profile.go | |
parent | b8d0d0c3b6b2ffe40921aa4c247c101dd0ce958d (diff) |
Refactor: move RoomId type to the correct package. Type all room ID usages.
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 |