import AbstractProvider from 'pop-api-scraper/src/providers/AbstractProvider.js'
AbstractProvider
Extends:
Implements:
The abstract provider for the strategy pattern.
Test:
Constructor Summary
Public Constructor | ||
public |
constructor(PopApiScraper: PopApiScraper, options: Object, name: string, maxWebRequests: number) Create a nwe AbstractProvider object. |
Member Summary
Public Members | ||
public |
The configs fro the abstract provider. |
|
public |
The max allowed concurrent web requests. |
|
public |
The name of the abstract provider. |
Method Summary
Public Methods | ||
public |
scrapeConfigs(): Promise<Array<Object>, Error> Get the contents for the configurations. |
Inherited Summary
From class IProvider | ||
public abstract |
Get the contents for a configuration. |
|
public abstract |
scrapeConfigs(): Promise<Array<Object>, Error> Get the contents for the configurations. |
Public Constructors
public constructor(PopApiScraper: PopApiScraper, options: Object, name: string, maxWebRequests: number) source
Create a nwe AbstractProvider object.
Params:
Name | Type | Attribute | Description |
PopApiScraper | PopApiScraper |
|
The PopApScraper instance. |
options | Object |
|
The options for the AbstractProvider. |
name | string |
|
The name of the AbstractProvider. |
options.configs | Array<Object> |
|
The configurations of the provider. |
maxWebRequests | number |
|
The max allowed concurrent web requests. |