import { HTTP } from "../common"; import { Playlist, Video, SearchResult, LiveVideo } from "."; import { SearchResultType } from "./SearchResult"; export declare namespace Client { type SearchType = "video" | "channel" | "playlist" | "all"; type SearchOptions = { /** Search type, can be `"video"`, `"channel"`, `"playlist"`, or `"all"` */ type: SearchType; }; type ClientOptions = { cookie: string; /** 2-chars language code for localization */ hl: string; /** 2-chars country code */ gl: string; /** Local address for sending the request */ localAddress?: string; }; } /** Youtube Client */ export default class Client { /** @hidden */ http: HTTP; /** @hidden */ options: Client.ClientOptions; constructor(options?: Partial); /** * Searches for videos / playlists / channels * * @param query The search query * @param searchOptions Search options * */ search(query: string, searchOptions?: Partial): Promise>; /** * Search for videos / playlists / channels and returns the first result * * @return Can be {@link VideoCompact} | {@link PlaylistCompact} | {@link Channel} | `undefined` */ findOne(query: string, searchOptions?: Partial): Promise | undefined>; /** Get playlist information and its videos by playlist id or URL */ getPlaylist(playlistIdOrUrl: string): Promise; /** Get video information by video id or URL */ getVideo(videoIdOrUrl: string): Promise; }