Methods
(async) scrapeTypes({}) → {Array.<InterfaceDescription>}
- Source:
Scrape a given webpage for types, generating JS objects
describing the types of entities described on that page
Parameters:
Name | Type | Description |
---|---|---|
{} |
TypelessConfig | object describing the urls, selectors and options to use when scraping. |
Returns:
an array of objects describing each type on the page.
- Type
- Array.<InterfaceDescription>
Type Definitions
PuppeteerOptions
- Source:
an object to be passed into the puppeteer 'launch' method
Type:
- Object
TypedProperty
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
string | the name of the property |
type |
string | the datatype of the property |
Type:
- Object
TypelessConfig
- Source:
Properties:
Name | Type | Description |
---|---|---|
pageURL |
string | the url for the site describing the entities |
objectRowSelector |
string | a CSS selector returning the rows on the page, one for each object. |
objectRowToNameSelector |
string | a CSS selector to be queried upon each row to find the 'name' node for that entity |
objectRowToPropertiesSelector |
string | a CSS selector to be queried upon each row to find the 'property' nodes for that entity |
objectRowToInheritanceSelector |
string | a CSS selector to be queried upon each row to find the 'inheritance' node for that entity |
propertyRowToNameSelector |
string | a CSS selector to be queried upon each property to find the 'name' node for that property |
propertyRowToTypeSelector |
string | a CSS selector to be queried upon each property to find the 'type' node for that property |
puppeteerOptions |
PuppeteerOptions | an object to be passed into the puppeteer 'launch' method when invoked. https://pptr.dev/#?product=Puppeteer&version=v5.3.1&show=api-puppeteerlaunchoptions |
Type:
- Object