tiktok-downloader
Version:
A JavaScript package to download videos from TikTok.
63 lines (62 loc) • 1.63 kB
TypeScript
export declare namespace JSTikTok {
interface DownloadResponse {
blob: Blob;
fileName: string;
type: string;
}
interface VideoInfo {
id: any;
height: any;
duration: any;
sizeFormat: any;
cover: any;
animatedCover: any;
likes: any;
shares: any;
comments: any;
views: any;
title: any;
keywords: any;
description: any;
original_url: any;
download_url: any;
}
interface MusicInfo {
id: any;
title: any;
cover_large: any;
cover_medium: any;
cover_small: any;
artist: any;
album: any;
duration: any;
url: any;
}
interface AuthorInfo {
id: any;
uniqueId: any;
username: any;
avatar_large: any;
avatar_medium: any;
avatar_small: any;
signature: any;
createDate: any;
isVerified: any;
followers: any;
followings: any;
hearts: any;
totalVideos: any;
diggCount: any;
}
interface TikTokInfo {
video: VideoInfo;
music: MusicInfo;
author: AuthorInfo;
}
function validateUrl(url: string): boolean;
function urlEncode(str: string): string;
function getBlob(url: string): Promise<Blob>;
function getInfo(url: string): Promise<TikTokInfo>;
function downloadMusic(url: string): Promise<DownloadResponse>;
function downloadVideo(url: string): Promise<DownloadResponse>;
}