UNPKG

twdl

Version:

Downloads image and video tweets from Twitter

21 lines (20 loc) 805 B
import * as util from './util.js'; import { AllOptions } from './options.js'; export * from './options.js'; export interface DownloadStatus { status: string | DownloadStatusCode; errors: [string, Error][]; mediaUrl: string; tweetUrl: string; } export declare enum DownloadStatusCode { Downloaded = "downloaded", Skipped = "skipped", FailedDownload = "failedDownload", FailedEmbed = "failedEmbed", FailedText = "failedText", FailedDate = "failedDate" } declare type DownloadUrlsResult = Promise<Array<DownloadStatus[]>>; export declare function downloadUrls(urls: string[], options: Partial<AllOptions>): DownloadUrlsResult; export declare function getThreadUrls(tweetUrl: string, options: Partial<AllOptions>): Promise<Partial<util.MediaData>>;