Manual Reference Source Test
public class | source

AbstractProvider

Extends:

IProvider → AbstractProvider

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

Get the contents for the configurations.

Inherited Summary

From class IProvider
public abstract

Get the contents for a configuration.

public abstract

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:

NameTypeAttributeDescription
PopApiScraper PopApiScraper
  • nullable: false

The PopApScraper instance.

options Object
  • nullable: false

The options for the AbstractProvider.

name string
  • nullable: false

The name of the AbstractProvider.

options.configs Array<Object>
  • nullable: false

The configurations of the provider.

maxWebRequests number
  • optional
  • default: 2
  • nullable: false

The max allowed concurrent web requests.

Public Members

public configs: Array source

The configs fro the abstract provider.

public maxWebRequests: number source

The max allowed concurrent web requests.

public name: string source

The name of the abstract provider.

Public Methods

public scrapeConfigs(): Promise<Array<Object>, Error> source

Get the contents for the configurations.

Override:

IProvider#scrapeConfigs

Return:

Promise<Array<Object>, Error>

The results of the scraped configurations.

Test: