/// import type { GConstructor, Mixin } from './.mixin.helper'; import type { Scope } from '../types'; import * as bt from './browsing.types'; import * as parser_bT from '../parsers/browsing.types'; import * as parser_lT from '../parsers/library.types'; import { _YTMusic } from '../ytmusic'; export declare type BrowsingMixin = Mixin; /** * @module Browsing */ export declare const BrowsingMixin: >(Base: TBase) => { new (...args: any[]): { /** * Get the home page. * The home page is structured as titled rows, returning 3 rows of music suggestions at a time. * Content varies and may contain artist, album, song or playlist suggestions, sometimes mixed within the same row * * @param {number} [limit=3] Number of rows to return * @returns List of objects keyed with 'title' text and 'contents' array * @example * [ * { * "title": "Your morning music", * "contents": [ * { //album result * "title": "Sentiment", * "year": "Said The Sky", * "browseId": "MPREb_QtqXtd2xZMR", * "thumbnails": [...] * }, * { //playlist result * "title": "r/EDM top submissions 01/28/2022", * "playlistId": "PLz7-xrYmULdSLRZGk-6GKUtaBZcgQNwel", * "thumbnails": [...], * "description": "redditEDM • 161 songs", * "count": "161", * "author": [ * { * "name": "redditEDM", * "id": "UCaTrZ9tPiIGHrkCe5bxOGwA" * } * ] * } * ] * }, * { * "title": "Your favorites", * "contents": [ * { //artist result * "title": "Chill Satellite", * "browseId": "UCrPLFBWdOroD57bkqPbZJog", * "subscribers": "374", * "thumbnails": [...] * } * { //album result * "title": "Dragon", * "year": "Two Steps From Hell", * "browseId": "MPREb_M9aDqLRbSeg", * "thumbnails": [...] * } * ] * }, * { * "title": "Quick picks", * "contents": [ * { //song quick pick * "title": "Gravity", * "videoId": "EludZd6lfts", * "artists": [{ * "name": "yetep", * "id": "UCSW0r7dClqCoCvQeqXiZBlg" * }], * "thumbnails": [...], * "album": { * "title": "Gravity", * "browseId": "MPREb_D6bICFcuuRY" * } * }, * { //video quick pick * "title": "Gryffin & Illenium (feat. Daya) - Feel Good (L3V3LS Remix)", * "videoId": "bR5l0hJDnX8", * "artists": [ * { * "name": "L3V3LS", * "id": "UCCVNihbOdkOWw_-ajIYhAbQ" * } * ], * "thumbnails": [...], * "views": "10M" * } * ] * } * ] */ getHome(limit?: number): Promise; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "songs" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "videos" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "albums" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "artists" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "playlists" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "community_playlists" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "featured_playlists" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Search YouTube music. * Returns results within the provided category. * @param {string} query Query string, i.e. 'Oasis Wonderwall' * @param {options} [options=] * @param {'songs'|'videos'|'albums'|'artists'|'playlists'|'community_playlists'|'featured_playlists'} [options.filter=] Filter for item types. * @default: Default search, including all types of items. * @param {'libary'|'uploads'} [options.scope=] Search scope. * @default: Search the public YouTube Music catalogue. * @param {number} [options.limit=20] Number of search results to return * @param {boolean} [ignoreSpelling=false] Whether to ignore YTM spelling suggestions. * If true, the exact search term will be searched for, and will not be corrected. * This does not have any effect when the filter is set to ``uploads``. * Default: false, will use YTM's default behavior of autocorrecting the search. * @return List of results depending on filter. * resultType specifies the type of item (important for default search). * albums, artists and playlists additionally contain a browseId, corresponding to * albumId, channelId and playlistId (browseId=``VL``+playlistId) * @example list for default search with one result per resultType for brevity. Normally * there are 3 results per resultType and an additional ``thumbnails`` key. * [ * { * "category": "Top result", * "resultType": "video", * "videoId": "vU05Eksc_iM", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "1.4M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Songs", * "resultType": "song", * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "album": { * "name": "(What's The Story) Morning Glory? (Remastered)", * "id": "MPREb_9nqEki4ZDpp" * }, * "duration": "4:19", * "duration_seconds": 259 * "isExplicit": false, * "feedbackTokens": { * "add": null, * "remove": null * } * }, * { * "category": "Albums", * "resultType": "album", * "browseId": "MPREb_9nqEki4ZDpp", * "title": "(What's The Story) Morning Glory? (Remastered)", * "type": "Album", * "artist": "Oasis", * "year": "1995", * "isExplicit": false * }, * { * "category": "Community playlists", * "resultType": "playlist", * "browseId": "VLPLK1PkWQlWtnNfovRdGWpKffO1Wdi2kvDx", * "title": "Wonderwall - Oasis", * "author": "Tate Henderson", * "itemCount": "174" * }, * { * "category": "Videos", * "resultType": "video", * "videoId": "bx1Bh8ZvH84", * "title": "Wonderwall", * "artists": [ * { * "name": "Oasis", * "id": "UCmMUZbaYdNH0bEd1PAlAqsA" * } * ], * "views": "386M", * "duration": "4:38", * "duration_seconds": 278 * }, * { * "category": "Artists", * "resultType": "artist", * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "artist": "Oasis", * "shuffleId": "RDAOkjHYJjL1a3xspEyVkhHAsg", * "radioId": "RDEMkjHYJjL1a3xspEyVkhHAsg" * } * ] */ search(query: string, options?: { filter?: "uploads" | undefined; scope?: Scope | undefined; limit?: number | undefined; ignoreSpelling?: boolean | undefined; } | undefined): Promise>; /** * Get information about an artist and their top releases (songs, * albums, singles, videos, and related artists). The top lists * contain pointers for getting the full list of releases. For * songs/videos, pass the browseId to {@link https://codyduong.github.io/ytmusicapiJS/module-Playlists.html#getPlaylist | getPlaylist}. * For albums/singles, pass browseId and params to {@link https://codyduong.github.io/ytmusicapiJS/module-Browsing.html#getArtistAlbums | getArtistAlbums}. * * @param {string} channelId channel id of the artist * @return Object with requested information. * @example * { * "description": "Oasis were ...", * "views": "1838795605", * "name": "Oasis", * "channelId": "UCUDVBtnOQi4c7E8jebpjc9Q", * "subscribers": "2.3M", * "subscribed": false, * "thumbnails": [...], * "songs": { * "browseId": "VLPLMpM3Z0118S42R1npOhcjoakLIv1aqnS1", * "results": [ * { * "videoId": "ZrOKjDZOtkA", * "title": "Wonderwall (Remastered)", * "thumbnails": [...], * "artist": "Oasis", * "album": "(What's The Story) Morning Glory? (Remastered)" * } * ] * }, * "albums": { * "results": [ * { * "title": "Familiar To Millions", * "thumbnails": [...], * "year": "2018", * "browseId": "MPREb_AYetWMZunqA" * } * ], * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "params": "6gPTAUNwc0JDbndLYlFBQV..." * }, * "singles": { * "results": [ * { * "title": "Stand By Me (Mustique Demo)", * "thumbnails": [...], * "year": "2016", * "browseId": "MPREb_7MPKLhibN5G" * } * ], * "browseId": "UCmMUZbaYdNH0bEd1PAlAqsA", * "params": "6gPTAUNwc0JDbndLYlFBQV..." * }, * "videos": { * "results": [ * { * "title": "Wonderwall", * "thumbnails": [...], * "views": "358M", * "videoId": "bx1Bh8ZvH84", * "playlistId": "PLMpM3Z0118S5xuNckw1HUcj1D021AnMEB" * } * ], * "browseId": "VLPLMpM3Z0118S5xuNckw1HUcj1D021AnMEB" * }, * "related": { * "results": [ * { * "browseId": "UCt2KxZpY5D__kapeQ8cauQw", * "subscribers": "450K", * "title": "The Verve" * }, * { * "browseId": "UCwK2Grm574W1u-sBzLikldQ", * "subscribers": "341K", * "title": "Liam Gallagher" * }, * ... * ] * } * } */ getArtist(channelId: string): Promise; /** * Get the full list of an artist's albums or singles * @param {string} channelId channel Id of the artist * @param {string} params params obtained by {@link https://codyduong.github.io/ytmusicapiJS/module-Browsing.html#getArtist | getArtist} * @returns List of albums in the format of {@link https://codyduong.github.io/ytmusicapiJS/module-Library.html#getLibraryAlbums | getLibraryAlbums}, except artists key is missing. */ getArtistAlbums(channelId: string, params: string): Promise; /** * Retrieve a user's page. A user may own videos or playlists. * @param {string} channelId channelId of the user * @returns Object with information about a user. * @example * { * "name": "4Tune – No Copyright Music", * "videos": { * "browseId": "UC44hbeRoCZVVMVg5z0FfIww", * "results": [ * { * "title": "Epic Music Soundtracks 2019", * "videoId": "bJonJjgS2mM", * "playlistId": "RDAMVMbJonJjgS2mM", * "thumbnails": [ * { * "url": "https://i.ytimg.com/vi/bJon...", * "width": 800, * "height": 450 * } * ], * "views": "19K" * } * ] * }, * "playlists": { * "browseId": "UC44hbeRoCZVVMVg5z0FfIww", * "results": [ * { * "title": "♚ Machinimasound | Playlist", * "playlistId": "PLRm766YvPiO9ZqkBuEzSTt6Bk4eWIr3gB", * "thumbnails": [ * { * "url": "https://i.ytimg.com/vi/...", * "width": 400, * "height": 225 * } * ] * } * ], * "params": "6gO3AUNvWU..." * } * } */ getUser(channelId: string): Promise; /** * Retrieve a list of playlists for a given user. * Call this function again with the returned ``params`` to get the full list. * @param {string} [channelId] channelId of the user. * @param {string} [params] params obtained by `getArtist` * @returns List of user playlists in the format of `getLibraryPlaylists` */ getUserPlaylists(channelId: string, params: string): Promise; /** * Get an album's browseId based on its audioPlaylistId * @param {string} [audioPlaylistId] id of the audio playlist (starting with `OLAK5uy_`) * @returns browseId (starting with `MPREb_`) */ getAlbumBrowseId(audioPlaylistId: `OLAK5uy_${string}`): Promise<`MPREb_${string}`>; /** * Get information and tracks of an album * @param {string} browseId of the album, for example returned by {@link search} * @returns Object with album and track metadata. * @example * { * "title": "Revival", * "type": "Album", * "thumbnails": [], * "description": "Revival is the...", * "artists": [ * { * "name": "Eminem", * "id": "UCedvOgsKFzcK3hA5taf3KoQ" * } * ], * "year": "2017", * "trackCount": 19, * "duration": "1 hour, 17 minutes", * "duration_seconds": 4657, * "audioPlaylistId": "OLAK5uy_nMr9h2VlS-2PULNz3M3XVXQj_P3C2bqaY", * "tracks": [ * { * "videoId": "iKLU7z_xdYQ", * "title": "Walk On Water (feat. Beyoncé)", * "artists": [ * { * "name": "Eminem", * "id": "UCedvOgsKFzcK3hA5taf3KoQ" * } * ], * "album": "Revival", * "likeStatus": "INDIFFERENT", * "thumbnails": null, * "isAvailable": true, * "isExplicit": true, * "duration": "5:03", * "duration_seconds": 303, * "feedbackTokens": { * "add": "AB9zfpK...", * "remove": "AB9zfpK..." * } * } * ], * "duration_seconds": 4657 * } */ getAlbum(browseId: string): Promise; /** * Returns metadata and streaming information about a song or video. * @param {string} [videoId] Video id * @param {number} [signatureTimestamp] Provide the current YouTube signatureTimestamp. * If not provided a default value will be used, which might result in invalid streaming URLs * @return Object with song metadata * @example * { * "playabilityStatus": { * "status": "OK", * "playableInEmbed": true, * "audioOnlyPlayability": { * "audioOnlyPlayabilityRenderer": { * "trackingParams": "CAEQx2kiEwiuv9X5i5H1AhWBvlUKHRoZAHk=", * "audioOnlyAvailability": "FEATURE_AVAILABILITY_ALLOWED" * } * }, * "miniplayer": { * "miniplayerRenderer": { * "playbackMode": "PLAYBACK_MODE_ALLOW" * } * }, * "contextParams": "Q0FBU0FnZ0M=" * }, * "streamingData": { * "expiresInSeconds": "21540", * "adaptiveFormats": [ * { * "itag": 140, * "url": "https://rr1---sn-h0jelnez.c.youtube.com/videoplayback?expire=1641080272...", * "mimeType": "audio/mp4; codecs=\"mp4a.40.2\"", * "bitrate": 131007, * "initRange": { * "start": "0", * "end": "667" * }, * "indexRange": { * "start": "668", * "end": "999" * }, * "lastModified": "1620321966927796", * "contentLength": "3967382", * "quality": "tiny", * "projectionType": "RECTANGULAR", * "averageBitrate": 129547, * "highReplication": true, * "audioQuality": "AUDIO_QUALITY_MEDIUM", * "approxDurationMs": "245000", * "audioSampleRate": "44100", * "audioChannels": 2, * "loudnessDb": -1.3000002 * } * ] * }, * "videoDetails": { * "videoId": "AjXQiKP5kMs", * "title": "Sparks", * "lengthSeconds": "245", * "channelId": "UCvCk2zFqkCYzpnSgWfx0qOg", * "isOwnerViewing": false, * "isCrawlable": false, * "thumbnail": { * "thumbnails": [] * }, * "allowRatings": true, * "viewCount": "12", * "author": "Thomas Bergersen", * "isPrivate": true, * "isUnpluggedCorpus": false, * "musicVideoType": "MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK", * "isLiveContent": false * }, * "microformat": { * "microformatDataRenderer": { * "urlCanonical": "https://music.youtube.com/watch?v=AjXQiKP5kMs", * "title": "Sparks - YouTube Music", * "description": "Uploaded to YouTube via YouTube Music Sparks", * "thumbnail": { * "thumbnails": [ * { * "url": "https://i.ytimg.com/vi/AjXQiKP5kMs/hqdefault.jpg", * "width": 480, * "height": 360 * } * ] * }, * "siteName": "YouTube Music", * "appName": "YouTube Music", * "androidPackage": "com.google.android.apps.youtube.music", * "iosAppStoreId": "1017492454", * "iosAppArguments": "https://music.youtube.com/watch?v=AjXQiKP5kMs", * "ogType": "video.other", * "urlApplinksIos": "vnd.youtube.music://music.youtube.com/watch?v=AjXQiKP5kMs&feature=applinks", * "urlApplinksAndroid": "vnd.youtube.music://music.youtube.com/watch?v=AjXQiKP5kMs&feature=applinks", * "urlTwitterIos": "vnd.youtube.music://music.youtube.com/watch?v=AjXQiKP5kMs&feature=twitter-deep-link", * "urlTwitterAndroid": "vnd.youtube.music://music.youtube.com/watch?v=AjXQiKP5kMs&feature=twitter-deep-link", * "twitterCardType": "player", * "twitterSiteHandle": "@YouTubeMusic", * "schemaDotOrgType": "http://schema.org/VideoObject", * "noindex": true, * "unlisted": true, * "paid": false, * "familySafe": true, * "pageOwnerDetails": { * "name": "Music Library Uploads", * "externalChannelId": "UCvCk2zFqkCYzpnSgWfx0qOg", * "youtubeProfileUrl": "http://www.youtube.com/channel/UCvCk2zFqkCYzpnSgWfx0qOg" * }, * "videoDetails": { * "externalVideoId": "AjXQiKP5kMs", * "durationSeconds": "246", * "durationIso8601": "PT4M6S" * }, * "linkAlternates": [ * { * "hrefUrl": "android-app://com.google.android.youtube/http/youtube.com/watch?v=AjXQiKP5kMs" * }, * { * "hrefUrl": "ios-app://544007664/http/youtube.com/watch?v=AjXQiKP5kMs" * }, * { * "hrefUrl": "https://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fmusic.youtube.com%2Fwatch%3Fv%3DAjXQiKP5kMs", * "title": "Sparks", * "alternateType": "application/json+oembed" * }, * { * "hrefUrl": "https://www.youtube.com/oembed?format=xml&url=https%3A%2F%2Fmusic.youtube.com%2Fwatch%3Fv%3DAjXQiKP5kMs", * "title": "Sparks", * "alternateType": "text/xml+oembed" * } * ], * "viewCount": "12", * "publishDate": "1969-12-31", * "category": "Music", * "uploadDate": "1969-12-31" * } * } * } */ getSong(videoId: string, signatureTimestamp?: number | undefined): Promise>; /** * Returns lyrics of a song or video. * @param browseId * @return Object with song lyrics * @example * { * "lyrics": "Today is gonna be the day\\nThat they're gonna throw it back to you\\n", * "source": "Source: LyricFind" * } */ getLyrics(browseId: string | null | undefined): Promise; /** * Extract the URL for the `base.js` script from YouTube Music. * @return {string} URL to `base.js` */ getBaseJSUrl(): Promise; /** * Fetch the `base.js` script from YouTube Music and parse out the `signatureTimestamp` for use with {@link https://codyduong.github.io/ytmusicapiJS/module-Browsing.html#getSong | getSong}. * @param url Optional. Provide the URL of the `base.js` script. If this isn't specified a call will be made to {@link https://codyduong.github.io/ytmusicapiJS/module-Browsing.html#getBaseJSUrl | getBaseJSUrl}. * @returns `signatureTimestamp` string */ getSignatureTimestamp(url?: string | undefined): Promise; "__#2@#auth": string | null; _httpsAgent: import("https").Agent | undefined; _proxies?: false | import("axios").AxiosProxyConfig | undefined; _headers: import("../types").Headers; _context: any; "__#2@#language": string | undefined; _parser: import("../parsers/browsing").Parser; _sapisid: any; _sendRequest>(endpoint: string, body: Record, additionalParams?: string): Promise; _sendGetRequest(url: string, params?: Record | undefined): Promise; checkAuth(): any | null; _checkAuth(): void; getAuth(): string | null; changeLanguage(language: string): Promise; getLanguage(): string | undefined; getProxy(): boolean | import("axios").AxiosProxyConfig | undefined; }; } & TBase;