UNPKG

@tutorialman7727/tiktok-api-dl

Version:

Scraper for downloading media in the form of videos, images and audio from Tiktok. Also for stalking Tiktok Users

26 lines (25 loc) 1.27 kB
import { MusicalDownResponse } from "./types/downloader/musicaldown"; import { SSSTikResponse } from "./types/downloader/ssstik"; import { TiktokAPIResponse } from "./types/downloader/tiktokApi"; import { TiktokUserSearchResponse } from "./types/search/userSearch"; import { StalkResult } from "./types/search/stalker"; import { TiktokLiveSearchResponse } from "./types/search/liveSearch"; type TiktokDownloaderResponse<T extends "v1" | "v2" | "v3"> = T extends "v1" ? TiktokAPIResponse : T extends "v2" ? SSSTikResponse : T extends "v3" ? MusicalDownResponse : TiktokAPIResponse; type TiktokSearchResponse<T extends "user" | "live"> = T extends "user" ? TiktokUserSearchResponse : T extends "live" ? any : TiktokLiveSearchResponse; declare const _default: { Downloader: <T extends "v1" | "v2" | "v3">(url: string, options?: { version: T; }) => Promise<TiktokDownloaderResponse<T>>; Search: <T extends "user" | "live">(query: string, options: { type: T; cookie?: string; page?: number; proxy?: string; }) => Promise<TiktokSearchResponse<T>>; StalkUser: (username: string, options?: { cookie?: string; postLimit?: number; proxy?: string; }) => Promise<StalkResult>; }; export = _default;