Documentation
¶
Index ¶
Constants ¶
const API_URL = "https://youtube.googleapis.com/youtube/v3/search"
const DefaultSearchTypes = TypeVideo | TypeChannel | TypePlaylist
DefaultSearchTypes uses all types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client uses YouTube search REST API See https://developers.google.com/youtube/v3/docs/search
func (Client) Search ¶
Search searches YouTube REST API with given query See https://developers.google.com/youtube/v3/docs/search/list
Parameter `types` sets the scope (videos, playlists, channels) for search, use 0 for default (all)
Parameter `custom` is a map which may contain custom parameters set by user. For example - `pageToken` which points to `nextPageToken` or `prevPageToken` - `publishedAfter` date - `relevanceLanguage` language code - `regionCode` such as US, UK, FI, ... See https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
type Snippet ¶
type Snippet struct {
ChannelID string `json:"channelId"`
ChannelTitle string `json:"channelTitle"`
PublishedAt time.Time `json:"publishedAt"`
PublishTime time.Time `json:"publishTime"`
Title string `json:"title"`
Description string `json:"description"`
Thumbnails shared.Thumbnails `json:"thumbnails"`
LiveBroadcastContent string `json:"liveBroadcastContent"` // "none"
}