youtubei.js / YTNodes / GridPlaylist
Class: GridPlaylist
Extends
Constructors
new GridPlaylist()
new GridPlaylist(
data
):GridPlaylist
Parameters
• data: RawNode
Returns
Overrides
Defined in
src/parser/classes/GridPlaylist.ts:23
Properties
author?
optional
author:Author
Defined in
src/parser/classes/GridPlaylist.ts:13
badges
badges:
ObservedArray
<YTNode
>
Defined in
src/parser/classes/GridPlaylist.ts:14
endpoint
endpoint:
NavigationEndpoint
Defined in
src/parser/classes/GridPlaylist.ts:15
id
id:
string
Defined in
src/parser/classes/GridPlaylist.ts:11
sidebar_thumbnails
sidebar_thumbnails:
null
|Thumbnail
[]
Defined in
src/parser/classes/GridPlaylist.ts:19
thumbnail_renderer
thumbnail_renderer:
YTNode
Defined in
src/parser/classes/GridPlaylist.ts:18
thumbnails
thumbnails:
Thumbnail
[]
Defined in
src/parser/classes/GridPlaylist.ts:17
title
title:
Text
Defined in
src/parser/classes/GridPlaylist.ts:12
type
readonly
type:string
Inherited from
Defined in
video_count
video_count:
Text
Defined in
src/parser/classes/GridPlaylist.ts:20
video_count_short
video_count_short:
Text
Defined in
src/parser/classes/GridPlaylist.ts:21
view_playlist
view_playlist:
Text
Defined in
src/parser/classes/GridPlaylist.ts:16
type
static
type:string
='GridPlaylist'
Overrides
Defined in
src/parser/classes/GridPlaylist.ts:9
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Cast to one of the given types.
Type Parameters
• T extends YTNode
• 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
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is GridPlaylist & { [k in string]: R }
Check for a key without asserting the type.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
this is GridPlaylist & { [k in string]: R }
Whether the node has the key
Inherited from
Defined in
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Check if the node is of the given type.
Type Parameters
• T extends YTNode
• 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
Defined in
key()
key<
T
,R
>(key
):Maybe
Assert that the node has the given key and return it.
Type Parameters
• T extends string
• 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