update
This commit is contained in:
parent
31e4eee841
commit
abcfa63eb6
@ -50,8 +50,8 @@ func getHeaders(token ...interface{}) map[string]string {
|
|||||||
|
|
||||||
// ChannelItem -
|
// ChannelItem -
|
||||||
type ChannelItem struct {
|
type ChannelItem struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Sinppet *ChannelSinppet `json:"sinppet"`
|
Sinppet ChannelSinppet `json:"sinppet"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChannelSinppet -
|
// ChannelSinppet -
|
||||||
@ -98,13 +98,13 @@ func QueryYoutubeName(id string) (n string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bodyBytes, err := ioutil.ReadAll(resp.Body)
|
bodyBytes, err := ioutil.ReadAll(resp.Body)
|
||||||
fmt.Println("body ::: ", bodyBytes)
|
fmt.Println("body ::: ", string(bodyBytes))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
apiRes := struct {
|
apiRes := struct {
|
||||||
Items []*ChannelItem `json:"items"`
|
Items []ChannelItem `json:"items"`
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
err = json.Unmarshal(bodyBytes, &apiRes)
|
err = json.Unmarshal(bodyBytes, &apiRes)
|
||||||
|
Loading…
Reference in New Issue
Block a user