5.14.6 • Published 5 months ago
@types/metascraper-media-provider v5.14.6
Installation
npm install --save @types/metascraper-media-provider
Summary
This package contains type definitions for metascraper-media-provider (https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-media-provider).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/metascraper-media-provider.
index.d.ts
// Type definitions for metascraper-media-provider 5.14
// Project: https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-media-provider
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import metascraper = require('metascraper');
declare namespace getData {
type OnErrorFunction = (url: string, error: Error) => void;
type GetProxyFunction = (data: GetProxyData) => string;
interface GetProxyData {
url: string;
retryCount: number;
}
interface Options {
/**
* It specifies cache based on file system to be used by
* [youtube-dl](https://github.com/microlinkhq/metascraper/blob/master/packages/metascraper-media-provider/youtube-dl).
*/
cacheDir?: string | undefined;
/**
* It will be called to determinate if a proxy should be used for
* resolving the next request URL.
*/
getProxy?: GetProxyFunction | undefined;
/** A function to be called when something wrong happens. */
onError?: OnErrorFunction | undefined;
/**
* The maximum time allowed to wait until considering the request as
* timed out. Default is `30000`.
*/
timeout?: number | undefined;
/** It specifies a custom user agent. */
userAgent?: string | undefined;
}
}
declare function getData(options?: getData.Options): metascraper.Rule;
export = getData;
Additional Details
- Last updated: Thu, 08 Jul 2021 18:50:44 GMT
- Dependencies: @types/metascraper
- Global values: none
Credits
These definitions were written by Florian Imdahl.