UNPKG

youtubei

Version:

Simple package to get information from youtube such as videos, playlists, channels, video information & comments, related videos, up next video, and more!

37 lines (36 loc) 944 B
import { RequestInit } from "node-fetch"; declare type HTTPOptions = { apiKey: string; baseUrl: string; clientName: string; clientVersion: string; fetchOptions?: Partial<RequestInit>; youtubeClientOptions?: Record<string, unknown>; initialCookie?: string; }; declare type Response<T = any> = { data: T; }; declare type Options = { data: Record<string, unknown>; params: Record<string, string>; } & RequestInit; /** * @hidden */ export declare class HTTP { private apiKey; private baseUrl; private clientName; private clientVersion; private cookie; private defaultHeaders; private defaultFetchOptions; private defaultClientOptions; constructor(options: HTTPOptions); get(path: string, options?: Partial<Options>): Promise<Response>; post(path: string, options?: Partial<Options>): Promise<Response>; private request; private parseCookie; } export {};