diff --git a/typings/lib/core/Music.d.ts b/typings/lib/core/Music.d.ts index e8a90a15..4045fe90 100644 --- a/typings/lib/core/Music.d.ts +++ b/typings/lib/core/Music.d.ts @@ -18,6 +18,11 @@ declare class Music { search(query: string, filters: { type?: string; }): Promise; + /** + * Retrieves YouTube Music home feed. + * @returns {Promise.} + */ + getHomeFeed(): Promise; /** * Retrieves song lyrics. * @param {string} video_id @@ -58,3 +63,4 @@ declare class Music { #private; } import Search = require("../parser/ytmusic/Search"); +import HomeFeed = require("../parser/ytmusic/HomeFeed"); diff --git a/typings/lib/parser/contents/classes/MusicCarouselShelfBasicHeader.d.ts b/typings/lib/parser/contents/classes/MusicCarouselShelfBasicHeader.d.ts index 3a3bdebd..cc82bbab 100644 --- a/typings/lib/parser/contents/classes/MusicCarouselShelfBasicHeader.d.ts +++ b/typings/lib/parser/contents/classes/MusicCarouselShelfBasicHeader.d.ts @@ -2,8 +2,7 @@ export = MusicCarouselShelfBasicHeader; declare class MusicCarouselShelfBasicHeader { constructor(data: any); type: string; - title: Text; - label: any; + strapline: any; + title: any; thumbnail: any; } -import Text = require("./Text"); diff --git a/typings/lib/parser/contents/classes/MusicTwoRowItem.d.ts b/typings/lib/parser/contents/classes/MusicTwoRowItem.d.ts index 219cb014..e4116e6f 100644 --- a/typings/lib/parser/contents/classes/MusicTwoRowItem.d.ts +++ b/typings/lib/parser/contents/classes/MusicTwoRowItem.d.ts @@ -9,12 +9,19 @@ declare class MusicTwoRowItem { badges: any; subscribers: any; item_count: number; + artist: { + name: any; + channel_id: any; + endpoint: any; + }; year: any; + views: any; author: { name: any; channel_id: any; endpoint: any; }; + artists: any; thumbnail: any; thumbnail_overlay: any; menu: any; diff --git a/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts b/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts index 2db0e5a2..9625971d 100644 --- a/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts +++ b/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts @@ -15,6 +15,7 @@ declare class NavigationEndpoint { params: any; index: any; supported_onesie_config: any; + music_video_type: any; }; search: { query: any; @@ -70,6 +71,7 @@ declare class NavigationEndpoint { on_response_received_actions: any; on_response_received_endpoints: any; on_response_received_commands: any; + continuation_contents: any; metadata: any; header: any; microformat: import("./PlayerMicroformat"); diff --git a/typings/lib/parser/contents/classes/SectionList.d.ts b/typings/lib/parser/contents/classes/SectionList.d.ts index 9d7dc710..6bd03fe6 100644 --- a/typings/lib/parser/contents/classes/SectionList.d.ts +++ b/typings/lib/parser/contents/classes/SectionList.d.ts @@ -4,5 +4,6 @@ declare class SectionList { type: string; target_id: any; contents: any; + continuation: any; header: any; } diff --git a/typings/lib/parser/contents/classes/SingleColumnBrowseResults.d.ts b/typings/lib/parser/contents/classes/SingleColumnBrowseResults.d.ts index 157f92e2..df45f038 100644 --- a/typings/lib/parser/contents/classes/SingleColumnBrowseResults.d.ts +++ b/typings/lib/parser/contents/classes/SingleColumnBrowseResults.d.ts @@ -2,6 +2,5 @@ export = SingleColumnBrowseResults; declare class SingleColumnBrowseResults { constructor(data: any); type: string; - get tabs(): any; - #private; + tabs: any; } diff --git a/typings/lib/parser/contents/index.d.ts b/typings/lib/parser/contents/index.d.ts index f8d83e5f..2009cb6c 100644 --- a/typings/lib/parser/contents/index.d.ts +++ b/typings/lib/parser/contents/index.d.ts @@ -6,6 +6,8 @@ declare class Parser { on_response_received_actions: any; on_response_received_endpoints: any; on_response_received_commands: any; + /** @type {*} */ + continuation_contents: any; metadata: any; header: any; /** @type {import('./classes/PlayerMicroformat')} **/ @@ -42,6 +44,7 @@ declare class Parser { /** @type {import('./classes/CardCollection')} */ cards: import('./classes/CardCollection'); }; + static parseCC(data: any): SectionListContinuation; static parseRR(actions: any): any; static parseFormats(formats: any): any; static parse(data: any): any; @@ -54,3 +57,10 @@ declare class Parser { static shouldIgnore(classname: any): boolean; } import VideoDetails = require("./classes/VideoDetails"); +/** @namespace */ +declare class SectionListContinuation { + constructor(data: any); + type: string; + contents: any; + continuation: any; +} diff --git a/typings/lib/parser/youtube/Analytics.d.ts b/typings/lib/parser/youtube/Analytics.d.ts index 4a248852..88ab1dd5 100644 --- a/typings/lib/parser/youtube/Analytics.d.ts +++ b/typings/lib/parser/youtube/Analytics.d.ts @@ -3,7 +3,6 @@ export = Analytics; declare class Analytics { /** * @param {object} response - API response. - * @constructor */ constructor(response: object); sections: any; @@ -12,6 +11,7 @@ declare class Analytics { on_response_received_actions: any; on_response_received_endpoints: any; on_response_received_commands: any; + continuation_contents: any; metadata: any; header: any; microformat: import("../contents/classes/PlayerMicroformat"); diff --git a/typings/lib/parser/youtube/Library.d.ts b/typings/lib/parser/youtube/Library.d.ts index 53ebf9b9..644ca20d 100644 --- a/typings/lib/parser/youtube/Library.d.ts +++ b/typings/lib/parser/youtube/Library.d.ts @@ -4,7 +4,6 @@ declare class Library { /** * @param {object} response - API response. * @param {import('../../core/Actions')} actions - * @constructor */ constructor(response: object, actions: import('../../core/Actions')); profile: { @@ -17,6 +16,7 @@ declare class Library { on_response_received_actions: any; on_response_received_endpoints: any; on_response_received_commands: any; + continuation_contents: any; metadata: any; header: any; microformat: import("../contents/classes/PlayerMicroformat"); diff --git a/typings/lib/parser/youtube/VideoInfo.d.ts b/typings/lib/parser/youtube/VideoInfo.d.ts index 9f2cb944..87805161 100644 --- a/typings/lib/parser/youtube/VideoInfo.d.ts +++ b/typings/lib/parser/youtube/VideoInfo.d.ts @@ -1,11 +1,10 @@ export = VideoInfo; -/** namespace **/ +/** namespace */ declare class VideoInfo { /** * @param {object} data - API response. * @param {import('../../core/Actions')} actions * @param {import('../../core/Player')} player - * @constructor */ constructor(data: object, actions: import('../../core/Actions'), player: import('../../core/Player')); /** @@ -88,9 +87,15 @@ declare class VideoInfo { on_response_received_actions: any; on_response_received_endpoints: any; on_response_received_commands: any; + continuation_contents: any; metadata: any; + /** + * @type {import('../contents/classes/VideoSecondaryInfo')} + */ header: any; - microformat: import("../contents/classes/PlayerMicroformat"); + microformat: import("../contents/classes/PlayerMicroformat"); /** + * @type {import('../contents/classes/MerchandiseShelf')} + */ sidebar: any; overlay: any; refinements: any; @@ -114,9 +119,6 @@ declare class VideoInfo { annotations: any; storyboards: any; endscreen: import("../contents/classes/Endscreen"); - /** - * @type {import('../contents/classes/PlayerAnnotationsExpanded')[]} - */ cards: import("../contents/classes/CardCollection"); }[]; #private; diff --git a/typings/lib/parser/ytmusic/HomeFeed.d.ts b/typings/lib/parser/ytmusic/HomeFeed.d.ts new file mode 100644 index 00000000..595ad8cf --- /dev/null +++ b/typings/lib/parser/ytmusic/HomeFeed.d.ts @@ -0,0 +1,22 @@ +export = HomeFeed; +/** @namespace */ +declare class HomeFeed { + /** + * @param {object} response - API response. + * @param {import('../../core/Actions')} actions + */ + constructor(response: object, actions: import('../../core/Actions')); + /** @type {{ sections: { header: import('../contents/classes/MusicCarouselShelfBasicHeader'), items: object[] }[] }} */ + sections: { + sections: { + header: import('../contents/classes/MusicCarouselShelfBasicHeader'); + items: object[]; + }[]; + }; + /** + * Retrieves home feed continuation. + * @returns {Promise.} + */ + getContinuation(): Promise; + #private; +}