Skip to content

Commit

Permalink
fix wrong variable type
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMengXinX committed Jul 17, 2022
1 parent 2b25f2e commit 1f2cad7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
57 changes: 34 additions & 23 deletions types/artistHomepage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package types
// ArtistHomepageData 获取歌手详细API返回数据
type ArtistHomepageData struct {
RawJson string `json:"-"`
Code int `json:"code"`
Code int `json:"code"`
Data struct {
Cursor string `json:"cursor"`
Blocks []struct {
Expand All @@ -16,7 +16,7 @@ type ArtistHomepageData struct {
Position string `json:"position"`
Md5 interface{} `json:"md5"`
Channel string `json:"channel"`
UiElement *struct {
UiElement struct {
MainTitle struct {
Title string `json:"title"`
TitleImgId interface{} `json:"titleImgId"`
Expand Down Expand Up @@ -45,9 +45,9 @@ type ArtistHomepageData struct {
Id interface{} `json:"id"`
BlockId interface{} `json:"blockId"`
CreativeId interface{} `json:"creativeId"`
CreativeType *string `json:"creativeType"`
CreativeType string `json:"creativeType"`
Position string `json:"position"`
Action *struct {
Action struct {
ClickAction struct {
Action int `json:"action"`
TargetUrl string `json:"targetUrl"`
Expand All @@ -57,10 +57,10 @@ type ArtistHomepageData struct {
AdInfo interface{} `json:"adInfo"`
Code interface{} `json:"code"`
Resources []struct {
ResourceType *string `json:"resourceType"`
ResourceId *string `json:"resourceId"`
ResourceType string `json:"resourceType"`
ResourceId string `json:"resourceId"`
ResourceUrl interface{} `json:"resourceUrl"`
ResourceExtInfo *struct {
ResourceExtInfo struct {
CommentCount int `json:"commentCount,omitempty"`
PlayCount int `json:"playCount"`
Users []struct {
Expand Down Expand Up @@ -203,7 +203,7 @@ type ArtistHomepageData struct {
Single int `json:"single"`
NoCopyrightRcmd interface{} `json:"noCopyrightRcmd"`
HMusic struct {
Name *string `json:"name"`
Name string `json:"name"`
Id int64 `json:"id"`
Size int `json:"size"`
Extension string `json:"extension"`
Expand All @@ -214,7 +214,7 @@ type ArtistHomepageData struct {
VolumeDelta float64 `json:"volumeDelta"`
} `json:"hMusic"`
MMusic struct {
Name *string `json:"name"`
Name string `json:"name"`
Id int64 `json:"id"`
Size int `json:"size"`
Extension string `json:"extension"`
Expand All @@ -225,7 +225,7 @@ type ArtistHomepageData struct {
VolumeDelta float64 `json:"volumeDelta"`
} `json:"mMusic"`
LMusic struct {
Name *string `json:"name"`
Name string `json:"name"`
Id int64 `json:"id"`
Size int `json:"size"`
Extension string `json:"extension"`
Expand All @@ -236,7 +236,7 @@ type ArtistHomepageData struct {
VolumeDelta float64 `json:"volumeDelta"`
} `json:"lMusic"`
BMusic struct {
Name *string `json:"name"`
Name string `json:"name"`
Id int64 `json:"id"`
Size int `json:"size"`
Extension string `json:"extension"`
Expand Down Expand Up @@ -372,7 +372,7 @@ type ArtistHomepageData struct {
RadioFeeType int `json:"radioFeeType,omitempty"`
RadioFeeScope int `json:"radioFeeScope,omitempty"`
} `json:"resourceExtInfo"`
ResourceExt *struct {
ResourceExt struct {
LikeCount int `json:"likeCount,omitempty"`
Liked bool `json:"liked,omitempty"`
Song struct {
Expand Down Expand Up @@ -756,15 +756,15 @@ type ArtistHomepageData struct {
ParentCommentId int `json:"parentCommentId"`
} `json:"comments,omitempty"`
} `json:"resourceExt"`
ResourcePolicyId *string `json:"resourcePolicyId"`
Action *struct {
ResourcePolicyId string `json:"resourcePolicyId"`
Action struct {
ClickAction struct {
Action int `json:"action"`
TargetUrl string `json:"targetUrl"`
} `json:"clickAction"`
} `json:"action"`
UiElement struct {
MainTitle *struct {
MainTitle struct {
Title string `json:"title"`
TitleImgId interface{} `json:"titleImgId"`
TitleImgUrl interface{} `json:"titleImgUrl"`
Expand All @@ -787,15 +787,26 @@ type ArtistHomepageData struct {
Height int `json:"height"`
Action interface{} `json:"action"`
} `json:"images"`
Labels interface{} `json:"labels"`
TextLinks interface{} `json:"textLinks"`
Descriptions interface{} `json:"descriptions"`
Icons interface{} `json:"icons"`
Buttons []struct {
Labels interface{} `json:"labels"`
TextLinks []struct {
Tag interface{} `json:"tag"`
Text string `json:"text"`
Url interface{} `json:"url"`
} `json:"textLinks"`
Descriptions []struct {
Tag interface{} `json:"tag"`
Description string `json:"description"`
} `json:"descriptions"`
Icons []struct {
Tag interface{} `json:"tag"`
ImgId int `json:"imgId"`
ImgUrl string `json:"imgUrl"`
} `json:"icons"`
Buttons []struct {
Tag interface{} `json:"tag"`
Text string `json:"text"`
ImageUrl interface{} `json:"imageUrl"`
Action *struct {
Action struct {
ClickAction struct {
Action int `json:"action"`
TargetUrl string `json:"targetUrl"`
Expand All @@ -810,11 +821,11 @@ type ArtistHomepageData struct {
Valid bool `json:"valid"`
Alg interface{} `json:"alg"`
Scm interface{} `json:"scm"`
VisibleStatus *string `json:"visibleStatus"`
VisibleStatus string `json:"visibleStatus"`
} `json:"resources"`
} `json:"creatives"`
CanRefresh bool `json:"canRefresh"`
VisibleStatus *string `json:"visibleStatus"`
VisibleStatus string `json:"visibleStatus"`
BlockConfig interface{} `json:"blockConfig"`
BlockCursor interface{} `json:"blockCursor"`
HasMore bool `json:"hasMore"`
Expand Down
2 changes: 1 addition & 1 deletion types/programDetail.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package types

type ProgramDetailData struct {
RawJson string
RawJson string `json:"-"`
Program struct {
MainSong ProgramSong `json:"mainSong"`
Songs []ProgramSong `json:"songs"`
Expand Down

0 comments on commit 1f2cad7

Please sign in to comment.