49 lines
1.7 KiB
Go
49 lines
1.7 KiB
Go
|
package main
|
||
|
|
||
|
import(
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type youtubeSearchResult struct {
|
||
|
Kind string `json:"kind"`
|
||
|
Etag string `json:"etag"`
|
||
|
NextPageToken string `json:"nextPageToken"`
|
||
|
RegionCode string `json:"regionCode"`
|
||
|
PageInfo struct {
|
||
|
TotalResults int `json:"totalResults"`
|
||
|
ResultsPerPage int `json:"resultsPerPage"`
|
||
|
} `json:"pageInfo"`
|
||
|
Items []struct {
|
||
|
Kind string `json:"kind"`
|
||
|
Etag string `json:"etag"`
|
||
|
ID struct {
|
||
|
Kind string `json:"kind"`
|
||
|
VideoID string `json:"videoId"`
|
||
|
} `json:"id"`
|
||
|
Snippet struct {
|
||
|
PublishedAt time.Time `json:"publishedAt"`
|
||
|
ChannelID string `json:"channelId"`
|
||
|
Title string `json:"title"`
|
||
|
Description string `json:"description"`
|
||
|
Thumbnails struct {
|
||
|
Default struct {
|
||
|
URL string `json:"url"`
|
||
|
Width int `json:"width"`
|
||
|
Height int `json:"height"`
|
||
|
} `json:"default"`
|
||
|
Medium struct {
|
||
|
URL string `json:"url"`
|
||
|
Width int `json:"width"`
|
||
|
Height int `json:"height"`
|
||
|
} `json:"medium"`
|
||
|
High struct {
|
||
|
URL string `json:"url"`
|
||
|
Width int `json:"width"`
|
||
|
Height int `json:"height"`
|
||
|
} `json:"high"`
|
||
|
} `json:"thumbnails"`
|
||
|
ChannelTitle string `json:"channelTitle"`
|
||
|
LiveBroadcastContent string `json:"liveBroadcastContent"`
|
||
|
} `json:"snippet"`
|
||
|
} `json:"items"`
|
||
|
}
|