youtubei.js / YTNodes / GridVideo
Class: GridVideo
Defined in: src/parser/classes/GridVideo.ts:9
Extends
Constructors
Constructor
new GridVideo(
data
):GridVideo
Defined in: src/parser/classes/GridVideo.ts:29
Parameters
data
Returns
GridVideo
Overrides
Properties
author
author:
Author
Defined in: src/parser/classes/GridVideo.ts:19
buttons?
optional
buttons:ObservedArray
<YTNode
>
Defined in: src/parser/classes/GridVideo.ts:24
duration
duration:
Text
|null
Defined in: src/parser/classes/GridVideo.ts:18
endpoint
endpoint:
NavigationEndpoint
Defined in: src/parser/classes/GridVideo.ts:22
is_reminder_set?
optional
is_reminder_set:boolean
Defined in: src/parser/classes/GridVideo.ts:27
menu
menu:
Menu
|null
Defined in: src/parser/classes/GridVideo.ts:23
published
published:
Text
Defined in: src/parser/classes/GridVideo.ts:17
rich_thumbnail
rich_thumbnail:
YTNode
Defined in: src/parser/classes/GridVideo.ts:16
short_view_count
short_view_count:
Text
Defined in: src/parser/classes/GridVideo.ts:21
thumbnail_overlays
thumbnail_overlays:
ObservedArray
<YTNode
>
Defined in: src/parser/classes/GridVideo.ts:15
thumbnails
thumbnails:
Thumbnail
[]
Defined in: src/parser/classes/GridVideo.ts:14
title
title:
Text
Defined in: src/parser/classes/GridVideo.ts:13
type
readonly
type:string
Defined in: src/parser/helpers.ts:8
Inherited from
upcoming?
optional
upcoming:Date
Defined in: src/parser/classes/GridVideo.ts:25
upcoming_text?
optional
upcoming_text:Text
Defined in: src/parser/classes/GridVideo.ts:26
video_id
video_id:
string
Defined in: src/parser/classes/GridVideo.ts:12
views
views:
Text
Defined in: src/parser/classes/GridVideo.ts:20
type
static
type:string
='GridVideo'
Defined in: src/parser/classes/GridVideo.ts:10
Overrides
Accessors
id
Get Signature
get id():
string
Defined in: src/parser/classes/GridVideo.ts:60
Deprecated
Use video_id
instead.
Returns
string
is_upcoming
Get Signature
get is_upcoming():
boolean
Defined in: src/parser/classes/GridVideo.ts:64
Returns
boolean
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Defined in: src/parser/helpers.ts:29
Cast to one of the given types.
Type Parameters
T
T
extends YTNode
K
K
extends YTNodeConstructor
<T
>[]
Parameters
types
...K
The types to cast to
Returns
InstanceType
<K
[number
]>
The node cast to one of the given types
Throws
If the node is not of the given type
Inherited from
hasKey()
hasKey<
T
,R
>(key
):this is GridVideo & { [k in string]: R }
Defined in: src/parser/helpers.ts:41
Check for a key without asserting the type.
Type Parameters
T
T
extends string
R
R
= any
Parameters
key
T
The key to check
Returns
this is GridVideo & { [k in string]: R }
Whether the node has the key
Inherited from
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Defined in: src/parser/helpers.ts:19
Check if the node is of the given type.
Type Parameters
T
T
extends YTNode
K
K
extends YTNodeConstructor
<T
>[]
Parameters
types
...K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
key()
key<
T
,R
>(key
):Maybe
Defined in: src/parser/helpers.ts:51
Assert that the node has the given key and return it.
Type Parameters
T
T
extends string
R
R
= any
Parameters
key
T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key