Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Mar 27, 2024
1 parent 0ecc3ce commit 82a6e92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions live.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,17 @@ type SubLiveArea struct {
AreaType int `json:"area_type"`
}

type LiveArea struct {
type LiveAreaList struct {
Id int `json:"id"` // 父分区id
Name string `json:"name"` // 父分区名
List []SubLiveArea `json:"list"` // 子分区列表
}

// GetLiveAreaList 获取全部直播间分区列表
func (c *Client) GetLiveAreaList() ([]LiveArea, error) {
func (c *Client) GetLiveAreaList() ([]LiveAreaList, error) {
const (
method = resty.MethodGet
url = "https://api.live.bilibili.com/room/v1/Area/getList"
)
return execute[[]LiveArea](c, method, url, nil)
return execute[[]LiveAreaList](c, method, url, nil)
}

0 comments on commit 82a6e92

Please sign in to comment.