• Release Notes
  • Subsembly.Scraper
  • Subsembly.Json

Interface IScraper

Namespace: Subsembly.Scraper
Assembly: Subsembly.Scraper.dll
Syntax
public interface IScraper

Properties

ClassName

A name that uniquely identifies a scraper implementation. This is usually the actual class name of the implementation sans the Scraper prefix.

Declaration
string ClassName { get; }
Property Value
Type Description
System.String

Name

User friendly name of this account service scraper.

Declaration
string Name { get; }
Property Value
Type Description
System.String

Priority

Selects the priority of this scraper as compared to other scrapers. Scrapers with a lower Priority value are tried before scrapers with a higher a higher Priority value.

Declaration
int Priority { get; }
Property Value
Type Description
System.Int32

Methods

CanScrape(JsonObject)

Checks whether this scraper can scrape the given account.

Declaration
bool CanScrape(JsonObject jsAcct)
Parameters
Type Name Description
JsonObject jsAcct

Account identification.

Returns
Type Description
System.Boolean

CreateContact(JsonObject)

Create a new scraper contact object from an account.

Declaration
IScraperContact CreateContact(JsonObject jsAcct)
Parameters
Type Name Description
JsonObject jsAcct

Account details of an account that can be scraped by this scraper, i.e. the method CanScrape(JsonObject) returns true for it.

Returns
Type Description
IScraperContact

If the given account cannot be scraped by this scraper, then null is returned. If the account can be scraped, then a new IScraperContact implementing instance is created, initialized with data from the account and returned.

GetProductInfo(JsonObject)

If the scraper can scrape the given account, then this returns inforomation about the account product.

Declaration
ScraperProductInfo GetProductInfo(JsonObject jsAcct)
Parameters
Type Name Description
JsonObject jsAcct
Returns
Type Description
ScraperProductInfo

If this scraper cannot scrape the given account, then this returns null. Otherwise a ScraperProductInfo instance with account product details is provided.

Back to top Copyright 2017-2022 Subsembly GmbH