@types/metascraper-media-provider
TypeScript icon, indicating that this package has built-in type declarations

5.14.6 • Public • Published

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

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.Rules;

export = getData;

Additional Details

Credits

These definitions were written by Florian Imdahl.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/metascraper-media-provider

Weekly Downloads

90

Version

5.14.6

License

MIT

Unpacked Size

5.37 kB

Total Files

5

Last publish

Collaborators

  • types