@sushibtw/youtubei
Version:
Simple package to get information from youtube such as videos, playlists, channels, video information & comments, related videos, up next video, and more!
27 lines (26 loc) • 788 B
TypeScript
/// <reference types="node" />
import https from "https";
import { YoutubeRawData } from "./types";
import { Client } from "../classes";
interface Options extends https.RequestOptions {
params: Record<string, any>;
data: any;
headers: Record<string, string>;
}
export default class HTTP {
private _cookie;
private _hl;
private _gl;
private _localAddress?;
constructor(client: Client);
/** Send GET request to Youtube */
get(path: string, options: Partial<Options>): Promise<YoutubeRawData>;
/** Send POST request to Youtube */
post(path: string, options: Partial<Options>): Promise<YoutubeRawData>;
/**
* Send request to Youtube
*/
private request;
private static returnPromise;
}
export {};