Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotHttpUrl = errors.New("not http url") PreviewNotFound = errors.New("preview not found") )
View Source
var ( BadRequest = errors.New("Bad Request") )
View Source
var DefaultDNS = "8.8.8.8:53"
Functions ¶
func YoutubeIdFromUrl ¶
Types ¶
type CheckedURL ¶
func NewCheckedURL ¶
func NewCheckedURL(s string) *CheckedURL
func (CheckedURL) HostAvailable ¶
func (u CheckedURL) HostAvailable() bool
func (CheckedURL) LooksCorrect ¶
func (u CheckedURL) LooksCorrect() bool
type Client ¶
func (Client) GetYoutubeData ¶
func (c Client) GetYoutubeData(id string) (YoutubeData, error)
type YoutubeData ¶
type YoutubeData struct {
Type string `json:"type"`
Version string `json:"version"`
Title string `json:"title"`
AuthorName string `json:"author_name"`
AuthorUrl string `json:"author_url"`
Html string `json:"html"`
Width int `json:"width"`
Height int `json:"height"`
ProviderName string `json:"provider_name"`
ProviderUrl string `json:"provider_url"`
ThumbnailUrl string `json:"thumbnail_url"`
ThumbnailHeight int `json:"thumbnail_height"`
ThumbnailWidth int `json:"thumbnail_width"`
}
Click to show internal directories.
Click to hide internal directories.