Manual Reference Source Test
import Context from 'pop-api-scraper/src/Context.js'
public class | source

Context

Base context for the strategy pattern.

Test:

Constructor Summary

Public Constructor
public

constructor(provider: IProvider)

Create a new Context object.

Member Summary

Public Members
public

The provider of the context to execute.

Method Summary

Public Methods
public

Execute the set provider.

Public Constructors

public constructor(provider: IProvider) source

Create a new Context object.

Params:

NameTypeAttributeDescription
provider IProvider
  • optional
  • default: new IProvider()
  • nullable: true

The provider of the context to execute.

Public Members

public provider: IProvider source

The provider of the context to execute.

Test:

Public Methods

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

Execute the set provider.

Return:

Promise<Array<Object>, Error>

A list of scraped content.

Test: