Documentation
¶
Index ¶
- Constants
- Variables
- func Valid(id string) bool
- type Auth
- type Client
- type Exchange
- type Filter
- func (f *Filter) CreativeCommons(v uint64)
- func (f *Filter) Duration(v uint64)
- func (f *Filter) FourK(v uint64)
- func (f *Filter) HD(v uint64)
- func (f *Filter) HDR(v uint64)
- func (f *Filter) Live(v uint64)
- func (f *Filter) Location(v uint64)
- func (f *Filter) Purchased(v uint64)
- func (f *Filter) Subtitles(v uint64)
- func (f *Filter) ThreeD(v uint64)
- func (f *Filter) ThreeSixty(v uint64)
- func (f *Filter) Type(v uint64)
- func (f *Filter) UploadDate(v uint64)
- func (f *Filter) VR180(v uint64)
- type Format
- type Item
- type OAuth
- type Params
- type Picture
- type PlayabilityStatus
- type Player
- type Search
Constants ¶
View Source
const ( // UPLOAD DATE UploadDateLastHour = 1 UploadDateToday = 2 UploadDateThisWeek = 3 UploadDateThisMonth = 4 UploadDateThisYear = 5 // TYPE TypeVideo = 1 TypeChannel = 2 TypePlaylist = 3 TypeMovie = 4 // DURATION DurationUnderFourMinutes = 1 DurationOverTwentyMinutes = 2 DurationFourToTwentyMinutes = 3 // SORT BY SortByRelevance = 0 SortByRating = 1 SortByUploadDate = 2 SortByViewCount = 3 )
Variables ¶
View Source
var ( Android = Client{Name: "ANDROID", Version: "16.43.34"} Embed = Client{Name: "ANDROID", Screen: "EMBED", Version: "16.43.34"} Mweb = Client{Name: "MWEB", Version: "2.20211109.01.00"} )
View Source
var Key = Auth{"X-Goog-Api-Key", "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"}
View Source
var Pictures = []Picture{
{120, 90, 68, "default", jpg},
{120, 90, 90, "1", jpg},
{120, 90, 90, "2", jpg},
{120, 90, 90, "3", jpg},
{120, 90, 68, "default", webP},
{120, 90, 90, "1", webP},
{120, 90, 90, "2", webP},
{120, 90, 90, "3", webP},
{320, 180, 180, "mqdefault", jpg},
{320, 180, 320, "mq1", jpg},
{320, 180, 320, "mq2", jpg},
{320, 180, 320, "mq3", jpg},
{320, 180, 180, "mqdefault", webP},
{320, 180, 320, "mq1", webP},
{320, 180, 320, "mq2", webP},
{320, 180, 320, "mq3", webP},
{480, 360, 270, "0", jpg},
{480, 360, 270, "hqdefault", jpg},
{480, 360, 360, "hq1", jpg},
{480, 360, 360, "hq2", jpg},
{480, 360, 360, "hq3", jpg},
{480, 360, 270, "0", webP},
{480, 360, 270, "hqdefault", webP},
{480, 360, 360, "hq1", webP},
{480, 360, 360, "hq2", webP},
{480, 360, 360, "hq3", webP},
{640, 480, 360, "sddefault", jpg},
{640, 480, 480, "sd1", jpg},
{640, 480, 480, "sd2", jpg},
{640, 480, 480, "sd3", jpg},
{640, 480, 360, "sddefault", webP},
{640, 480, 480, "sd1", webP},
{640, 480, 480, "sd2", webP},
{640, 480, 480, "sd3", webP},
{1280, 720, 720, "hq720", jpg},
{1280, 720, 720, "maxres1", jpg},
{1280, 720, 720, "maxres2", jpg},
{1280, 720, 720, "maxres3", jpg},
{1280, 720, 720, "maxresdefault", jpg},
{1280, 720, 720, "hq720", webP},
{1280, 720, 720, "maxres1", webP},
{1280, 720, 720, "maxres2", webP},
{1280, 720, 720, "maxres3", webP},
{1280, 720, 720, "maxresdefault", webP},
}
Functions ¶
Types ¶
type Filter ¶ added in v1.37.1
func (*Filter) CreativeCommons ¶ added in v1.37.1
func (*Filter) ThreeSixty ¶ added in v1.37.1
func (*Filter) UploadDate ¶ added in v1.37.1
type Format ¶
type Item ¶ added in v1.24.9
type Item struct { CompactVideoRenderer *struct { LengthText text Title text VideoID string } }
type PlayabilityStatus ¶ added in v1.40.3
type PlayabilityStatus struct { Status string // LOGIN_REQUIRED Reason string // Sign in to confirm your age }
func (PlayabilityStatus) Error ¶ added in v1.40.3
func (p PlayabilityStatus) Error() string
type Player ¶ added in v1.13.0
type Player struct { Microformat struct { PlayerMicroformatRenderer struct { AvailableCountries []string PublishDate string } } PlayabilityStatus PlayabilityStatus StreamingData struct { AdaptiveFormats []Format // just including this so I can bail if video is Dash Manifest DashManifestURL string } VideoDetails struct { Author string ShortDescription string Title string ViewCount float64 `json:"viewCount,string"` } }
func (Player) Description ¶ added in v1.13.0
Click to show internal directories.
Click to hide internal directories.