Files
YouTube.js/typings/lib/parser/youtube/VideoInfo.d.ts
Daniel Wykerd 4a102878d8 refactor!: feature complete contents parser
* feat: allow setting search params to custom value

This is useful for getting results other than videos, like playlists and
channels.

* feat: add initial parsers for common renderers

* feat: artist search renderers

Added common renderers used when searching artists

* refactor: snake_case

* feat: channel home page renderers

* feat: parsers for more channel tabs

These are needed for channel tabs: Videos, Playlists, Community,
Channels

Additionally, do not merely return text as string, since they may
include links which may be navigated to

* feat: channel full metadata

* feat: renderers for playlists

* refactor!: Actions.browse

Channels should be viewable when not logged in, also added 'navigation'
type for use in NagivationEndpoint in the future.

* feat: home feed parsers

* feat: watch page renderers

* feat: start implementing HomeFeed API

The HomeFeed class remains compatible with the existing API

* feat: generate types using tsc and jsdoc

* feat: browse continuations from navigationEndpoint

* fix: Actions moved to session

This follows commit 1bfe2676d8

* fix: add more typescript config

* chore: use correct spaces and quotes

* feat: Trending API

* feat: reimplement existing channel API

* feat: add base video feed class

* feat: get channel videos

* feat: channel playlists

* feat: get channel community posts

* feat: get channels from channel

* feat: get channel about page data

* feat: add missing channel parsers

this commit also adds regenerated types I've neglected to push

* feat: initial playlist reimplementation

* feat: complete playlist reimplementation

* refactor: change InnertubeError to ES6 class

* fix: some unresolved types

* chore: update types

* feat: wip video details

* feat: get music tracks in video

Possibly an implementation for issue #48

* refactor:  merge parsers (wip)

This is a work in progress.

* fix: add pnpm to ignore

* fix: merge issues

* fix: merge Video and VideoInfo

VideoInfo should be working again.
Also remove the old parsers.

* feat: set matching in Simplify

Still looking into removing Simplify

* fix: ContinuationItem

This `call` method allows for traversal of continuations with the Simplify API
but may be removed in the future

* fix: optionally returned data

* revert: replace ContinuationItem with main

* feat(parser): contents memoization by classname

* feat(channel): working without Simplify

* feat(feed): working continuations

* fix: liniting issues

* feat(feed): filterable feed for home

* feat(feed): tabbed feed for trending & channel

* refactor: remove Simplify completely

* chore: lint

* refactor: alias `items` with `contents`

* refactor: `Search` to extend `Feed`

* fix: Search working

Also added MenuServiceItemDownload

* refactor: move `Channel` and `Playlist`

* fix: pass all tests

* fix: linting errors
2022-06-15 18:31:34 -03:00

173 lines
5.3 KiB
TypeScript

export = VideoInfo;
/** namespace */
declare class VideoInfo {
/**
* @param {object} data - API response.
* @param {import('../../core/Actions')} actions
* @param {import('../../core/Player')} player
*/
constructor(data: object, actions: import('../../core/Actions'), player: import('../../core/Player'));
/**
* @type {import('../contents/classes/VideoDetails')}
*/
basic_info: import('../contents/classes/VideoDetails');
/**
* @type {import('../contents/classes/VideoPrimaryInfo')}
*/
primary_info: import('../contents/classes/VideoPrimaryInfo');
/**
* @type {import('../contents/classes/VideoSecondaryInfo')}
*/
secondary_info: import('../contents/classes/VideoSecondaryInfo');
/**
* @type {import('../contents/classes/MerchandiseShelf')}
*/
merchandise: import('../contents/classes/MerchandiseShelf');
/**
* @type {import('../contents/classes/ChipCloud')}
*/
related_chip_cloud: import('../contents/classes/ChipCloud');
watch_next_feed: any;
/**
* @type {import('../contents/classes/PlayerOverlay')}
*/
player_overlays: import('../contents/classes/PlayerOverlay');
streaming_data: {
expires: Date;
formats: import("../contents/classes/Format")[];
adaptive_formats: import("../contents/classes/Format")[];
dash_manifest_url: any;
dls_manifest_url: any;
};
playability_status: {
status: number;
error_screen: any;
embeddable: boolean;
reason: string;
};
/**
* @type {import('../contents/classes/PlayerAnnotationsExpanded')[]}
*/
annotations: import('../contents/classes/PlayerAnnotationsExpanded')[];
/**
* @type {import('../contents/classes/PlayerStoryboardSpec')}
*/
storyboards: import('../contents/classes/PlayerStoryboardSpec');
/**
* @type {import('../contents/classes/Endscreen')}
*/
endscreen: import('../contents/classes/Endscreen');
/**
* @type {import('../contents/classes/PlayerCaptionsTracklist')}
*/
captions: import('../contents/classes/PlayerCaptionsTracklist');
/**
* @type {import('../contents/classes/CardCollection')}
*/
cards: import('../contents/classes/CardCollection');
/**
* @type {import('../contents/classes/CommentsEntryPointHeader')}
*/
comments_entry_point_header: import('../contents/classes/CommentsEntryPointHeader');
/**
* Applies given filter to the watch next feed.
*
* @param {string} name
* @returns {Promise.<VideoInfo>}
*/
selectFilter(name: string): Promise<VideoInfo>;
/** @typedef {import('../contents/classes/CompactVideo')} CompactVideo */
/** @typedef {import('../contents/classes/CompactMix')} CompactMix */
/**
* Retrieves watch next feed continuation.
*
* @returns {Promise.<CompactVideo[] | CompactMix[]>}
*/
getWatchNextContinuation(): Promise<import("../contents/classes/CompactVideo")[] | import("../contents/classes/CompactMix")[]>;
/**
* API response.
*
* @typedef {{ success: boolean, status_code: number, data: object }} Response
*/
/**
* Likes the video.
*
* @returns {Promise.<Response>}
*/
like(): Promise<{
success: boolean;
status_code: number;
data: object;
}>;
/**
* Dislikes the video.
*
* @returns {Promise.<Response>}
*/
dislike(): Promise<{
success: boolean;
status_code: number;
data: object;
}>;
/**
* Removes like/dislike.
*
* @returns {Promise.<Response>}
*/
removeLike(): Promise<{
success: boolean;
status_code: number;
data: object;
}>;
/** @type {string[]} */
get filters(): string[];
get page(): {
contents: any;
contents_memo: Map<any, any>;
on_response_received_actions: any;
on_response_received_actions_memo: Map<any, any>;
on_response_received_endpoints: any;
on_response_received_endpoints_memo: Map<any, any>;
on_response_received_commands: any;
continuation_contents: any;
metadata: any;
header: any;
microformat: import("../contents/classes/PlayerMicroformat");
sidebar: any;
overlay: any;
refinements: any;
estimated_results: any;
player_overlays: any;
playability_status: {
status: number;
error_screen: any;
embeddable: boolean;
reason: string;
}; /**
* @type {import('../contents/classes/CardCollection')}
*/
streaming_data: {
expires: Date;
formats: import("../contents/classes/Format")[];
adaptive_formats: import("../contents/classes/Format")[];
dash_manifest_url: any;
dls_manifest_url: any;
};
captions: any;
video_details: import("../contents/classes/VideoDetails");
annotations: any;
storyboards: any;
endscreen: import("../contents/classes/Endscreen");
cards: import("../contents/classes/CardCollection");
}[];
/**
* Get songs used in the video.
*
* @returns {{ [key: string]: import('../parser/contents/Text')[] }[]}
*/
get music_tracks(): {
[key: string]: any[];
}[];
#private;
}