link-enricher
Version:
Fetch oEmbed, Opeh Graph, etc info for links
12 lines (11 loc) • 421 B
TypeScript
import { FetchOptions } from './fetch';
import { FileResult, OEmbedResult, WebpageResult } from './parse';
export type LinkEnricherResult = {
image?: FileResult;
video?: FileResult;
attachment?: FileResult;
webpage?: WebpageResult;
oembed?: OEmbedResult;
};
declare const enrichLink: (link: string, userAgent?: string, reqOptions?: FetchOptions) => Promise<LinkEnricherResult>;
export { enrichLink };