@ernestoyoofi/yt.loader-to
Version:
An unofficial, promise-based API wrapper for `loader.to` to fetch YouTube video information and generate download links. Written in TypeScript, it's fully typed and easy to use in any Node.js project.
38 lines (37 loc) • 1.2 kB
TypeScript
import { AxiosRequestConfig } from "axios";
import DownloadMedia from "./request/download-media";
import GetInfoYoutubeContent, { GetInfoYoutubeContents } from "./request/get-info";
interface CostumPathAjax {
download: string;
info: string;
}
interface ConfigurationAPIYoutubeDownloader {
hosting: String | "https://loader.to";
axios_config?: AxiosRequestConfig;
costum_ajax?: CostumPathAjax;
debugging?: Boolean;
}
declare class API_YoutubeDownloader {
__axios_config?: AxiosRequestConfig;
__hosting?: String;
private __getajax?;
private __debugging?;
constructor({ hosting, axios_config, costum_ajax, debugging }: ConfigurationAPIYoutubeDownloader);
GetInfoYt(url: String): Promise<GetInfoYoutubeContents>;
DownloadMedia(link: String, format: String): Promise<{
card?: any;
url: String;
}>;
}
declare const _default_1: {
API_YoutubeDownloader: typeof API_YoutubeDownloader;
DownloadMedia: typeof DownloadMedia;
GetInfoYoutubeContent: typeof GetInfoYoutubeContent;
yt_host: string[];
format: {
video: string[];
audio: string[];
};
hosting: string;
};
export default _default_1;